Skip to content

experimental theme: an on-color set on a part holding the readers leaves the fill pair out - #13360

Merged
josephfarina merged 4 commits into
feature/theme-editorfrom
josephfarina/theme-a/fx-13321
Nov 21, 2026
Merged

josephfarina merged 4 commits into
feature/theme-editorfrom
josephfarina/theme-a/fx-13321

Conversation

@josephfarina

@josephfarina josephfarina commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes the review finding on #13321: an on-color set on a part inside the recolored part that holds its buttons (--on top-nav inside the top bar) gave a false 1.00:1 problem whose fix line changed nothing the buttons draw. A part inside that holds a reader now counts as the readers do. Such a setting leaves the pair out only in the modes it is set for, and the case joins #13321's release note.

Testing

theme-contrast-measures-whats-drawn.test.mjs (an on-color set on the top nav, and one set on it for dark mode only).

Gate

preflight: pass 798c3b1
replay: worse 0 at 798c3b1

@vercel

vercel Bot commented Nov 21, 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 21, 2026 4:14pm UTC

Request Review

…ves the fill pair out

An on-color set on a part inside the recolored part that holds its buttons (the top nav in the top bar) gave a false 1.00:1 problem whose fix changed nothing the buttons draw. Such a part now counts as the readers do.

Fixes the review finding on #13321.

[skip ci]
@astracat-bot

astracat-bot Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 21, 2026, 4:27 PM UTC

@josephfarina
josephfarina force-pushed the josephfarina/theme-a/fx-13321 branch from 1240ddc to 6a6af1b Compare November 21, 2026 14:04
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 21, 2026
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 6a6af1b

@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.

Changes requested: the holder skip removes the false 1.00:1 problem for an on-color on the top nav, and the reading is approved for this head, but two fixes are needed.

  • The new holder skip in packages/cli/api/theme-edit/_settings.mjs (lines 12754-12768) ignores the mode, so after --color-on-accent '#000000' --on top-nav --mode dark a white light accent on app-shell-header reports nothing while the top-nav buttons draw #ffffff on #ffffff in light, a problem the base reported with a fix that works; skip only the modes the other setting is set for (compare its mode inside the per-mode loop) and add a --mode dark case that still reports in light.
  • .changeset/experimental-theme-scoped-fill-pair-elsewhere.md line 5 says only an on-color around the part, on a reader inside it, or for a variant or state there leaves the pair out, but one on a part inside it that holds a reader now does too; name that case in the sentence or merge the two notes.

Non-blocking: the comment above the new lines (around line 12744) still mentions a variant or state of the whole theme, which set refuses.

Claims and files checked

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

Claims:

  • Title: an on-color set on a part that holds the readers leaves the fill pair out. Verified: the new top-nav case reports nothing at the head.
  • An on-color on the top nav inside the top bar gave a false 1.00:1 problem whose fix changed nothing the buttons draw. Verified: the new test fails on the base with that problem and a fix on the top bar, while the top-nav buttons draw black on white.
  • A part inside that holds a reader now counts as the readers do. Verified, including that, like a reader, it skips the pair whatever mode it is set for (first finding).
  • The earlier release note drops "or of the whole theme" because a variant or state setting with no part is refused. Verified: set refuses --when and --state without --on.
  • Testing: the contrast test covers an on-color set on the top nav. Verified: it passes on the head and fails on the base.
  • New release note: the editor leaves a part's fill pair out when its on-color is set on a part inside it that holds the readers, as for the readers themselves. Verified.
  • Edited release note: only an on-color around the part, on a reader inside it, or for a variant or state there leaves the pair out. False at this head (second finding).

Files:

  • packages/cli/api/theme-edit/_settings.mjs: first finding; the non-blocking comment note.
  • packages/cli/api/theme-edit/theme-contrast-measures-whats-drawn.test.mjs: clear; the mode case belongs with the first fix.
  • .changeset/experimental-theme-scoped-fill-pair-holder.md: clear.
  • .changeset/experimental-theme-scoped-fill-pair-elsewhere.md: second finding.

Automated review (maintainer link)

…t only in its modes

The skip ignored the mode, so an on-color set on the top nav for dark mode also hid the light pair, where the top-nav buttons drew white on white. A setting now leaves the pair out only in the modes it is set for. The holder case joins the one release note.

[skip ci]
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 4a245f6

@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.

