activeadmin_favorites 0.1.1 → 0.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9c52fa8f127b186b02bab3ea8dbb27534a1cec621540c9e7856795f7d4353226
4
- data.tar.gz: 3cd3a3248cd4c416229b1dfc6051fc478de502ad1366a6c8342a1c40cfa7a2bb
3
+ metadata.gz: 9c67d1a6f05368e22d06b4b985c4357694ba08f5749c6cf267038eb10425c488
4
+ data.tar.gz: b547dc6d6c7bd68827cc822d91aa7714db18263720578e27e62c036627c986b2
5
5
  SHA512:
6
- metadata.gz: 63de9c366a211be6786a74d5dc3716e1873bff84ecdeaae074c6247cc3414597750a4aaf5031e4bee55e7d86522c24a73313739382ecdabe1e190e1aaff49a71
7
- data.tar.gz: 24c4a24fd86f690651b9b3c608c381ca2f32221d4e3852380a94d97ffa3bef7403dd6c04c1feb1de66d8c1591e2b29e6e9557d31e09165611529f22806b0ed1d
6
+ metadata.gz: e450a4e628623508e8a7d3901c6b2545e77090eda375d1bc8c08cad02fa0cb3354cfeec5b3667f4dc66e2f195bd7c86b1213d12e219e94cb9862bb1da55a4135
7
+ data.tar.gz: b82f99015445ec3a636077b28a1699e0b26d2ed148b66141f9f249f28382f9b5b7956c6ffe1c394468e59841188001e4bbd5b73e3485eb9aae8308ccea4154c8
data/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 0.1.3 (2026-10-13)
4
+
5
+ - Fix favorites index kind tabs so they render as links instead of raw kind list text.
6
+
7
+ ## 0.1.2 (2026-10-07)
8
+
9
+ - Show Favorites as the favorites index heading from the gem locale.
10
+ - Mount view lens preference actions at `/admin/view_lens_preferences`.
11
+
3
12
  ## 0.1.1 (2026-09-07)
4
13
 
5
14
  - Keep favorites registration working after ActiveAdmin reload when a custom page is already registered.
@@ -13,9 +13,9 @@
13
13
  data-<%= stimulus_controller %>-path-value="<%= request.path %>"
14
14
  data-<%= stimulus_controller %>-catalog-element-id-value="<%= catalog_element_id %>"
15
15
  data-<%= stimulus_controller %>-hidden-value="<%= hidden.to_json %>"
16
- data-<%= stimulus_controller %>-update-url-value="<%= admin_viewlenspreferences_update_path %>"
17
- data-<%= stimulus_controller %>-reset-url-value="<%= admin_viewlenspreferences_reset_path %>"
18
- data-<%= stimulus_controller %>-save-lens-url-value="<%= admin_viewlenspreferences_save_lens_favorite_path %>"
16
+ data-<%= stimulus_controller %>-update-url-value="<%= admin_view_lens_preferences_update_path %>"
17
+ data-<%= stimulus_controller %>-reset-url-value="<%= admin_view_lens_preferences_reset_path %>"
18
+ data-<%= stimulus_controller %>-save-lens-url-value="<%= admin_view_lens_preferences_save_lens_favorite_path %>"
19
19
  data-<%= stimulus_controller %>-favorites-url-value="<%= admin_favorites_path %>"
20
20
  data-<%= stimulus_controller %>-group-labels-value="<%= {
21
21
  columns: t("active_admin.favorites.groups.columns", default: "Columns"),
@@ -13,6 +13,7 @@ en:
13
13
  macros_json_invalid: Macros JSON is invalid
14
14
  macros_panel: Dynamic filters
15
15
  menu: Favorites
16
+ title: Favorites
16
17
  no_detected_ranges: No date range filters detected in the current view. Use advanced macros if needed.
17
18
  open: Open
18
19
  published: Published for everyone
@@ -8,6 +8,8 @@ en:
8
8
  favorites:
9
9
  add_to_favorites: Add to favorites
10
10
  personalize_page: Personalize page
11
+ menu: Favorites
12
+ title: Favorites
11
13
  hub_title: Favorites
12
14
  filters_tab: Filters
13
15
  lens_tab: Layout
@@ -186,12 +186,12 @@ module ActiveAdmin
186
186
 
187
187
  index title: proc { I18n.t("active_admin.favorites.title") } do
188
188
  nav class: "flex flex-wrap gap-3 mb-4", "aria-label": I18n.t("active_admin.favorites.kind_navigation") do
189
- link_to I18n.t("active_admin.favorites.kinds.all"),
190
- admin_favorites_path,
189
+ a I18n.t("active_admin.favorites.kinds.all"),
190
+ href: admin_favorites_path,
191
191
  class: favorites_kind_tab_active?(nil) ? "font-semibold underline" : "text-gray-600 dark:text-gray-300"
192
192
  Favorite::KINDS.each do |kind|
193
- link_to I18n.t("active_admin.favorites.kinds.#{kind}"),
194
- admin_favorites_path(kind: kind),
193
+ a I18n.t("active_admin.favorites.kinds.#{kind}"),
194
+ href: admin_favorites_path(kind: kind),
195
195
  class: favorites_kind_tab_active?(kind) ? "font-semibold underline" : "text-gray-600 dark:text-gray-300"
196
196
  end
197
197
  end
@@ -3,7 +3,9 @@
3
3
  module ActiveAdmin
4
4
  module Favorites
5
5
  module RegisterViewLensPreferences
6
- PAGE_NAME = "ViewLensPreferences"
6
+ # Spaced name so ActiveAdmin parameterize.underscore yields view_lens_preferences.
7
+ # options[:as] does not change Page routes in ActiveAdmin 4.
8
+ PAGE_NAME = "View Lens Preferences"
7
9
 
8
10
  module_function
9
11
 
@@ -24,7 +26,7 @@ module ActiveAdmin
24
26
  def call
25
27
  return if page_registered?
26
28
 
27
- ActiveAdmin.register_page PAGE_NAME, as: "view_lens_preferences" do
29
+ ActiveAdmin.register_page PAGE_NAME do
28
30
  menu false
29
31
 
30
32
  controller do
@@ -2,6 +2,6 @@
2
2
 
3
3
  module ActiveAdmin
4
4
  module Favorites
5
- VERSION = "0.1.1"
5
+ VERSION = "0.1.3"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activeadmin_favorites
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrei Makarov