Skip to content

Fixes from theme 4 beta on staging - #82

Open
senid231 wants to merge 4 commits into
activeadmin-plugins:masterfrom
senid231:staging-fixes
Open

senid231 wants to merge 4 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.

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, and that a 20-column table in a tab scrolls inside the tab without widening the page. The dummy app has a "Table in tabs" panel on the components page.

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 on lines +703 to +704
.attributes-table-empty-value {
color: #8f969e;

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is deliberate. EMPTY is a placeholder for a missing value, so it has to read as dimmer than real values. #8f969e is 2.99:1 on white, right at the 3:1 AA level for large text, and keeps EMPTY clearly apart from values (12.4:1). The 4.5:1 alternative, #6b7177 (4.9:1), made EMPTY look like a value. Leaving this open for maintainers to weigh in.

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