Skip to content

Fixes from theme 4 beta on staging - #82

Merged
senid231 merged 15 commits into
activeadmin-plugins:masterfrom
senid231:staging-fixes
Dec 3, 2026
Merged

senid231 merged 15 commits into
activeadmin-plugins:masterfrom
senid231:staging-fixes

Conversation

@senid231

@senid231 senid231 commented Dec 2, 2026 •

Copy link
Copy Markdown
Member

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 #bbb and read almost like a real value. In light mode, ActiveAdmin's gray-400/50 was barely readable (1.55:1). EMPTY is now dimmer than values but readable in both modes:

Mode Color Contrast on the panel Values
Light #8f969e 3.0:1 12.4:1
Dark #8a929c 4.6:1 11.2:1

Wide table_for in a tab

A table_for scrolled sideways only when it sat directly in a panel body. Inside tabs, 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 div on 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 a div of Devise links. The rule now boxes the div that holds the h2 title. The stock card gets the theme surface and border (maintainer-approved), and theme 3 style #login cards look as before.

Header and top menu

  • The header's bottom line is a real border inside its 40px height. The old inset shadow painted under the full-height menu links, so a hovered link's highlight covered it.
  • Top-menu dropdowns open and close on hover at once, as in v3, instead of Flowbite's 100 ms delay each way. Keyboard focus opens them too.

Index pages

  • With batch actions that display_if hides 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 copy index.html.arb.
  • Sort arrows use the muted text color, so they read apart from the column title.
  • From 768px up, a wide index table widens the page and the window scrolls sideways, as in v3. The header, title bar, flashes and footer stay at the viewport width. Show pages, custom pages and table_for keep their own scroll, and so do narrower screens.
  • With the sidebar open, the collapse tab sits against the sidebar with about 14px before the page, as in v3; it was 4px. Collapsed and sidebar-less pages keep their spacing.

Attributes tables and the page banner

  • A long pre in 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. A pre_wrap with its own max_height: keeps it.
  • An empty active_admin/_page_banner partial 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-button class and a new aat-button class now give the theme button look anywhere, and aat-button-secondary the plain variant. The README documents them.

Confirm dialog page object waits for enabled buttons

ConfirmDialog#confirm and #cancel clicked 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.beta1 tag, and theme 3 as 3.3.0 from RubyGems with its v3.3.0 README. Theme 3 fixes go to the new 3.x branch, which starts at v3.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 test with 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_preview page with the logged-out layout, and a QuietOrder resource with hidden batch actions and a form sidebar.

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

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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)

Comment thread app/tailwind/active_admin_theme.css Resolved
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
@senid231 senid231 closed this Dec 3, 2026
@senid231 senid231 reopened this Dec 3, 2026
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
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
@senid231 senid231 self-assigned this Dec 3, 2026
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
@senid231
senid231 merged commit 330a480 into activeadmin-plugins:master Dec 3, 2026
3 checks passed
@senid231
senid231 deleted the staging-fixes branch December 3, 2026 15:19
@senid231 senid231 mentioned this pull request Dec 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants