Repository navigation
Lighter lines: borders and dividers at 10% in light, 12% in dark - #2689
Conversation
Every line (`border`, `input`, `sidebar-border`) was the text color at 20% in light and 16% in dark, about 1.6:1 against a card. Cards and rows read heavy and boxed next to ChatGPT, Claude and Grok, whose lines are 4% to 10%. The lines are now 10% in light (about 1.25:1 on a card) and 12% in dark (about 1.4:1). All three stay at one strength. Controls whose edge is their only cue (checkbox, radio, the switch's knob) already draw it in `muted-foreground`, so they keep 3:1 or more. The scheme, every generated copy, the Desktop cover test, the look test and the rule text in app-guidelines.md and design-system.md change together.
davidmckayv
left a comment
There was a problem hiding this comment.
Approved. Token values changed only in tokens/src/scheme.ts and every copy is regenerated, with light and dark both and shadcn names intact. Contrast where an edge carries meaning (checkbox edge, unchecked switch knob, focus ring) is unchanged. Checked in Chromium and WebKit at 390, 1000 and 1440px. Merge first of the polish set.
|
Closing: we're keeping the line strength Guido set in #2124 (20% light, 16% dark). |
|
Reopened: closed by mistake. |
…n the docs The thumb was `border`, so lighter lines took it to about 1.25:1 and a list barely showed that it scrolls. It is `muted-foreground` now, 4.5:1 or more on every surface in light and dark, and ui-look-theme.test.ts holds it there. design-system.md, app-guidelines.md and the scheme's comment give a line's contrast for both themes: 1.25:1 on a card in light, 1.38:1 in dark.
The handle was `border`, so lighter lines took it to about 1.25:1, the same problem as the scrollbar's thumb. It is `muted-foreground` now, and the test that holds the thumb holds the handle too.
davidmckayv
left a comment
There was a problem hiding this comment.
Re-reviewed the design-check fixes at 7619796: diff, copy, and Chromium/WebKit light and dark at 390 and 1440px. Holds.
davidmckayv
left a comment
There was a problem hiding this comment.
Re-approved: since my last approval this push only merges main and drops the CHANGELOG.md edit (the note is in the description). Nothing else changed.
What this changes
Every line in the apps (
border, a field'sinput, the sidebar'ssidebar-border) gets lighter. This is the agreed design-system change from the UX audit: at 20%/16% our cards and rows read heavy and boxed next to ChatGPT (a ring of about 4%), Claude (about 8–10%, or a fill with no line) and Grok (about 6%).All three tokens stay at one strength, so no line is fainter than another. Dark is a little stronger than light because a thin line on a dark ground fades faster; 12% lands close to light's weight.
Contrast of a line against what it sits on (WCAG 2 ratio, from
tokens/src/color.ts):background)sidebar)What stays visible, and why no new token
The rule in
docs/design-system.mdasks 3:1 for the edge of a control with no other cue, and for the focus ring. Neither moves here:muted-foreground, notinput(checkbox.tsx,questionnaire.tsx).checkbox-contrast.test.tsxmeasures 5.49–5.84:1 in light and 6.04–6.72:1 in dark on the page, a card, a muted row and a popover. Same numbers as before this change.muted-foregroundknob; thebg-inputtrack is not its only cue.ring, untouched.Input,Textarea,Select) keepborder-input. They were 1.6:1 before, so they never met 3:1 and no test held them to it. They have a label, a placeholder or a value, and the focus ring. The screenshots show the resting edge is still clear in both themes.So no control needed a stronger edge, and nothing is a one-off color. The one mark that did need one, the scrollbar thumb, is below. The rule text now says it outright: a line is never the only cue of a control.
This changes #2124's line strength on purpose
@guidovizoso, #2124 raised every line to the text color at 20% in light and 16% in dark (about 1.6:1), because the old border (1.37:1 light, 1.20:1 dark) all but vanished. This PR takes that strength down on purpose. Nothing else from #2124 changes: one strength for all three line tokens, the hairline on cards, the radius, the icons' line, the shadows and the slate greys all stay.
Why: the design and UX audit compared every OpenBot screen with ChatGPT, Claude, Grok and Muse. Next to all of them, our 1.6:1 lines make cards and rows read heavy and boxed. Their lines are about 4% (ChatGPT, as a shadow ring), 8–10% or a fill with no line (Claude) and 6% (Grok). 10%/12% puts us in that range.
Why fields and controls stay clear:
muted-foreground(5.5:1 or more). The focus ring isring. The scrollbar thumb and OpenFuse's sheet handle move tomuted-foregroundin this PR (below).main. They also have a label, a value or a placeholder, and the focus ring. The dialog screenshots show the resting edge in both themes.The scrollbar thumb
The thumb was
var(--border)(app/src/theme.css), so this change took it to about 1.25:1 and a list barely showed that it scrolls. It ismuted-foregroundnow: an existing token, 4.5:1 or more on every surface, light and dark. OpenFuse's sheet grab handle (--openfuse-handle, alsovar(--border)) had the same problem and moves tomuted-foregroundtoo.ui-look-theme.test.tsholds both. Settings scrolled, right half of the window; left to right:main, this PR before the fix, now.Files
tokens/src/scheme.ts: the three tokens, light and dark, with a comment on why.bun run tokens:generate):app/src/theme.css,app/src/lib/artifacts/tokens.css,desktop/src/styles.css,desktop/src-tauri/src/connected/sign_in.rs,desktop/src-tauri/src/first_paint.rs,mobile/src/scheme.ts.first_paint.rstest: the two--borderlines it reads fromstyles.css.app/tests/ui-look-theme.test.ts: 20%/16% → 10%/12%, and a new test that the scrollbar thumb and OpenFuse's sheet handle aremuted-foreground. Nothing else in it changed.app/src/theme.css(outside the generated block): the scrollbar thumb.app/src/skins/openfuse/skin.css: the sheet's grab handle.docs/app-guidelines.md(The look › Surfaces) anddocs/design-system.md: the strengths, the ratios, and the muted-foreground rule for edges that must reach 3:1.No API, database or screen changes. It touches no primitive, so it doesn't overlap the type-scale or shared-row PRs.
Where it runs
Boundary and audit
API and database
api/, no app's requests, no database change and norelease-policy.json.Changelog
The look.
text color at 10% in light and 12% in dark, down from 20% and 16%, so cards and rows read less
boxed. A customer's theme that sets
--border,--inputor--sidebar-borderkeeps its ownvalue. Checkboxes and radio buttons keep their stronger edge, and the scrollbar's thumb and
OpenFuse's sheet handle are now drawn in the secondary text color so they stay easy to find.
Proof
Ran locally:
bun test tokens/tests app/tests/ui-look-theme.test.ts app/tests/design-tokens.test.ts app/tests/skins.test.ts app/tests/ui-look-guard.test.ts app/tests/ui-primitives-look.test.ts: 151 pass (includesgenerated.test.tsandcontrast.test.ts).OPENBOT_APP_BROWSER=1 bun test app/tests/checkbox-contrast.test.tsx: 2 pass.cargo test --bin openbot-desktop the_cover_isandsign_in: pass.bun run typecheck,bun run lint,bun run format:check: clean.Looked at, in the workbench at 1280 × 820, light and dark, under every skin (OpenBot, OpenDuet, OpenDots, OpenFuse): Home (sidebar edge, message box, cards), Settings (cards, rows, selects, switch), Apps (cards, search field), a select menu and the Name dialog with its field at rest (OpenBot and OpenFuse). Each image is before | after. The traffic lights over the sidebar in some shots are the known workbench Trusted Types bug, not this change.
Settings, OpenBot, light and dark (cards, rows, selects)
Dialog with a field at rest, light and dark
Select menu, light and dark
Home, sidebar edge and message box
Other skins
All 32 pairs
The images live on the
pr-assets/lighter-linesbranch, which holds nothing else. Delete it after merge.