Skip to content

fix(theme-matcha): dark menus, popovers and muted fills take the theme's deep gray neutral - #12435

Closed
josephfarina wants to merge 2 commits into
mainfrom
josephfarina/matcha-dark-surfaces
Closed

josephfarina wants to merge 2 commits into
mainfrom
josephfarina/matcha-dark-surfaces

Conversation

@josephfarina

Copy link
Copy Markdown
Contributor

User impact

In matcha's dark mode, an open menu, a popover and a muted fill were a saturated olive green (#3e481d), while the page, surfaces and cards beside them are deep gray. An open dropdown menu looked like it belonged to another theme. Light mode is unchanged.

Problem and solution fit

  • Why does it occur? Matcha's dark neutral ramp is a deep gray up to stop 15 (#1e2016) and jumps to olive at stop 20. The theme mapped --color-background-popover and --color-background-muted to stop 20.
  • Why does it harm the task? Menus and popovers are where people make choices. A panel in a different colour family reads as broken or off-theme.
  • Why does that matter? Matcha is a theme people start from, so every app on it shows the olive panels in dark mode.

The fix keeps every dark surface on the gray part of the ramp. The relation between them now matches light mode: the popover takes the card's stop, and the muted fill takes the page's.

Expected behavior and authority

A theme's surfaces belong to one neutral family in each mode. Matcha's light mode already maps the popover to the card's stop and the muted fill to the page's.

Smallest restoration

