recourse 4.6.2 → 4.6.4
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 +8 -0
- data/app/javascript/recourse/density_controller.js +6 -4
- data/lib/recourse/engine.rb +12 -4
- 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: 5f86ea378ae4d23917b6c4cecde438da5c1bf741e4c958b8faa7eb6f0869682e
|
|
4
|
+
data.tar.gz: 338cd85ccd70e4585e7c50fcc51d4046806c1edcb24a3da34f2035d5db95d16e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fc45f09204ee74db4be05e77f2e301d4a3212a8ecfeda0aa4921039d6171e50f0fadc60d5799ebb77311a2ed3a67c8da1143c354124344f9b2c2a9cd3b5e787d
|
|
7
|
+
data.tar.gz: 73f916a5b82b6def467de274e5b94243ea78be8e48bb6c8d79b3bc7887842d0be2bce6a8522ff72c206d5c7b8de47ce4804bb48e1e6042985e7978e2fb2e0b54
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,14 @@ 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.6.4 - 2026-09-08
|
|
9
|
+
|
|
10
|
+
* [Fix] On a phone the arrows that put the words back reload the page outright: the visit 4.6.1 made to the same address was morphed in place under an index's refresh metas, and Safari drew the sidebar's entries one over the next all the same
|
|
11
|
+
|
|
12
|
+
## 4.6.3 - 2026-09-08
|
|
13
|
+
|
|
14
|
+
* [Fix] The gem's scripts and stylesheets are revalidated on every full load, so a browser runs the version the host deployed rather than the one it fetched hours ago
|
|
15
|
+
|
|
8
16
|
## 4.6.2 - 2026-09-08
|
|
9
17
|
|
|
10
18
|
* [Fix] A filter menu on a page under a record no longer counts each option: the counts were of the whole table, not of the record's share of it
|
|
@@ -3,9 +3,11 @@ import { Controller } from '/recourse/stimulus.js'
|
|
|
3
3
|
// The arrows at the foot of the sidebar, drawn on a phone alone: a tap puts the words
|
|
4
4
|
// back beside every icon the chrome shows — the sidebar's entries, the crumbs, the tabs,
|
|
5
5
|
// the foot's own controls — and the next tap takes them away again. The choice goes to
|
|
6
|
-
// the server in a cookie, the way the zone does, and the page is
|
|
7
|
-
// than reshaped in place: Safari left the row of entries where it was when the
|
|
8
|
-
// came out of hiding, one link over the next, until a reload laid it out afresh.
|
|
6
|
+
// the server in a cookie, the way the zone does, and the page is loaded again outright
|
|
7
|
+
// rather than reshaped in place: Safari left the row of entries where it was when the
|
|
8
|
+
// words came out of hiding, one link over the next, until a reload laid it out afresh.
|
|
9
|
+
// A Turbo visit to the same address is no better — an index carries the metas that make
|
|
10
|
+
// a refresh morph, so the visit reshaped the body it had rather than drawing a new one.
|
|
9
11
|
export default class extends Controller {
|
|
10
12
|
static values = { storage: String }
|
|
11
13
|
|
|
@@ -14,6 +16,6 @@ export default class extends Controller {
|
|
|
14
16
|
const density = expanded ? 'compact' : 'expanded'
|
|
15
17
|
|
|
16
18
|
document.cookie = `${this.storageValue}=${density}; path=/; max-age=31536000; samesite=lax`
|
|
17
|
-
window.
|
|
19
|
+
window.location.reload()
|
|
18
20
|
}
|
|
19
21
|
}
|
data/lib/recourse/engine.rb
CHANGED
|
@@ -14,6 +14,12 @@ module Recourse
|
|
|
14
14
|
# `start_with?`, so dropping the slash would swallow `/recourses` itself.
|
|
15
15
|
STATIC_URLS = %w[/recourse/].freeze
|
|
16
16
|
|
|
17
|
+
# Every file is asked for again on every full load, and answered `304 Not Modified`
|
|
18
|
+
# while it stands. The URL of a file never changes between versions of the gem, so
|
|
19
|
+
# a browser told to keep one for hours ran the previous version's script — with the
|
|
20
|
+
# tooltip a release had just taken away — until the hours were up.
|
|
21
|
+
STATIC_HEADERS = [[:all, { 'cache-control' => 'no-cache' }]].freeze
|
|
22
|
+
|
|
17
23
|
# Initializers all run before routes are drawn, so `recourses` exists in time.
|
|
18
24
|
initializer 'recourse.routes' do
|
|
19
25
|
ActionDispatch::Routing::Mapper.include Scopes, Routes
|
|
@@ -34,15 +40,17 @@ module Recourse
|
|
|
34
40
|
# to find, since a page here cannot do without it.
|
|
35
41
|
app.middleware.insert_before Rails::Rack::Logger, Rack::Static,
|
|
36
42
|
urls: { '/recourse/turbo.min.js' => 'turbo.min.js' },
|
|
37
|
-
root: Turbo::Engine.root.join('app/assets/javascripts').to_s
|
|
43
|
+
root: Turbo::Engine.root.join('app/assets/javascripts').to_s,
|
|
44
|
+
header_rules: STATIC_HEADERS
|
|
38
45
|
app.middleware.insert_before Rails::Rack::Logger, Rack::Static,
|
|
39
46
|
urls: STATIC_URLS, root: Engine.root.join('vendor'),
|
|
40
|
-
cascade: true
|
|
47
|
+
header_rules: STATIC_HEADERS, cascade: true
|
|
41
48
|
app.middleware.insert_before Rails::Rack::Logger, Rack::Static,
|
|
42
49
|
urls: STATIC_URLS, root: Engine.root.join('app/javascript'),
|
|
43
|
-
cascade: true
|
|
50
|
+
header_rules: STATIC_HEADERS, cascade: true
|
|
44
51
|
app.middleware.insert_before Rails::Rack::Logger, Rack::Static,
|
|
45
|
-
urls: STATIC_URLS, root: Engine.root.join('app/stylesheets')
|
|
52
|
+
urls: STATIC_URLS, root: Engine.root.join('app/stylesheets'),
|
|
53
|
+
header_rules: STATIC_HEADERS
|
|
46
54
|
end
|
|
47
55
|
end
|
|
48
56
|
end
|
data/lib/recourse/version.rb
CHANGED