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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a11682ec07a267a79a700100c417432c8268dffcd6a99db8aa42cb00981b246c
4
- data.tar.gz: 855173ce5c38e34bcd2f505e24737ff7cd3670bc2d0df98b38fa07ff7a566b9e
3
+ metadata.gz: 5f86ea378ae4d23917b6c4cecde438da5c1bf741e4c958b8faa7eb6f0869682e
4
+ data.tar.gz: 338cd85ccd70e4585e7c50fcc51d4046806c1edcb24a3da34f2035d5db95d16e
5
5
  SHA512:
6
- metadata.gz: aa84eac5f4c6b850d5c1d205b3d7391ae4645a3797b1c59c36141e5125d53fde629dde0c65401071269a0f1038d4b2e8764cf9f70ff74ca7eb66a3473762baeb
7
- data.tar.gz: b0ca8815ff3f8cdae21319c888818b6c70806cea7dd51e7da4df4e35a5d1805e55c7a7dd0ae0df29094438197aa9a483c7006197f346a97054d919062fc0ef83
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 asked for again rather
7
- // than reshaped in place: Safari left the row of entries where it was when the words
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.Turbo.visit(window.location.href, { action: 'replace' })
19
+ window.location.reload()
18
20
  }
19
21
  }
@@ -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
@@ -1,4 +1,4 @@
1
1
  module Recourse
2
2
  # Version of the gem, read by the gemspec and by hosts checking compatibility.
3
- VERSION = '4.6.2'
3
+ VERSION = '4.6.4'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: recourse
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.6.2
4
+ version: 4.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - claudiob