recourse 4.1.2 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +15 -0
- data/app/javascript/recourse/bookmark_controller.js +4 -7
- data/app/javascript/recourse/written.js +2 -11
- data/app/views/layouts/recourses.html.erb +18 -7
- data/app/views/recourses/_sidebar.html.erb +30 -25
- data/lib/recourse/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 37d576acaaf1fd87766eb000852a30004862d606e02ea950577f76a3d4f8c8ee
|
|
4
|
+
data.tar.gz: af168a49adf4d3df402ee1f6f093cefe3528dbcfb77727ada7b1270539006475
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bf99a21586c91bb03722206dc18f289cc49338c659e6ef0c3ffeac37ede0aba147ac80f1da437df3ab21c0b59951fcb2ecf86e0d6c2b411e8c465a59a17b48c3
|
|
7
|
+
data.tar.gz: 966f579457d4917bf4b9f17f2efe65bda9445b0e013d7cff33712fc07e027bfe6606cb0e78c45d2b11c26c42dfdcaf014c78e54ad3e9df8ca71c167b94cfef8c
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,21 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
For more information about changelogs, check [Keep a Changelog](http://keepachangelog.com) and
|
|
6
6
|
[Vandamme](http://tech-angels.github.io/vandamme).
|
|
7
7
|
|
|
8
|
+
## 4.2.0 - 2026-09-08
|
|
9
|
+
|
|
10
|
+
* [Feature] The log-out button sits beside the light/dark toggle
|
|
11
|
+
|
|
12
|
+
The two share the sidebar's foot, each centered in its own half, and a hover tints
|
|
13
|
+
either under a rounded corner.
|
|
14
|
+
|
|
15
|
+
* [Fix] A bookmark click no longer marks the row green
|
|
16
|
+
* [Fix] The log-out button is submitted by the browser, not by Turbo
|
|
17
|
+
|
|
18
|
+
A log out ends with a redirect to wherever the host signs people in, which is
|
|
19
|
+
another origin a fetch cannot follow, so the click left the page where it was.
|
|
20
|
+
|
|
21
|
+
The kept tint taking or leaving is the whole report.
|
|
22
|
+
|
|
8
23
|
## 4.1.2 - 2026-09-08
|
|
9
24
|
|
|
10
25
|
* [Fix] The engine requires turbo-rails after Rails, not before
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Controller } from '/recourse/stimulus.js'
|
|
2
2
|
import { flash } from '/recourse/flash.js'
|
|
3
|
-
import { marked } from '/recourse/written.js'
|
|
4
3
|
|
|
5
4
|
// The square that keeps a row, answered before the server does. The icon flips under
|
|
6
5
|
// the cursor and the request goes in the background, so the table is never redrawn and
|
|
@@ -78,13 +77,11 @@ export default class extends Controller {
|
|
|
78
77
|
})
|
|
79
78
|
if (!response.ok) return this.revert(kept)
|
|
80
79
|
|
|
81
|
-
//
|
|
82
|
-
// says which rows are kept
|
|
83
|
-
//
|
|
84
|
-
//
|
|
85
|
-
// never landed, so both are the half only the server can give.
|
|
80
|
+
// The report, and the reason there is no toast: the row takes or loses its tint,
|
|
81
|
+
// which says which rows are kept. The icon flipped on the click and would have
|
|
82
|
+
// flipped under a request that never landed, so this is the half only the server
|
|
83
|
+
// can give.
|
|
86
84
|
this.row?.classList.toggle('recourse-kept', kept)
|
|
87
|
-
marked(this.row)
|
|
88
85
|
} catch {
|
|
89
86
|
this.revert(kept)
|
|
90
87
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
// The mark a
|
|
2
|
-
//
|
|
3
|
-
// toast to keep time with, and the square that keeps a row, which has none — so the
|
|
4
|
-
// marking is here and the clock belongs to whoever calls it.
|
|
1
|
+
// The mark a create or an update leaves on the row it landed on, and how long the toast
|
|
2
|
+
// saying so stands — the one clock, which the toast controller reads too.
|
|
5
3
|
export const DELAY = 2000
|
|
6
4
|
|
|
7
5
|
// Marked, and handed back the way to let it go. Letting go swaps one class for the
|
|
@@ -20,10 +18,3 @@ export function mark(row) {
|
|
|
20
18
|
row.classList.add('recourse-written-out')
|
|
21
19
|
}
|
|
22
20
|
}
|
|
23
|
-
|
|
24
|
-
// And the same, on a clock of its own, for a write with no message to keep time with.
|
|
25
|
-
export function marked(row) {
|
|
26
|
-
const fade = mark(row)
|
|
27
|
-
|
|
28
|
-
setTimeout(fade, DELAY)
|
|
29
|
-
}
|
|
@@ -335,12 +335,23 @@
|
|
|
335
335
|
.table > tbody > .recourse-written-out > * { animation: none; }
|
|
336
336
|
}
|
|
337
337
|
|
|
338
|
-
/* The
|
|
339
|
-
|
|
338
|
+
/* The foot of the sidebar holds the scheme toggle and the way out side by side,
|
|
339
|
+
each centered in its own half of the row: the toggle alone is in the middle, and
|
|
340
|
+
the two together are at a quarter and at three quarters. Each control sits in
|
|
341
|
+
a wrapper — the toggle's own, the form `button_to` draws — and the wrapper is
|
|
342
|
+
the half, so a button is only as wide as its icon and so is its hover. */
|
|
343
|
+
.recourse-foot { display: flex; }
|
|
344
|
+
.recourse-foot > * { flex: 1 1 0; display: flex; justify-content: center; }
|
|
345
|
+
.recourse-foot .nav-link { border-radius: var(--bs-radius-5); }
|
|
346
|
+
/* A hand cursor alone says little on an icon: a tint under it says it is a control. */
|
|
347
|
+
.recourse-foot .nav-link:hover { background-color: var(--bs-bg-1); color: var(--bs-fg-body); }
|
|
348
|
+
|
|
349
|
+
/* The foot sits at the bottom of the sidebar and stretches across it while the
|
|
350
|
+
sidebar is a column, and is simply the last item of the row while it is not
|
|
340
351
|
— the query matches the `md:` the sidebar's own classes use. Both lines are
|
|
341
352
|
needed: `.nav-item` ships `flex: auto`, so every item would take an equal share
|
|
342
353
|
of a full-height nav and the auto margin would never have anything left to
|
|
343
|
-
push against. Pin the items to their own height and the
|
|
354
|
+
push against. Pin the items to their own height and the foot takes the rest. */
|
|
344
355
|
@media (width >= 768px) {
|
|
345
356
|
/* A floor rather than a height, and never wrapped. `.nav` ships `flex-wrap:
|
|
346
357
|
wrap`, and a column that may wrap, whose items are pinned to their own height
|
|
@@ -351,17 +362,17 @@
|
|
|
351
362
|
.recourse-sidebar .nav-item { flex: 0 0 auto; }
|
|
352
363
|
/* And it rides at the foot of the screen, which the auto margin alone is
|
|
353
364
|
enough to do: the nav's floor is the sidebar's full height, so while the
|
|
354
|
-
links leave room the margin takes all of it and the
|
|
365
|
+
links leave room the margin takes all of it and the foot sits on the fold,
|
|
355
366
|
rising with it as the window is shortened. Once the links fill the nav there
|
|
356
|
-
is no room left to take, and the
|
|
367
|
+
is no room left to take, and the foot comes to rest immediately below the
|
|
357
368
|
last of them and goes under the fold with it, to be scrolled to.
|
|
358
369
|
Deliberately not sticky. Sticking it to the bottom of the viewport would lift
|
|
359
370
|
it off that resting place and hold it over the links it had passed — which is
|
|
360
371
|
what the background color was for, masking whichever one it covered. Both go
|
|
361
372
|
together: nothing is painted over, so nothing needs painting out. */
|
|
362
|
-
.recourse-sidebar .recourse-
|
|
373
|
+
.recourse-sidebar .recourse-foot {
|
|
363
374
|
margin-block-start: auto;
|
|
364
|
-
align-self:
|
|
375
|
+
align-self: stretch;
|
|
365
376
|
}
|
|
366
377
|
}
|
|
367
378
|
|
|
@@ -9,32 +9,37 @@
|
|
|
9
9
|
</li>
|
|
10
10
|
<% end %>
|
|
11
11
|
|
|
12
|
-
<%#
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
<span class='
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
12
|
+
<%# The foot of the sidebar: a reader's own say in how the page looks and, where the
|
|
13
|
+
host drew a route named `exit`, the way out beside it — a button, since ending a
|
|
14
|
+
session is never a GET. Each takes half the row and centers its icon in it, so the
|
|
15
|
+
toggle alone sits in the middle and the two together sit at a quarter and at three
|
|
16
|
+
quarters. Which side of the fold the foot lands on is the layout's business, and so
|
|
17
|
+
is which of the two mode icons shows — the mode may be the system's, which only CSS
|
|
18
|
+
knows, so both are drawn. -%>
|
|
19
|
+
<li class='nav-item recourse-foot'>
|
|
20
|
+
<%# In a wrapper of its own, as the way out is in its form: the wrapper is the half
|
|
21
|
+
of the row, and the button is only as wide as its icon. -%>
|
|
22
|
+
<div>
|
|
23
|
+
<%= tag.button type: 'button', class: 'nav-link border-0 bg-transparent',
|
|
24
|
+
data: scheme_data do %>
|
|
25
|
+
<span class='recourse-scheme-light'>
|
|
26
|
+
<i class='bi bi-moon-fill'></i>
|
|
27
|
+
<span class='visually-hidden'><%= t 'recourse.darken' %></span>
|
|
28
|
+
</span>
|
|
29
|
+
<span class='recourse-scheme-dark'>
|
|
30
|
+
<i class='bi bi-sun-fill'></i>
|
|
31
|
+
<span class='visually-hidden'><%= t 'recourse.lighten' %></span>
|
|
32
|
+
</span>
|
|
33
|
+
<% end %>
|
|
34
|
+
</div>
|
|
35
|
+
<%# Submitted by the browser rather than by Turbo: a log out ends with a redirect to
|
|
36
|
+
wherever the host signs people in, which is another origin a fetch cannot follow. -%>
|
|
37
|
+
<% if exit? %>
|
|
38
|
+
<%= button_to exit_path, method: :delete, class: 'nav-link border-0 bg-transparent',
|
|
39
|
+
form: { data: { turbo: false } } do %>
|
|
35
40
|
<i class='bi bi-box-arrow-right'></i>
|
|
36
41
|
<span class='visually-hidden'><%= t 'recourse.exit' %></span>
|
|
37
42
|
<% end %>
|
|
38
|
-
|
|
39
|
-
|
|
43
|
+
<% end %>
|
|
44
|
+
</li>
|
|
40
45
|
</ul>
|
data/lib/recourse/version.rb
CHANGED