Skip to content

fix(theme): primary button wears the accent in dark mode - #321

Merged
deepiq2022 merged 1 commit into
mainfrom
working
Jul 25, 2026
Merged

fix(theme): primary button wears the accent in dark mode#321
deepiq2022 merged 1 commit into
mainfrom
working

Conversation

@deepiq2022

Copy link
Copy Markdown
Contributor

Summary

  • Fixes a dark-mode defect the test suite couldn't see. The primary button rendered as a pale peach with dark text — Material derives a light primary for dark schemes, so the app's most important control was the one element not wearing Lamplight Terracotta, a flat break of DESIGN.md's Rubrication Rule. Light mode hid it because the amber seed's light primary lands near the token by luck.
  • The fill now comes from JuiceTokens at the theme in both brightnesses, with the label flipping per mode: near-white ink on the deep light clay, page-dark ink on the lifted dark clay.
  • Ships the primary lift — the second and last shadow DESIGN.md sanctions, and the only one it had left unimplemented. Rides Material elevation with a terracotta shadowColor rather than a literal BoxShadow, so the button lifts without spending the One Shadow Rule's budget and no call site hand-rolls it.
  • DESIGN.md and the sidecar updated to match: the Elevation section moves the primary lift from "specified, not yet shipped" to shipped, and the Buttons entry records why the fill is themed rather than derived.

Test plan

  • flutter analyze clean (one pre-existing info in test/embark_sheet_ui_test.dart, untouched here)
  • flutter test passes — 2192 tests
  • Browser-verified at both brightnesses: light is deep terracotta with near-white label and a warm lift; dark is #D0814F with page-dark label
  • Campaign identity spines from docs(design): codify DESIGN.md as enforced visual authority #320 confirmed distinct in light and dark, Umber separating from Terracotta by value
  • Result card border and sketch toolbar in dark mode — not reachable in this pass (clicks don't land on the Flutter web canvas); both are single-token swaps covered by the guard test

🤖 Generated with Claude Code

Browser verification of the design system caught a real defect the green
suite could not see: in dark mode the primary button rendered as a pale peach
with dark text. Material derives a light `primary` for dark schemes, so the
app's most important control was the one element on screen not wearing
Lamplight Terracotta — a flat break of DESIGN.md's Rubrication Rule. Light
mode had hidden it, because the amber seed's light `primary` happens to land
near the token by luck. The fill is now set from JuiceTokens at the theme in
both brightnesses, with the label flipping per mode: near-white ink on the
deep light clay, page-dark ink on the lifted dark clay.

Also ships the primary lift, the second and last shadow DESIGN.md sanctions
and the only one it had left unimplemented. It rides Material elevation with
a terracotta shadowColor rather than a literal BoxShadow, so the button lifts
without spending the One Shadow Rule's budget, and no call site hand-rolls it.
Warm-tinted per The Warm Shadow Rule — a neutral shadow on cream paper reads
as plastic.

Verified in the browser at both brightnesses, alongside the rewarmed campaign
identity spines from #320, which render distinct in light and dark with Umber
separating from Terracotta by value as intended.

Co-Authored-By: Claude <noreply@anthropic.com>
@deepiq2022
deepiq2022 merged commit 365946a into main Jul 25, 2026
1 check passed
@deepiq2022
deepiq2022 deleted the working branch July 25, 2026 00:35
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.

2 participants