Skip to content

Keep toggles and colour swatches visible under forced colours - #900

Merged
enaboapps merged 4 commits into
mainfrom
890-dark-final-pass
Sep 25, 2026
Merged

enaboapps merged 4 commits into
mainfrom
890-dark-final-pass

Conversation

@enaboapps

@enaboapps enaboapps commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Closes #890. Top of the stack tracked in #891, stacked on #899.

What the final pass covered

I rendered every view and dialog from the full stack in dark mode and under emulated forced colours, light and dark. That covered Home in setup-needed and Ready states, Switches empty and populated with an editor open, Scanning shared and Point settings, Mouse, every Settings tab, Mobile's three tabs, the profile editor, the setup guide, pairing requests and the removal confirmation.

Dark mode needed no changes beyond earlier layers. Forced colours showed two controls that became unusable:

  • Toggles vanished. The track and knob are drawn only with backgrounds, which forced colours flatten. Toggles now draw with Canvas, CanvasText, Highlight and GrayText for off, on and disabled.
  • Colour choices lost their colours. Every scanner and overlay swatch, and the highlight sample, flattened to the same empty shape. They now opt out with forced-color-adjust: none, because the colour is the choice being made.

Both problems predate this stack, since the toggle and swatches were background-only on main.

Already correct under forced colours: the selected nav item has a Highlight outline, the selected tab a Highlight underline, and selected choices a thicker border and drawn tick. Status tiles keep their tick and exclamation badges.

Validation

On this head:

  • npm run lint passed
  • npm test passed: 238 Vitest tests and 5 Node tests
  • npm run build passed
  • cargo fmt --check and cargo clippy --all-targets -D warnings passed
  • cargo test passed: 566 tests, 1 ignored
  • Rendered in headless Chrome at 920px and 620px, in light, dark, forced-colours light and forced-colours dark.

Review follow-up

An independent review of this layer's head raised these points, now addressed:

  • Disabled toggles look disabled whether checked or not. Toggle focus uses CanvasText. Swatches get a CanvasText edge so white and yellow stay visible on light themes. The chosen colour chip and the selected practice block use Highlight, and the setup step rail uses system colours.
  • A re-review found that the dark-theme white swatch border outranked the forced-colours edge. The white swatch now gets the same CanvasText edge.

🤖 Generated with Claude Code

Rebase validation (2026-09-25)

Rebased onto current main (7fb8fce, including #881) in stack order. git range-diff shows every commit in this PR is patch-equivalent to its previous head, and the intended parent remains its PR base. On the final stack tip (40c75cc), Node 24.19.0 lint, tests and build passed; Rust 1.97.1 format check, Clippy and tests passed. An independent review of the updated PR heads found no actionable findings. CI is rerunning on each new head.

OwenMcGirr and others added 3 commits September 25, 2026 12:49
A dark mode and forced-colours pass over every view found two controls
that forced colours erased: toggle tracks and knobs are drawn only with
backgrounds, so they vanished, and every colour swatch and the highlight
sample flattened to the same empty shape. Toggles now draw with system
colours, including checked and disabled states, and swatches keep their
real colours because the colour is the choice being made.

Closes #890

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Disabled toggles now look disabled whether checked or not, and toggle
focus uses CanvasText instead of the page's blue. Swatches get a
CanvasText edge so white and yellow stay visible on a light Canvas, the
chosen colour chip and selected practice block are marked with
Highlight, and the setup step rail is drawn with system colours.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@enaboapps
enaboapps marked this pull request as ready for review September 25, 2026 11:49
@enaboapps
enaboapps marked this pull request as draft September 25, 2026 11:50
Base automatically changed from 889-dialog-shell to main September 25, 2026 15:51
@enaboapps
enaboapps marked this pull request as ready for review September 25, 2026 15:51
@enaboapps
enaboapps merged commit 3a49c0c into main Sep 25, 2026
6 checks passed
@enaboapps
enaboapps deleted the 890-dark-final-pass branch September 25, 2026 16:14
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.

Dark mode and final visual pass for the main window

2 participants