Repository navigation
fix(ui): design revision — highlight contrast, ActionRow captions, list rows, filter behaviour - #175
Merged
Merged
Conversation
The highlighted (active-filter) state painted body text on a tinted surface at 3.09:1 in the light theme — under the 4.5:1 WCAG AA floor, with a highlighted ToggleGroup's day letters the worst case. Move the surface one step lighter and the text one step darker: 3.09 -> 7.30 light, 7.57 -> 12.36 dark. bg-primary-3 -> bg-primary-2 tinted surface text-primary-11 -> text-primary-12 label on it hover:bg-primary-4 -> hover:bg-primary-3 bg-primary-6 -> bg-primary-5 switch / slider track Expressed in ramp STEPS, not colours, so it holds for every tenant: the brand ramps are generated at runtime from a fixed lightness ladder, and only the hue and saturation come from the client's seed. Borders and the selected `data-[state=on]` fills are deliberately untouched, as is `bg-primary-3` wherever it is the `flat` variant of Button / Chip / Alert or the list row's press state — same step, different role, and changing it there would be a regression. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
The caption under each circle was pinned to `text-primary-12 dark:text-primary-11` in the slot recipe while the circle beside it took its role from `controlSurface` — so every non-primary circle wore a primary word. Visible sixteen times over in the story's colour x variant matrix, where all four rows rendered primary captions. `color` now drives a variant on the recipe. It defaults to `primary`, so every existing call site renders exactly as before. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Both were unstyled and inherited the row's default foreground — the same weight as the title, which flattened the row. Step them down, and not to the same place: the count is still information (gray-10), the chevron only restates what tapping the row already does (gray-9). The title keeps `text-foreground` and stays the loudest thing in the row. `ListItem` is the sole owner of this markup — Countries and Region consume it rather than re-implementing it — so there is nothing to de-duplicate and no other use of `text-end` or `text-xl` is touched. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Two fixes in the filter form.
**Deselect.** Format and Frequency could be set but not un-set from the control
itself — the only two filters with that hole. Radix's single-select already fires
`onValueChange('')` on `onItemDeactivate` when you press the item that is on, so
the capability was always there; a `next && patch(...)` truthiness guard swallowed
the empty string. Map it to the `'any'` sentinel the URL codec omits. The file's
own comment already described deselect-to-clear as the intended design.
**The label row no longer jumps.** The row is `items-baseline` and its two
children have different line boxes — the label is `text-sm` (19.5px), "Clear" is
`text-xs` (~20px) — so mounting Clear on selection grew the row and pushed every
section below it down the page. Clear is now hidden rather than unmounted, so it
holds its space in the flex layout and the row's height cannot change. Measured
in Chrome: all six rows sit at exactly 20px and no section's top moves by any
amount, in either direction.
Reserving the space is deterministic where pinning a measured pixel height is not
— it survives a font change and a translation that wraps — and `visibility:
hidden` also takes the button out of the tab order and the accessibility tree, so
a hidden control is never reachable.
The layout fix lives in the shared `FilterGroup`, so it also covers the Date,
Language and Region groups. Their controls are untouched.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
This was referenced Aug 28, 2026
Deploying sahajatlas-design with
|
| Latest commit: |
ca530b6
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://7e46395a.sahajatlas-design.pages.dev |
| Branch Preview URL: | https://feat-design-tokens-retune.sahajatlas-design.pages.dev |
Deploying sahajatlas with
|
| Latest commit: |
ca530b6
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://bbcf3430.sahajatlas.pages.dev |
| Branch Preview URL: | https://feat-design-tokens-retune.sahajatlas.pages.dev |
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.
First of three PRs from a designer's revision pass. Stacked: #2 (typeface) is based on this branch, #3 (icons) on that.
Four independent items, one commit each.
001 · Highlight retune
The highlighted (active-filter) state painted body text on a tinted surface at 3.09:1 in the light theme — under the 4.5:1 WCAG AA floor, with a highlighted ToggleGroup's day letters the worst case.
bg-primary-3bg-primary-2text-primary-11text-primary-12hover:bg-primary-4hover:bg-primary-3bg-primary-6bg-primary-5Measured: 3.09 → 7.30 light, 7.57 → 12.36 dark. Expressed in ramp steps, not colours, so it holds for every tenant — the brand ramps are generated at runtime from a fixed lightness ladder and only hue/saturation come from the client's seed.
Borders and the selected
data-[state=on]fills are untouched. So isbg-primary-3wherever it is theflatvariant of Button/Chip/Alert or the list row's press state — same step, different role. Verified in the browser that Button flat and Chip did not move.⚠ The brief listed ten atoms taking
highlight; there are eight. There is noSwitchatom (it is anappearanceonCheckbox) and noRadioatom (onlyRadioGroup).004 · ActionRow captions follow the colour prop
The caption was pinned to
text-primary-12 dark:text-primary-11in the slot recipe while the circle beside it took its role fromcontrolSurface— so every non-primary circle wore a primary word. All sixteen cells of the story's colour × variant matrix rendered primary captions; they now resolve to four distinct colours, one per row.colordefaults toprimary, so every existing call site is unmoved.005 · List row counter and chevron
Both were unstyled and inherited the row's foreground — the same weight as the title. Stepped down, and not to the same place: the count is still information (
text-gray-10), the chevron only restates what tapping the row does (text-gray-9). Measured luminance: title0.0144< count0.227< chevron0.2664.ListItemis the sole owner of that markup — Countries and Region consume it — so nothing needed de-duplicating and no other use oftext-end/text-xlis touched.006 · Filter view interactivity
⚠ Most of what the brief reported was already true. The Filter view is a real filter: it holds a draft seeded from the URL and the per-group Clear links are already conditional. The pre-selected state the designer saw is
FilterView.stories.tsx, which deliberately seeds a dirty draft. Two things genuinely were broken:Deselect. Format and Frequency could be set but not un-set from the control — the only two filters with that hole. Radix already fires
onValueChange('')ononItemDeactivate; anext && patch(…)truthiness guard swallowed the empty string. Mapped to the'any'sentinel the URL codec omits. The file's own comment already described deselect-to-clear as the intended design.The row jump. Real, and measured. The label row is
items-baselinewith different line boxes (text-sm19.5px vstext-xs~20px), so mounting Clear grew the row and pushed every section below it down.Fixed by reserving the space — Clear is hidden, never unmounted — rather than pinning a measured pixel height. Deterministic, survives the typeface change in the next PR and a translation that wraps, and
visibility: hiddenalso takes the button out of the tab order and the accessibility tree.Verified in Chrome with
getBoundingClientRect()before/after, as the brief asked: all six rows at exactly 20px, and no section's top moves by any amount, in either direction.The layout fix lives in the shared
FilterGroup, so it also covers the Date, Language and Region groups — wider than the brief's stated scope, but a no-visual-change stabilisation. Their controls are untouched.Verification
lint·typecheck·test:run(1397) ·build·sizeall green. New specs were each confirmed to fail against the reintroduced defect at its real site before being kept — including de-vacuuming two assertions that initially passed for the wrong reason on an empty list.Browser-verified in Ladle: Checkbox in all five states, the day-picker ToggleGroup, the ActionRow matrix, List/ListItem, and Button + Chip to confirm they did not move.
🤖 Generated with Claude Code