Repository navigation
3.1.1: a sort marker you can read, and guards that actually guard - #59
Merged
Merged
Conversation
A review of 3.1.0 found that several of the checks added alongside it were quiet rather than wrong, and that one visual change lost information. Six fixes, each reproduced before and after. ## Unsorted and descending looked the same ActiveAdmin's sprite had three glyphs: a double arrow for sortable-but-unsorted, up for ascending, down for descending. The replacement drew the same down triangle for unsorted and descending, separated only by 0.6 against 1.0 opacity on an 8x4 shape — so a freshly loaded index showed every heading pointing down. Three shapes again, drawn as masks in currentColor like the theme switch icons, so they still follow the heading colour into dark mode. ## The type guards for the new palette were never tested Removing all five $skinStatusTag*Color entries from the colour guard left `rake css` green: the one BAD fixture passed because `none` crashes mix() inside the theme, not because the guard fired. A rejection whose message names gem internals is exactly what the guards exist to replace. The BAD check now requires the message to name the variable the fixture set, and there is a fixture per variable rather than one for five. With the guards deleted it fails five times over, naming each. ## An example that failed the contract beside it GOOD["status tags recoloured"] paired $skinStatusTagTextColor: #f5f5f5 with fills left at their defaults, giving 4.17 to 4.19:1 on four of the five — under the 4.5:1 the guard two screens away enforces. The contrast guard only ever compiles the defaults, so it could not see its own neighbour. ## Checks that hid each other The contrast and README checks sat behind `if failures.empty?`, and the first aborted before the second ran. A run could report one problem while holding three, and each fix revealed the next. They are collected and reported together now. For the same reason a single translucent fill no longer returns early and hides the other four, and the label is no longer reported as a tag named "label". ## Two lists that drift TAG_COLOURS was five names typed out by hand — the drift DECLARED_ROWS was deleted for. It is read from the stylesheet, so a sixth tag colour cannot be silently exempt. And the !default scanner had no comment awareness, so a note like `// was: $skinStatusTagOkColor: #8daa92!default;` failed the build twice over, blaming the live declaration. ## Smaller * ActiveAdmin's sprite is cleared from every anchor in a sortable heading, not only the one the theme marks. An application's own link kept the PNG and the 13px indent it needs. * $skinTableHeaderTextColorDark derives from $skinTextColorDark, matching its light twin and the sentence the README already carried. It was a literal that happens to equal it today.
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.
A review of 3.1.0 turned up that several of the checks shipped alongside it were quiet rather than wrong, and that one visual change lost information. Six fixes, each reproduced before and after.
Unsorted and descending looked the same
ActiveAdmin's sprite carries three glyphs — a double arrow for sortable-but-unsorted, up for ascending, down for descending. The replacement in 3.1.0 drew the same down triangle for unsorted and descending, separated only by
0.6against1.0opacity on an 8×4 shape. On a freshly loaded index every heading pointed down.Three shapes again, drawn as masks in
currentColorlike the theme switch icons, so they still follow the heading colour into dark mode.The type guards for the new palette were never tested
Deleting all five
$skinStatusTag*Colorentries from the colour guard map leftrake cssgreen. The single BAD fixture passed becausenonecrashesmix()inside the theme, not because the guard fired — and a rejection readingis exactly what the guards exist to replace: it names gem internals, not the variable the host set.
The BAD check now requires the message to name that variable, and there is a fixture per variable rather than one standing in for five. With the guards deleted it fails five times over, naming each.
An example that failed the contract beside it
GOOD["status tags recoloured"]paired$skinStatusTagTextColor: #f5f5f5with the other four fills left at their defaults:Under the 4.5:1 the contrast guard two screens away enforces. That guard only ever compiles the defaults, so it could not see its own neighbour. The example is now a palette that passes.
Checks that hid each other
The contrast and README checks sat behind
if failures.empty?, and the first aborted before the second ran — so a run could report one problem while holding three, and each fix revealed the next. Reproduced with a lightened fill and an unrelated nav rule: only the nav failure printed.They are collected and reported together now. For the same reason a single translucent fill no longer returns early and hides the other four, and
$skinStatusTagTextColoris no longer reported as a tag namedlabel.Two lists that drift
TAG_COLOURSwas five names typed out by hand — the same driftDECLARED_ROWSwas deleted for. It is read from the stylesheet now, so a sixth tag colour cannot be silently exempt from the contrast check.The
!defaultscanner had no comment awareness. A note like// was: $skinStatusTagOkColor: #8daa92!default;above the live declaration failed the build twice over, both messages blaming the live one.Smaller
$skinTableHeaderTextColorDarkderives from$skinTextColorDark, matching its light twin and the sentence the README already carried. It was a literal that happens to equal it today, so the asymmetry would have surfaced only once someone overrode the body colour.Left for a minor
Two findings change how the theme looks and do not belong in a patch:
Both want new
…Darkvariants or a retune, which is additive. Neither affects the label contrast this release is built on.