Token Before (dark) After (dark)
--color-background-popover neutral.dark[20] (#3e481d) neutral.dark[15] (#1e2016), the card's stop
--color-background-muted neutral.dark[20] (#3e481d) neutral.dark[5] (#12140e), the page's stop

Light mode, text and every other token are unchanged. The bundled CLI copy is regenerated.

Evidence

  • Reproduction before the change: in dark mode, a card with an open dropdown menu shows the menu panel in olive beside the gray card. The look check flags it as a part that loses the theme's look.
  • Result after the change: the same page passes the look check in light and dark mode at 1280 and 390 px wide.
  • Representative unchanged path: light mode and all text colours.
  • Regression proof: the text contrast guards (scripts/check-text-contrast-by-role.test.mjs, scripts/check-secondary-text-contrast.test.mjs) and the theme package tests pass, so text on the new popover and muted fills still meets WCAG AA.

Scope

Components: theme-matcha, cli (bundled theme copy)

  • One defect is restored.
  • Separable contradictory or unsettled tagalongs were removed or split.
  • No new public API, visual representation, default, or interaction model is hidden under the bug-fix label.
  • Public text and artifacts contain no internal Meta context.

Testing

  • CI=1 pnpm vitest run --project node scripts/check-text-contrast-by-role.test.mjs scripts/check-secondary-text-contrast.test.mjs packages/themes
  • node scripts/generate-matcha-palette-refs.mjs and node scripts/generate-cli-themes.mjs, outputs committed; node scripts/check-changesets.mjs

look gate: PASS (matcha, light and dark, desktop and phone)

… gray neutral like cards

Matcha's dark neutral ramp is a deep gray up to stop 15 and olive from stop 20. The popover took stop 20 and the muted fill too, so an open menu in dark mode was saturated olive beside gray cards. The popover now takes the card's stop and the muted fill the page's, as in light mode.
@vercel

vercel Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 18, 2026 12:00am UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 17, 2026
@astracat-bot

astracat-bot Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 18, 2026, 12:09 AM UTC

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 670685b

Storybook · Sandbox · built from this PR's head

Current run: The current CI run concluded cancelled. Current analysis is unavailable.


Generated by PR Enrichment workflow | View current CI run

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval waits on an owner decision about Matcha's dark surface colours; nothing else blocks this change.

theme:matcha owns Matcha's dark surface ladder, but no current record says which palette stop the popover and muted roles take, and both have used Neutral Dark 20 since the theme was added. A design or engineering owner records the decision on these two points by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner:

  • Dark menus and popovers take Neutral Dark 15, the card's colour; opened over a card they then show no visible edge, because Matcha's shadow is a faint olive that barely shows on near-black.
  • Dark muted fills take Neutral Dark 5, the page's colour, so a muted Card or Section, a ProgressBar track or a Table stripe on the page shows no fill, as in light mode.

The CI workflow did not run its tests at this head because CI was full, and two optional wording suggestions are inline.

Claims and files checked

Review mode: full; reason: no-earlier-review

  • Claim: dark menus, popovers and muted fills were olive while the page, surfaces and cards are deep gray: verified in the theme source and palette.
  • Claim: the dark neutral ramp is gray through stop 15 and olive at stop 20: verified in the generated palette references.
  • Claim: the popover now takes the card's stop and the muted fill the page's, matching light mode: verified in the theme source, where light popover equals card and light muted equals page; in rendering, the shadow edge light mode keeps does not carry to dark.
  • Claim: light mode, text colours and every other token are unchanged: verified; only two dark values differ in the built theme stylesheet, and the light-mode frame is pixel-identical.
  • Claim: a theme's surfaces belong to one neutral family in each mode, given as authority: not stated in any current record; this is the open owner decision.
  • Claim: the bundled CLI copy is regenerated: verified; rerunning the bundle generator changes nothing, and both theme files are byte-identical.
  • Claim: the text-contrast guards and theme tests pass, so text on the new fills meets WCAG AA: verified; those tests pass at this head.
  • Claim: the palette-reference and CLI generators were run and the changeset check passes: verified by rerunning both generators (no change) and the changeset check (pass).
  • Claim: an external look check passes in both modes at two widths: not reproducible from the repository; not relied on.
  • Changeset (theme-matcha): dark menus, popovers and muted fills take the near-black neutral like cards instead of olive: verified; the muted fill takes the page's value (wording suggestion inline).
  • Changeset (cli): the bundled theme makes the same change: verified.
  • File .changeset/cli-bundled-matcha-dark-surfaces.md: clear.
  • File .changeset/theme-matcha-dark-surfaces.md: non-blocking wording suggestion.
  • File packages/cli/assets/templates/themes/matcha/matchaTheme.ts: clear; identical to the package source.
  • File packages/themes/matcha/src/matchaTheme.ts: owner decision on the two dark stops; non-blocking comment-style suggestion.

Automated review (maintainer link)

'@astryxdesign/theme-matcha': patch
---

[fix] In dark mode, menus, popovers and muted fills take matcha's near-black neutral like its cards, instead of a saturated olive green.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional: the muted fill now takes the page's near-black (#12140e), not the card's (#1e2016), so a muted Card or Section on the page shows no fill in dark mode. A wording that tells consumers this:

[fix] In dark mode, menus and popovers take the near-black of matcha's cards, and muted fills the near-black of its page, instead of a saturated olive green.

Comment on lines +96 to +98
// Matcha's dark ramp is a deep gray neutral up to stop 15 and olive from
// stop 20, so dark surfaces stay at or under 15: the muted fill sits with
// the page, as it does in light mode.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional (source-comment style): this is one 38-word sentence with three topics, and it also explains the popover change further down. A shorter form:

// Matcha's dark neutral ramp turns olive at stop 20.
// Dark surfaces use stop 15 or lower.
// The muted fill matches the page, as in light mode.

Rerun node scripts/generate-cli-themes.mjs afterwards so the CLI copy stays identical.

@josephfarina

Copy link
Copy Markdown
Contributor Author

Owner decision (engineering owner, covering this pull request): in Matcha's dark mode, menus and popovers take Neutral Dark 15, the card's color, and muted fills take Neutral Dark 5, the page's color, instead of the olive Neutral Dark 20. Matcha's dark surfaces now follow its gray neutral ramp like its cards.

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 05c5d4d

@astracat-bot

astracat-bot Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

In reply to @josephfarina

I'll run a full review to re-check this with your note.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved pending CI: the CI workflow stopped on this head because CI was full, so its tests need a re-run of all jobs before this can merge.

The open question on Matcha's dark surface colours is answered: an engineering owner decided that dark menus and popovers take Neutral Dark 15, the card's colour, and dark muted fills take Neutral Dark 5, the page's colour, and approved this head. The change does exactly that in the theme and its bundled CLI copy, text on both fills gains contrast, and light mode is unchanged.

Two optional suggestions from the earlier review still stand inline: the theme release note could say that muted fills take the page's colour rather than the card's, and the new source comment could be shorter.

Claims and files checked

Review mode: same-head; reason: none

  • changed rules (0): none
  • Claim: dark menus, popovers and muted fills were olive while the page, surfaces and cards are deep gray: verified in the theme source and palette.
  • Claim: the dark neutral ramp is gray through stop 15 and olive at stop 20: verified in the generated palette references.
  • Claim: the popover now takes the card's stop and the muted fill the page's, as in light mode: verified in the theme source; over a card the dark menu keeps no visible edge, which the owner decision accepted.
  • Claim: light mode, text colours and every other token are unchanged: verified; only two dark values differ in the built theme stylesheet, and the light frames are pixel-identical.
  • Claim: a theme's surfaces belong to one neutral family in each mode, given as authority: not in any record; the owner decision on this pull request settles both stops instead.
  • Claim: the bundled CLI copy is regenerated: verified; the two theme files are byte-identical.
  • Claim: the text-contrast guards and theme tests pass, so text on the new fills meets WCAG AA: verified; those tests pass at this head.
  • Claim: the palette-reference and CLI generators were run and the changeset check passes: verified; both generators rerun with no change and the changeset check passes.
  • Claim: an external look check passes in both modes at two widths: not reproducible from the repository; not relied on.
  • Changeset (theme-matcha): dark menus, popovers and muted fills take the near-black neutral instead of olive: verified; the muted fill takes the page's value (optional wording suggestion inline).
  • Changeset (cli): the bundled theme makes the same change: verified.
  • File .changeset/cli-bundled-matcha-dark-surfaces.md: clear.
  • File .changeset/theme-matcha-dark-surfaces.md: optional wording suggestion.
  • File packages/cli/assets/templates/themes/matcha/matchaTheme.ts: clear; identical to the package source.
  • File packages/themes/matcha/src/matchaTheme.ts: both dark stops owner-decided; optional comment-style suggestion.

Automated review (maintainer link)

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 670685b

@astracat-bot astracat-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved pending CI: the CI workflow stopped on this head because CI was full, so all its jobs need a re-run, and they must pass before this can merge.

Matcha's dark menus and popovers now take Neutral Dark 15, the card's colour, and dark muted fills take Neutral Dark 5, the page's colour, as an engineering owner decided and approved for this head. The regenerated Swift theme matches the theme source, the bundled CLI copy is identical, text on both fills gains contrast, and light mode is unchanged.

Two optional suggestions from the earlier review still stand inline: the theme release note could say that muted fills take the page's colour rather than the card's, and the new source comment could be shorter.

Claims and files checked

Review mode: incremental; reason: none

  • changed rules (0): none
  • Claim: dark menus, popovers and muted fills were olive while the page, surfaces and cards are deep gray: verified in the theme source and palette.
  • Claim: the dark neutral ramp is gray through stop 15 and olive at stop 20: verified in the generated palette references.
  • Claim: the theme mapped the popover and muted roles to stop 20: verified in the base theme source.
  • Claim: the popover now takes the card's stop and the muted fill the page's, as in light mode: verified; over a card the dark menu keeps no visible edge, which the owner decision accepted.
  • Claim: a theme's surfaces belong to one neutral family in each mode, given as authority: not in any record; the owner decision settles both stops instead.
  • Claim: light mode, text colours and every other token are unchanged: verified; the built theme stylesheet differs in two dark values only, and the light frame is pixel-identical.
  • Claim: the bundled CLI copy is regenerated: verified; the two theme files are byte-identical and the generator reproduces them.
  • Claim: the text-contrast guards and theme tests pass, so text on the new fills meets WCAG AA: verified; those tests pass at this head.
  • Claim: the palette-reference and CLI generators were run and the changeset check passes: verified; both generators rerun with no change and the changeset check passes.
  • Claim: an outside look check passes in both modes at two widths: not reproducible from the repository; not relied on.
  • Claim: no new public API, default or interaction model hides under the fix label: verified; the API comparison finds no change.
  • Changeset (theme-matcha): dark menus, popovers and muted fills take the near-black neutral instead of olive: verified; the muted fill takes the page's value (optional wording suggestion inline).
  • Changeset (cli): the bundled theme makes the same change: verified.
  • File .changeset/cli-bundled-matcha-dark-surfaces.md: clear.
  • File .changeset/theme-matcha-dark-surfaces.md: optional wording suggestion.
  • File packages/cli/assets/templates/themes/matcha/matchaTheme.ts: clear; identical to the package source.
  • File packages/native/apple/Sources/Astryx/Theme/Generated/MatchaTheme.swift: clear; matches the generator's output.
  • File packages/themes/matcha/src/matchaTheme.ts: both dark stops owner-decided; optional comment-style suggestion.

Automated review (maintainer link)

josephfarina added a commit that referenced this pull request Nov 18, 2026
josephfarina added a commit that referenced this pull request Nov 19, 2026
josephfarina added a commit that referenced this pull request Nov 19, 2026
- #12252 docs(cli): agent docs name the prop names that differ from other libraries
  Author: Joey Farina <[email protected]>
- #12154 fix(core): a numeric typography weight builds through an extended base's adaptation rules
  Author: Joey <[email protected]>
- #12092 fix(cli): theme build reads the Core it builds with for variant declarations, and names the build command alone
  Author: Joey Farina <[email protected]>
- #12316 fix(core): a shorthand never follows its own longhand in one style merge
  Author: josephfarina <[email protected]>
- #12357 fix(core): a Table stays the scroll region when a host scrolls every table's parent
  Author: Joey Farina <[email protected]>
- #12349 fix(core): end a mouse drag a sandboxed frame never saw released
  Author: josephfarina <[email protected]>
- #12425 fix(cli): use a stored doc parse only with the zod release that made it
  Author: Joey <[email protected]>
- #12396 fix(AppShell): with the standard width points, a server-rendered shell hides its inline side nav on a phone before its script runs
  Author: Joey <[email protected]>
- #12438 fix(charts): end dots draw whole and a thinned axis keeps its last label
  Author: Joey Farina <[email protected]>
- #12448 fix(cli): upgrade outside a project names the project, not --from
  Author: Joey Farina <[email protected]>
- #12459 fix(templates): the dashboard scorecard fits a phone screen
  Author: Joey Farina <[email protected]>
- #12428 fix(core): Field labels draw in a bolder face than their description
  Author: Joey Farina <[email protected]>
- #12435 fix(theme-matcha): dark menus, popovers and muted fills take the theme's deep gray neutral
  Author: Joey <[email protected]>
- #12432 fix(templates): dashboard chart labels show whole instead of clipped by the chart edge
  Author: Joey Farina <[email protected]>
- #12441 fix(cli): mark icon-set generated calls pure so apps drop unused icons
  Author: Joey Farina <[email protected]>
- #12472 fix(MetadataListItem): a value breaks only a word longer than its line
  Author: Joey <[email protected]>
@josephfarina

Copy link
Copy Markdown
Contributor Author

Landed in #12718.

@github-actions
github-actions Bot deleted the josephfarina/matcha-dark-surfaces branch November 19, 2026 06:04

This branch was successfully deployed

1 active deployment
Preview — 670685b6 Deployed Nov 18, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot. needs:design-review Affects visuals — Design should review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant