Repository navigation
Fixes from theme 4 beta on staging - #82
Merged
Merged
Conversation
In dark mode the v3 #bbb read almost like a value; in light mode ActiveAdmin's gray-400/50 was barely readable. #8a929c (4.6:1) and #8f969e (about 3:1) keep EMPTY readable and clearly dimmer than values. Co-Authored-By: Clanker
A table_for scrolled only when it sat right in a panel body; in a tab it ran past the panel and widened the page. Co-Authored-By: Clanker
There was a problem hiding this comment.
🟡 Changes recommended
A moderate active accessibility issue remains: the light-mode EMPTY marker has insufficient contrast for regular text and needs a darker color plus an updated assertion.
1 open issue
What changed in this PR
Improves theme 4 beta styling and regression coverage for readable EMPTY placeholders and horizontally scrollable tables inside tabs.
Changes:
- Adjusts EMPTY colors for light and dark modes.
- Adds horizontal overflow handling for tables within tab panels.
- Adds demo content and browser tests for both behaviors.
| File | Description |
|---|---|
| test/form_look_test.rb | Tests EMPTY color contrast in light and dark modes. |
| test/dummy/app/admin/components_demo.rb | Adds a wide table inside tabs to the demo page. |
| test/components_test.rb | Verifies that tab-contained tables scroll without widening the page. |
| app/tailwind/active_admin_theme.css | Updates EMPTY colors and tab-panel overflow styling. |
Review effort: Lite (adaptive)
The README and the migration guide pointed to a 3.x branch that exists only on a fork. Theme 3 is 3.3.0 on RubyGems, documented at the v3.3.0 tag. Co-Authored-By: Clanker
Co-Authored-By: Clanker
A dialog can enable OK only after async content loads, and a click on the disabled button did nothing. Co-Authored-By: Clanker
The old rule boxed every childless div, so an app's empty wrapper showed as a 2px square, and it missed ActiveAdmin's stock card, which has a links div. Co-Authored-By: Clanker
The inset shadow painted under the full-height menu links, so a hovered link's highlight covered the line. Co-Authored-By: Clanker
ActiveAdmin renders the toolbar whenever a resource has batch actions, even when display_if hides them all, so its margin pushed the table below the sidebar top. CSS keeps the theme from copying index.html.arb. Co-Authored-By: Clanker
Flowbite's hover trigger opened and closed each dropdown 100 ms late. CSS :hover opens it at once, as in v3, and keyboard focus opens it too. Co-Authored-By: Clanker
Co-Authored-By: Clanker
The tab sat 4px from the table. With the sidebar open it now sits against the sidebar with about 14px before the page; collapsed, nothing changes. Co-Authored-By: Clanker
The theme styled buttons only in the action items and in Formtastic forms, so a button in a panel or a hand-written form kept ActiveAdmin's look. Co-Authored-By: Clanker
From 768px up, the page takes the table's width and the window scrolls, while the header, title bar, flashes and footer stay at the viewport width. Narrower screens, show pages and table_for keep their own scroll. Co-Authored-By: Clanker
An app overrides it to show a band on every logged-in page, such as the environment name, without copying _flash_messages. Co-Authored-By: Clanker
Capped at --aat-attributes-pre-max-height, 24rem by default, so a many-line value no longer stretches the row past the screen. Co-Authored-By: Clanker
Merged
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.

Fixes found while running theme 4.0.0.beta1 on a production app's staging. This PR collects further findings until it is merged.
EMPTY placeholder in attributes tables
In dark mode, EMPTY was
#bbband read almost like a real value. In light mode, ActiveAdmin'sgray-400/50was barely readable (1.55:1). EMPTY is now dimmer than values but readable in both modes:#8f969e#8a929cWide
table_forin a tabA
table_forscrolled sideways only when it sat directly in a panel body. Insidetabs, a wide table ran past the panel's right edge and widened the page. A tab panel that holds a table now scrolls too. Theme 3 had no such rule because its table cells wrapped.Login card
The login rule boxed every childless
divon the login page, so an app's empty wrapper, such as an empty flash container, showed as a 2px square. It also missed ActiveAdmin's stock login card, because that card holds adivof Devise links. The rule now boxes thedivthat holds theh2title. The stock card gets the theme surface and border (maintainer-approved), and theme 3 style#logincards look as before.Header and top menu
Index pages
display_ifhides and no scopes, ActiveAdmin still renders an empty toolbar, whose margin pushed the table below the sidebar top. CSS hides an empty toolbar, so the theme doesn't copyindex.html.arb.table_forkeep their own scroll, and so do narrower screens.Attributes tables and the page banner
prein an attributes table cell is capped at--aat-attributes-pre-max-height(24rem) and scrolls, so a many-line value doesn't stretch the row past the screen. Apre_wrapwith its ownmax_height:keeps it.active_admin/_page_bannerpartial renders below the flashes on logged-in pages. An app overrides it to show a band, such as the environment name, without copying_flash_messages.Buttons anywhere
The theme styled buttons only in the action items and Formtastic forms. ActiveAdmin's
action-item-buttonclass and a newaat-buttonclass now give the theme button look anywhere, andaat-button-secondarythe plain variant. The README documents them.Confirm dialog page object waits for enabled buttons
ConfirmDialog#confirmand#cancelclicked their buttons right away. A dialog that enables OK only after async content loads got a click on a disabled button, which did nothing. Both now wait for a visible, enabled button.Where to find theme 3
The README now has a short ActiveAdmin 3 versus 4 table: theme 4 from the
v4.0.0.beta1tag, and theme 3 as 3.3.0 from RubyGems with its v3.3.0 README. Theme 3 fixes go to the new3.xbranch, which starts atv3.3.0; the migration guide says so too.Open questions
Batch action confirms use the browser's native dialog in ActiveAdmin 4; theme 3 had an in-page modal. Option A (a theme modal for batch actions only) and option B (a theme modal for every
data-confirm) wait for maintainer feedback.Verification
bundle exec rake testwith stock ActiveAdmin and with the proposed ActiveAdmin hooks. New tests check the EMPTY color and contrast in both modes, that the login card gets the box and an empty wrapper does not, that the confirm dialog page object waits for disabled buttons, and that a 20-column table in a tab scrolls inside the tab without widening the page. New tests also cover each item above. The dummy app adds a "Table in tabs" panel and a "Buttons" panel on the components page, a/login_previewpage with the logged-out layout, and aQuietOrderresource with hidden batch actions and a form sidebar.