formatic 0.9.0 → 0.9.1
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 +6 -1
- data/README.md +3 -2
- data/app/components/formatic/search.rb +6 -0
- data/lib/formatic/templates/search.rb +3 -3
- data/lib/formatic/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: dc6207b98bbdcf93dcae103ca03eebc2993c68503b4eca6911e93d57749e26e0
|
|
4
|
+
data.tar.gz: dbc8e45a7d99b106a56dd3f40a024da2baf3df46fdb11c9cffed0dd797a1efe5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cc7e35488bd7a377d21b2482cb8460bcee495390ba89bd96c6b60d56a13f739c3a550263151d572b7c765bab5e9b980a399e17b479cdb3946d1ac6f638ad1976
|
|
7
|
+
data.tar.gz: 963a4fb447e3b5c1c3a7b7385f825de975ae5d8cb13f83c5cbf291609313bc6a2f9bc2076860897a617edb71b9304a08b52e8275b914e9e010e69b5213780dc0
|
data/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
|
+
## [0.9.1] - 2026-11-11
|
|
2
|
+
|
|
3
|
+
- Search list hooks carry an automatic `--route_key` modifier per model
|
|
4
|
+
|
|
1
5
|
## [0.9.0] - 2026-11-11
|
|
2
6
|
|
|
3
|
-
- `Formatic::Search` accepts `recommended:` alongside `favorites:` and `recents
|
|
7
|
+
- `Formatic::Search` accepts `recommended:` alongside `favorites:` and `recents:`
|
|
8
|
+
- Quick-picks and async hits carry stable `formatic-search-hook__quickpicks` / `__results` hooks, each with an automatic `--route_key` modifier per model
|
|
4
9
|
- Rename `Formatic::Search` option `expand_favorites:` to `expand_quickpicks:`
|
|
5
10
|
|
|
6
11
|
## [0.8.1] - 2026-11-10
|
data/README.md
CHANGED
|
@@ -46,10 +46,11 @@ the app supplies the rendered record fragments, and Formatic adds the search wra
|
|
|
46
46
|
|
|
47
47
|
Styling hooks: the quick-pick lists carry `formatic-search-hook__quickpicks`,
|
|
48
48
|
the async hits `formatic-search-hook__results`. Both are stable across
|
|
49
|
-
refactors.
|
|
49
|
+
refactors. Each also carries a modifier with the records route key, so one
|
|
50
|
+
model can differ from the rest:
|
|
50
51
|
|
|
51
52
|
```css
|
|
52
|
-
.formatic-search-hook__quickpicks {
|
|
53
|
+
.formatic-search-hook__quickpicks--animals {
|
|
53
54
|
display: flex;
|
|
54
55
|
flex-direction: row;
|
|
55
56
|
flex-wrap: wrap;
|
|
@@ -81,6 +81,12 @@ module Formatic
|
|
|
81
81
|
pick_list.checked_html
|
|
82
82
|
end
|
|
83
83
|
|
|
84
|
+
def hook_modifier
|
|
85
|
+
record = Array(recents) + Array(favorites) + Array(recommended)
|
|
86
|
+
record = record.first
|
|
87
|
+
record.model_name.route_key if record.respond_to?(:model_name)
|
|
88
|
+
end
|
|
89
|
+
|
|
84
90
|
private
|
|
85
91
|
|
|
86
92
|
def pick_list
|
|
@@ -38,7 +38,7 @@ module Formatic
|
|
|
38
38
|
class: 'js-formatic-search__query-input' %>
|
|
39
39
|
</div>
|
|
40
40
|
|
|
41
|
-
<div class="c-formatic-search__quickpicks js-formatic-search__quickpicks formatic-search-hook__quickpicks<%= ' is-hidden' if picks_initially_hidden? %>">
|
|
41
|
+
<div class="c-formatic-search__quickpicks js-formatic-search__quickpicks formatic-search-hook__quickpicks<%= ' formatic-search-hook__quickpicks--' + hook_modifier if hook_modifier %><%= ' is-hidden' if picks_initially_hidden? %>">
|
|
42
42
|
<% if pick_groups.size > 1 %>
|
|
43
43
|
<div class="c-formatic-search__quickpicks-tabs js-formatic-search__quickpicks-tablist" role="tablist">
|
|
44
44
|
<% pick_groups.each_with_index do |group, group_index| %>
|
|
@@ -66,7 +66,7 @@ module Formatic
|
|
|
66
66
|
<% end %>
|
|
67
67
|
</div>
|
|
68
68
|
|
|
69
|
-
<div class="c-formatic-search__results js-formatic-search__results formatic-search-hook__results"></div>
|
|
69
|
+
<div class="c-formatic-search__results js-formatic-search__results formatic-search-hook__results<%= ' formatic-search-hook__results--' + hook_modifier if hook_modifier %>"></div>
|
|
70
70
|
<div class="c-formatic-search__add-record js-formatic-search__add-record" hidden><%= add_record %></div>
|
|
71
71
|
</div>
|
|
72
72
|
<% else %>
|
|
@@ -97,7 +97,7 @@ module Formatic
|
|
|
97
97
|
class: 'js-formatic-search__query-input' %>
|
|
98
98
|
</div>
|
|
99
99
|
|
|
100
|
-
<div class="c-formatic-search__results js-formatic-search__results formatic-search-hook__results"></div>
|
|
100
|
+
<div class="c-formatic-search__results js-formatic-search__results formatic-search-hook__results<%= ' formatic-search-hook__results--' + hook_modifier if hook_modifier %>"></div>
|
|
101
101
|
<div class="c-formatic-search__add-record js-formatic-search__add-record" hidden><%= add_record %></div>
|
|
102
102
|
<% end %>
|
|
103
103
|
</div>
|
data/lib/formatic/version.rb
CHANGED