You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rewrites the plugin for ActiveAdmin 4 and drops ActiveAdmin 3. The jQuery plugin becomes a plain ES module with plain CSS (dark mode on .dark). Hiding filters per page, reset, and opt-in drag-and-drop ordering all stay. Gemspec: activeadmin >= 4.0.0.beta1, < 5.0.0.a.
Branched from #7, whose two commits show here until it merges. Release #7 as 1.3.0 first, then this as 2.0.0 (major).
The toggle goes into the visible header: h3.filters-form-title on stock, or the .panel-title when the section is wrapped in a panel (active_admin_theme 4). The theme's collapse button lives in the page heading, so they do not clash.
State is keyed by wrapper id, not label text. 1.x state is not carried over; the README lists the breaking changes.
data-filters-visibility-* hooks on all added markup.
CI runs stock and theme (git dependency in a test gemfile).
Verified: 9 specs pass on Rails 8.0 and 8.1, ActiveAdmin 4.0.0.beta23, stock and with the theme.
Ransack 6 raises when a model does not define ransackable_associations,
so every spec failed once bundler resolved ransack 6.1.0.
Co-Authored-By: Clanker
RubyGems sorts 4.0.0.beta23 below 4.0, so "< 4.0" let bundler pick an
ActiveAdmin 4 beta, which this jQuery plugin does not support.
Co-Authored-By: Clanker
ActiveAdmin 4 ships no jQuery or Sprockets, and its filters sidebar has
new markup. The module is pinned into ActiveAdmin.importmap, the styles
are plain CSS for the host's Tailwind build, and ActiveAdmin 3 support
is dropped (1.x keeps it).
Co-Authored-By: Clanker
The dummy app is committed instead of generated with rails new. A second
gemfile runs the same specs with active_admin_theme 4, which moves the
filters title into a panel header.
Co-Authored-By: Clanker
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
The dependency bound admits unsupported ActiveAdmin 5 prereleases, while filter detection can hide populated textareas and bypass custom select/boolean overrides.
Migrates the filters visibility plugin to ActiveAdmin 4, replacing jQuery with an ES module and plain CSS while preserving per-page visibility, reset, and optional ordering.
Changes:
Adds import-map integration, configurable module exports, and dark-mode styles.
Documents installation and breaking changes for the planned 2.0 release.
Replaces the generated test app with a committed dummy app and tests stock and themed layouts in CI.
File
Description
tasks/test.rake
Removes generated test-app setup.
spec/support/tailwind.rb
Builds dummy styles with optional theme support.
spec/support/schema.rb
Defines the test database schema.
spec/support/rails_template.rb
Removes the legacy Rails app template.
spec/support/capybara.rb
Uses Puma and Cuprite by default.
spec/support/admin.rb
Removes dynamic resource registration.
spec/spec_helper.rb
Boots the committed dummy app and configures cleanup.
spec/filters_visibility_spec.rb
Covers visibility, persistence, ordering, reset, and layouts.
Textareas and checked empty-value radios now count correctly, the
dependency excludes ActiveAdmin 5 prereleases, and javascript_modules is
only extended when the module is pinned. Specs cover a registered
detector and dropping a filter below its target.
Co-Authored-By: Clanker
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Filter reordering relies solely on native drag-and-drop, leaving keyboard-only users unable to change the order without accessible controls or an equivalent keyboard interaction.
When ordering is enabled, the rows are only made draggable, and the only reordering handlers are dragstart/drop. Native HTML drag-and-drop does not make these rows keyboard-operable, so keyboard-only users cannot change the filter order. Please provide keyboard-accessible move-up/move-down buttons or an equivalent keyboard interaction that uses the same rendering and persistence logic.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Filter reordering relies solely on drag events, leaving keyboard-only users unable to change the order without accessible move controls or equivalent keyboard interaction.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rewrites the plugin for ActiveAdmin 4 and drops ActiveAdmin 3. The jQuery plugin becomes a plain ES module with plain CSS (dark mode on
.dark). Hiding filters per page, reset, and opt-in drag-and-drop ordering all stay. Gemspec:activeadmin >= 4.0.0.beta1, < 5.0.0.a.Branched from #7, whose two commits show here until it merges. Release #7 as 1.3.0 first, then this as 2.0.0 (major).
Decisions:
ActiveAdmin.importmapand joinsjavascript_moduleswhen that setting exists (Add javascript_modules setting to import modules on every page activeadmin/activeadmin#9148). Otherwise hosts useActiveAdminTheme.javascriptsor an_html_headoverride. The CSS is imported into the host's Tailwind entry. The README covers both.h3.filters-form-titleon stock, or the.panel-titlewhen the section is wrapped in a panel (active_admin_theme 4). The theme's collapse button lives in the page heading, so they do not clash.data-filters-visibility-*hooks on all added markup.Verified: 9 specs pass on Rails 8.0 and 8.1, ActiveAdmin 4.0.0.beta23, stock and with the theme.