Changes requested: both findings from the last review are fixed (the skip now applies per mode, and the release note names the holder case), and this head's reading is owner-approved, but one fix is needed.

  • Miss: holdsReader in packages/cli/api/theme-edit/_settings.mjs (line 12755) indexes map[x.on] inside a closure where x.on is string | undefined, so the CLI's strict typecheck and sync:api-types, the last step of the root pnpm build, fail with TS2538; read map[x.on]?.contains once outside the closure, as readers does, and use that list in holdsReader.

Non-blocking: a --on button --mode dark test case would pin the per-mode skip for readers too, the case the base got wrong. CI has not run on this head because its commits skip it.

Claims and files checked

Review mode: incremental; reason: none

Claims:

  • Title: an on-color set on a part holding the readers leaves the fill pair out. Verified: an on-color on the top nav or the layout header leaves the top bar's pair out at this head.
  • An on-color on the top nav inside the top bar gave a false 1.00:1 problem whose fix changed nothing the buttons draw. Verified: the new case fails on the base with that problem and a fix on the top bar.
  • A part inside that holds a reader now counts as the readers do. Verified: the holder test joins the reader test in the skip.
  • Such a setting leaves the pair out only in the modes it is set for. Verified: the skip runs per mode, and a dark-only on-color on the top nav leaves the light problem reported (fails on the previous head, passes here).
  • The case joins the earlier release note. Verified: the separate note is folded into the existing one.
  • Testing: the contrast test covers an on-color on the top nav and one set for dark mode only. Verified: both cases pass on this head.
  • Release note: the pair stays measured when the on-color is set for the whole theme or on a part elsewhere; only one set around the part, on a reader inside it or a part holding one, or for a variant or state there, leaves it out, in the modes it is set for. Verified for the reader, around and holder cases in both one mode and all modes.

Files:

  • packages/cli/api/theme-edit/_settings.mjs: the type error above.
  • packages/cli/api/theme-edit/theme-contrast-measures-whats-drawn.test.mjs: clear; the non-blocking reader case above.
  • .changeset/experimental-theme-scoped-fill-pair-elsewhere.md: clear.

Automated review (maintainer link)

holdsReader indexed the part map by a value the type checker sees as possibly undefined inside its closure, which failed the strict typecheck. The parts the part holds are read once, as the readers are.

Fixes the review finding on #13360.

[skip ci]
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec a7b91fa

@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.

Changes requested. The type error from the last review is fixed, and the fill-pair reading is approved for this head; one release note still needs to go.

  • The new note .changeset/experimental-theme-scoped-fill-held-type.md tells CLI users that "the CLI's strict typecheck passes", but the base passes it the same way and the break it answers came from this pull request's own earlier commit, so delete the note (the edited experimental-theme-scoped-fill-pair-elsewhere.md already names @astryxdesign/cli for changeset coverage).

Non-blocking: a --on button --mode dark test case that still reports in light would pin the per-mode rule for readers, not only for holders.

Claims and files checked

Review mode: incremental; reason: none

  • Claim: an on-color on a part inside the recoloured part that holds its buttons gave a false 1.00:1 problem with a fix that changed nothing: verified (the top-nav test case fails on the base and passes here).
  • Claim: such a part now counts as the readers do: verified (_settings.mjs:12754-12759, :12767).
  • Claim: such a setting leaves the pair out only in the modes it is set for: verified (_settings.mjs:12777, the dark-only test case).
  • Claim: the case joins the existing release note: verified (experimental-theme-scoped-fill-pair-elsewhere.md:5).
  • Release note: the pair stays measured for an on-color set for the whole theme or elsewhere, and is left out for one around the part, on a reader or a part holding one, or for a variant or state there, in its modes: verified against touches and the tests.
  • Release note: the check reads held parts once so the strict typecheck passes: false as a change, since the base passes it identically.
  • Testing: the two named test cases pass.
  • .changeset/experimental-theme-scoped-fill-held-type.md: finding above.
  • .changeset/experimental-theme-scoped-fill-pair-elsewhere.md: clear.
  • packages/cli/api/theme-edit/_settings.mjs: clear.
  • packages/cli/api/theme-edit/theme-contrast-measures-whats-drawn.test.mjs: clear (non-blocking note above).

Automated review (maintainer link)

…own build

Text only: the typecheck fix answered a break from this change's own earlier commit, so it needs no release note.

[skip ci]
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 798c3b1

@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. An engineering owner approved the holder and per-mode rules for this head, and the release note that announced the earlier type repair is gone, so nothing blocks. CI has not run on this head yet, because its commits skip it.

