Repository navigation
fix: make form errors and has_many headings readable - #79
Merged
Merged
Conversation
Form errors: the theme never coloured validation messages, so ActiveAdmin's #932419 text and #fae6e4 summary block carried over into dark mode: dark red messages on the dark panel and a pale block above the form. Add $skinErrorTextColor and $skinErrorBgColor with Dark variants. The light defaults are the values ActiveAdmin already paints, so light forms keep their look. Breadcrumbs: the colour was derived from $skinMainFirstColor, but the text sits on the title bar. Mix it from $skinTitleBarColor, the fill it is on. has_many headings: ActiveAdmin renders the container as an li when f.has_many is inside f.inputs and as a div otherwise. The old rule matched only the li, so the div kept ActiveAdmin's #5e6469. Both now use --aa-text-muted. css_check gives these pairs the contrast guard status tags already have, and rejects invalid values for the new variables. Claude-Session: https://claude.ai/code/session_01TXyspr287VnxtQEFUec2t3
There was a problem hiding this comment.
🟡 Changes recommended
The contrast check can falsely pass invisible transparent text, and the breadcrumb styling produces unreadable white-on-white text with the documented light title-bar override.
2 open issues
What changed in this PR
This PR improves readability in the ActiveAdmin theme by adding mode-aware validation colours and updating breadcrumbs and nested-form headings.
Changes:
- Add light and dark error colours, CSS custom properties, and input validation.
- Adjust breadcrumb colours and style both
has_manycontainer variants. - Add contrast checks and document the new variables with colour swatches.
| File | Description |
|---|---|
test/css_check.rb |
Adds invalid-colour cases and message contrast checks. |
README.md |
Documents validation text and summary colours. |
docs/swatches/fae6e4.svg |
Adds the light error-summary background swatch. |
docs/swatches/932419.svg |
Adds the light validation-text swatch. |
docs/swatches/3a2224.svg |
Adds the dark error-summary background swatch. |
app/assets/stylesheets/wigu/active_admin_theme.scss |
Defines error colours and updates validation, breadcrumb, and heading styles. |
Review effort: Balanced
Mixing the breadcrumb from $skinTitleBarColor only toward white made it white on a white title bar. Go back to the colour master ships, and drop the breadcrumb from the contrast guard, which that colour does not pass. messages_are_readable dropped alpha, so a transparent colour scored as black and could pass. Read it and report translucent pairs, as status_tag_labels_are_readable does. Claude-Session: https://claude.ai/code/session_01TXyspr287VnxtQEFUec2t3
senid231
approved these changes
Nov 5, 2026
Merged
senid231
added a commit
that referenced
this pull request
Nov 5, 2026
Minor: #79 adds public SCSS variables for validation errors, so this is new API, not only a fix. Light forms keep their look. 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.

Problem
Form errors in dark mode. The theme never coloured validation messages, so
ActiveAdmin's
#932419text and#fae6e4summary block carried over into darkmode: the message under a field was dark red on the dark panel, and the summary
was a pale block above the form.
has_manyheadings. ActiveAdmin renders the container as anliwhenf.has_manyis insidef.inputsand as adivotherwise. The theme's rulematched only the
li, so thedivkept ActiveAdmin's#5e6469, which is dim onthe dark page. The
liheading's fixed#8494a8was pale on the light page.Fix
$skinErrorTextColorand$skinErrorBgColorwith Dark variants, exposed as--aa-errorand--aa-error-bg. The light defaults are the values ActiveAdminalready paints, so light forms keep their look.
has_manycontainers with--aa-text-muted.test/css_check.rb, reject invalid values for the new variables, and add themto the README table.
Visible changes in light mode
Light forms are unchanged, but
has_manyheadings are not: theliheading getsdarker, and the
divheading gets slightly lighter.Measured
test/dummyat 1200px, computed colours, contrast against the fill in brackets:#25292f#932419(1.74)#f49b9b(6.97)#932419on#fae6e4#f49b9bon#3a2224(6.98)has_manyheading,div, on#161a1e#5e6469(2.92)#b0b8c2(8.73)has_manyheading,li, on#161a1e#8494a8(5.65)#b0b8c2(8.73)has_manyheading,div, on#f7f9fb#5e6469(5.68)#6b7177(4.68)has_manyheading,li, on#f7f9fb#8494a8(2.93)#6b7177(4.68)The
has_manymarkup on the test page was written by hand fromHasManyBuilder.