recourse 4.6.1 → 4.6.3
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 +12 -0
- data/app/javascript/recourse/tooltip_controller.js +3 -1
- data/app/views/layouts/recourses.html.erb +7 -2
- data/lib/recourse/engine.rb +12 -4
- data/lib/recourse/helpers/filters.rb +4 -1
- 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: 1b23a36a0239e776095075477f86da4bfbdd412fac5afc0bdbcf31efd9f5f227
|
|
4
|
+
data.tar.gz: b7f76555603ddec515cdebd2c15e90852f6c9c836447c87715538151b3be0adf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 381e938adcd70bd902a381ccd73967683dbd443a3e253aacab608e7ddd1eabdad779a4252885257e9bb9f0f7511b3d631ea54e042d7b676a15eb1459be412182
|
|
7
|
+
data.tar.gz: 0b7b0f1b3516dccee6b54cae0214baa8bacc6d0f1046065d7160783e6dc132011054633126ac5cd5c7a0c5641c32e28d354c4a3184767e9b312afe40f1319adb
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,18 @@ 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.3 - 2026-09-08
|
|
9
|
+
|
|
10
|
+
* [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
|
|
11
|
+
|
|
12
|
+
## 4.6.2 - 2026-09-08
|
|
13
|
+
|
|
14
|
+
* [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
|
|
15
|
+
|
|
16
|
+
* [Fix] A counter's tooltip stays away on a phone that reports a coarse pointer, where a tap on `Franchises: 11` flashed it before the page changed
|
|
17
|
+
|
|
18
|
+
* [Fix] A filter's menu is no longer cut off at the foot of a short page — one whose table has no rows — on a phone
|
|
19
|
+
|
|
8
20
|
## 4.6.1 - 2026-09-08
|
|
9
21
|
|
|
10
22
|
* [Fix] On a phone the arrows that put the words back ask for the page again rather than reshaping it in place, which in Safari left the sidebar's entries drawn one over the next until a reload
|
|
@@ -8,9 +8,11 @@ import { Tooltip } from '/recourse/bootstrap.bundle.min.js'
|
|
|
8
8
|
//
|
|
9
9
|
// None where nothing can hover: on a touch screen the tap that would open a link
|
|
10
10
|
// is also what shows a tooltip, and a word popping up over a tap reads as a hitch.
|
|
11
|
+
// Asked two ways, since an iPhone answered the first with a tooltip all the same: a
|
|
12
|
+
// screen that cannot hover, or a pointer too coarse to rest on one word of a row.
|
|
11
13
|
export default class extends Controller {
|
|
12
14
|
connect() {
|
|
13
|
-
if (matchMedia('(hover: none)').matches) return
|
|
15
|
+
if (matchMedia('(hover: none), (pointer: coarse)').matches) return
|
|
14
16
|
|
|
15
17
|
this.tooltip = Tooltip.getOrCreateInstance(this.element)
|
|
16
18
|
}
|
|
@@ -108,8 +108,13 @@
|
|
|
108
108
|
/* Nothing here is meant to be wider than the window: the one thing that is, a
|
|
109
109
|
table, scrolls inside its own wrapper. Safari lays a stacked table's hidden
|
|
110
110
|
header row out at its full width all the same, and a page that can be
|
|
111
|
-
scrolled to it is a page Safari zooms out of and draws the navbar short on.
|
|
112
|
-
|
|
111
|
+
scrolled to it is a page Safari zooms out of and draws the navbar short on.
|
|
112
|
+
`clip` on the shell rather than `hidden`: a `hidden` axis turns the other into
|
|
113
|
+
`auto`, and the body then cut off whatever hung below it — a filter's menu, on a
|
|
114
|
+
page whose table had no rows to be taller than the menu. `clip` leaves the
|
|
115
|
+
other axis alone. */
|
|
116
|
+
html { overflow-x: hidden; }
|
|
117
|
+
.recourse-shell { overflow-x: clip; }
|
|
113
118
|
|
|
114
119
|
/* A finger does not hover. The tint a pointer leaves on the row under it, or on
|
|
115
120
|
the link under it, would stay on whatever was last touched — or land on whatever
|
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
|
|
@@ -69,8 +69,11 @@ module Recourse
|
|
|
69
69
|
# The column on the model a filter lists that counts the rows being filtered —
|
|
70
70
|
# `markets.zips_count` on `/zips`. Read from the counter caches that model keeps
|
|
71
71
|
# rather than from a column named after this one, so a `zips_count` nobody
|
|
72
|
-
# maintains is not a count.
|
|
72
|
+
# maintains is not a count. None on a nested page: the count is of every row in
|
|
73
|
+
# the table, and the page shows the parent's share of them, which nothing counted.
|
|
73
74
|
def filter_counter(klass)
|
|
75
|
+
return if resource_parent
|
|
76
|
+
|
|
74
77
|
klass.recourse_counters.find { |_, one| one.klass == resource_model }&.first
|
|
75
78
|
end
|
|
76
79
|
|
data/lib/recourse/version.rb
CHANGED