Non-blocking: a --on button --mode dark test case that still reports in light would pin the per-mode rule for readers, not only for holders.

Claims and files checked

Review mode: incremental; reason: none

  • Title: an on-color set on a part holding the readers leaves the fill pair out. Verified: the top-nav case passes here and fails on the base.
  • An on-color on the top nav inside the top bar gave a false 1.00:1 problem whose fix changed nothing the buttons draw. Verified: the base reports it, and its fix sets the color on the top bar, which the top nav's own setting overrides.
  • A part inside that holds a reader now counts as the readers do. Verified (_settings.mjs:12754-12759, :12767).
  • Such a setting leaves the pair out only in the modes it is set for. Verified (_settings.mjs:12777 and the dark-only test case).
  • The case joins the base pull request's release note. Verified (experimental-theme-scoped-fill-pair-elsewhere.md:5).
  • Testing: the two named test cases. Verified: both pass here.
  • The gate line reporting a replay with nothing worse at the previous revision. Not checkable: it comes from the author's own tooling, which this repository does not contain. It names the previous revision, whose code and tests this head keeps unchanged, and this review does not rely on it.
  • Release note: the pair stays measured when the on-color is set for the whole theme or on a part elsewhere. Only one set around the part, on a reader inside it or a part holding one (a group by its parts), or for a variant or state there leaves the pair out, in the modes it is set for. Verified against the code and the tests.
  • .changeset/experimental-theme-scoped-fill-pair-elsewhere.md: clear.
  • packages/cli/api/theme-edit/_settings.mjs: clear.
  • packages/cli/api/theme-edit/theme-contrast-measures-whats-drawn.test.mjs: clear, apart from the non-blocking note above.

Automated review (maintainer link)

@josephfarina
josephfarina marked this pull request as ready for review November 21, 2026 16:44
@josephfarina
josephfarina changed the base branch from josephfarina/theme-a/fx-13300 to feature/theme-editor November 21, 2026 16:58
@josephfarina
josephfarina merged commit 47e343a into feature/theme-editor Nov 21, 2026
9 checks passed
josephfarina added a commit that referenced this pull request Nov 21, 2026
…ves the fill pair out (#13360)

Reviewed pull request #13360, merged into the theme working branch with only its own changes (the layer below it, #13321, is already here). It reaches main with the branch's next landing.
josephfarina added a commit that referenced this pull request Nov 21, 2026
…ves the fill pair out (#13360)

Reviewed pull request #13360, merged into the theme working branch with only its own changes (the layer below it, #13321, is already here). It reaches main with the branch's next landing.
josephfarina added a commit that referenced this pull request Nov 21, 2026
- #12787 experimental theme: a pressed or hovered part's flat tint is measured as the fill it is
- #13252 experimental theme: a one-color layer is a fill only where it covers the whole box
- #13300 experimental theme: a fill and its on-color set inside a part are measured as that part draws them
- #13321 experimental theme: a part's fill pair is measured though its on-color is set for the whole theme
- #13360 experimental theme: an on-color set on a part holding the readers leaves the fill pair out
- #12768 feat(cli): experimental theme editor show <theme> --on <part> gives what one part of a theme shows
- #13057 experimental theme pictures: sheet cells are never narrower than what they hold, and a panel over the page is drawn at its cell's full width
- #13200 experimental theme pictures: a change removes the pictures cut from a tall one
- #13199 experimental theme pictures: the pages section draws the sample app whole, cut between pages and named
- #13320 fix(cli): corners said before their edge run after it, so the whole answer does both
- #13375 experimental theme how: a clashing fill's text color goes in that fill's choice
- #13411 experimental theme how: a clash with a see-through fill joins its text too; another look's text leaves it joined
- #13420 fix(cli): experimental theme editor - glossy writes no sample gradient
- #13452 test(cli): the said-order test reads a named corner as that corner
- #13262 fix(cli): experimental theme editor - an ask that starts with clear the and names only removable looks takes them away
- #13450 fix(cli): experimental theme editor - a bar's text token is checked in the menus its items open
- #13442 feat(cli): a light neutral also fills the page, surface and card backgrounds in light mode
- #13477 docs(changeset): the clear reading takes looks away for one part
@josephfarina

Copy link
Copy Markdown
Contributor Author

Landed on main in #13470.

@github-actions
github-actions Bot deleted the josephfarina/theme-a/fx-13321 branch November 22, 2026 06:04

This branch was successfully deployed

1 active deployment
Preview — 798c3b18 Deployed Nov 21, 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant