Repository navigation
Theme 4.0.0.beta3: dropdown fix, sticky table header, row click, comments in tabs - #84
Merged
Merged
Conversation
Co-Authored-By: Clanker
Page objects 2.0.0.beta2 calls reveal_comments after the reload; the theme selects each hidden tab around the comments, outermost first, and does nothing when they already show. Co-Authored-By: Clanker
The first header row of an index table stays under the top bar from 768px up, as in v3. ActiveAdminTheme.sticky_table_header turns it off, and skip-sticky-headers and with-sticky-headers keep the v3 classes. A with-sticky-headers table in a panel or tab widens the page instead of scrolling inside its box, which would hold the header. Co-Authored-By: Clanker
A panel or a tab scrolls sideways on its own, as in beta2, so with-sticky-headers does nothing there and the page does not widen. Co-Authored-By: Clanker
On a wide-table index the title bar is sticky, which makes it a stacking context with z-index auto, so the toolbar below took the clicks meant for its dropdown items. Regression from 4.0.0.beta2. Co-Authored-By: Clanker
ActiveAdmin 4 colors a row as selected only from the select-all box, so a checked box now colors its own row. row_click_selects = false keeps v3. Co-Authored-By: Clanker
Co-Authored-By: Clanker
There was a problem hiding this comment.
🟡 Changes recommended
Row-cell deselection leaves stale selection highlighting, and flash messages can obscure title-bar dropdowns and prevent clicks.
2 open issues
What changed in this PR
Prepares theme 4.0.0.beta3 with index-table improvements and support for comments inside tabs.
Changes:
- Adjusts dropdown stacking and adds configurable sticky headers and row selection.
- Reveals comments inside nested tabs through page objects.
- Adds regression tests and updates release documentation.
| File | Description |
|---|---|
| test/page_objects_helper.rb | Adds the tabbed-comments page object. |
| test/page_objects_components_test.rb | Tests revealing nested-tab comments. |
| test/layout_test.rb | Tests dropdowns, sticky headers, and row selection. |
| test/dummy/app/admin/wide_table.rb | Adds a panel-contained table fixture. |
| test/dummy/app/admin/tabs_demo.rb | Adds nested-tab comments markup. |
| test/dummy/app/admin/menu_orders.rb | Adds an index dropdown fixture. |
| README.md | Documents new settings and beta3 installation. |
| lib/active_admin_theme/version.rb | Sets the beta3 version. |
| lib/active_admin_theme/page_objects/tabs.rb | Reveals tabs containing comments. |
| lib/active_admin_theme.rb | Adds header and row-click settings. |
| Gemfile | Updates the page-objects test dependency. |
| docs/migrating-from-v3.md | Updates installation and row-click guidance. |
| app/views/active_admin/_page_content.html.erb | Exposes settings through data attributes. |
| app/tailwind/active_admin_theme.css | Styles sticky headers, dropdown stacking, and selected rows. |
| app/javascript/active_admin_theme/table_crisscross.js | Makes row checkbox toggling configurable. |
Review effort: Balanced (adaptive)
On an index page the flashes shared the title bar's z-index and took its dropdown's clicks. ActiveAdmin clears a row's selected class only from the select-all box. A table in an index cell matched the sticky header selector. Co-Authored-By: Clanker
The sticky title bar's stacking context held an open confirm_dialog under Flowbite's body-level backdrop, so its buttons took no clicks. Since beta2. Co-Authored-By: Clanker
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Theme 4.0.0.beta3: fixes and features after beta2. The last commit sets the version, and v4.0.0.beta3 is tagged on the merge commit as a GitHub pre-release.
confirm_dialogopened from an index page's action items sat under Flowbite's body-level backdrop. While such a dialog is open, the title bar drops its stacking context.ActiveAdminTheme.sticky_table_header = falseturns it off, andskip-sticky-headersopts one index out.with-sticky-headersopts in a table outside a panel or tab; panels and tabs keep their own scroll, as in beta2.ActiveAdminTheme.row_click_selects = falsekeeps the v3 click.reveal_commentsto select each tab around the comments. Tests pin page objectsv2.0.0.beta2.Checked with
bundle exec rake testagainst ActiveAdmin 4.0.0.beta23 and the layout-hooks branch: 419 runs each, no failures. Each new test fails without its change.