Skip to content

experimental theme: a text color on an option row reaches the tokens its label and description read - #13241

Merged
josephfarina merged 1 commit into
feature/theme-editorfrom
josephfarina/editor-row-label-color-2
Nov 21, 2026
Merged

josephfarina merged 1 commit into
feature/theme-editorfrom
josephfarina/editor-row-label-color-2

Conversation

@josephfarina

@josephfarina josephfarina commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Replaces #12765 (closed): the same change, unstacked onto main, with its review findings fixed.

User impact

astryx experimental theme editor set … color <value> --on <part>: a text color on a row drawn more than once inside another part that draws no text itself, whose label is its own component's part drawn inside it (a select's option row, whose label and description are those of the Item drawn inside it as the select's option), now reaches the text tokens that label reads. So color #fff --on option-rows --state hover beside a dark hover fill gives every option row readable text, its description included. A part with a color of its own that is no such row (a table, a markdown block) keeps the color on itself, so content an app puts inside it keeps its own color.

Problem and solution fit

The theme editor is experimental. Each change is one behaviour of its set or how commands, with its own test, and touches nothing outside packages/cli/api/theme-edit apart from its changeset.

  • colorTokensReached takes the part's component from the one shared lookup (project.target), and follows a part's own anatomy only on a row another part draws more than once (listed in the census).
  • The census records the other parts drawn on the same element (drawnAs), so the Item drawn as the select's option counts as the option row's own label, and its description's token follows.

Smallest restoration

  • .changeset/experimental-theme-row-label-color.md: the release note.
  • packages/cli/api/theme-edit/_parts.mjs: the census records drawnAs.
  • packages/cli/api/theme-edit/_settings.mjs: colorTokensReached reaches a listed row's own label tokens.
  • packages/cli/api/theme-edit/theme-row-label-color.test.mjs: the option row's label and description, and a table and a markdown block that keep their content's color.

Evidence

Tests (CI=1, on main):

  • packages/cli/api/theme-edit/theme-row-label-color.test.mjs: passes; its option-row case fails on main.
  • The whole packages/cli/api/theme-edit suite gives the same results as on main.

Scope

Components: none (experimental theme editor only)

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

replay: worse 0 at 1e76797 (carried: comment and release-note text only since 7ecab92, which replayed with 0 answers changed)

preflight: pass 1e76797 (CI 19/19 at 4dc8f8b; the review's one finding there was release-note and comment text, fixed at this head with no code change; astracat APPROVED this head)

@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 8:58am UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 21, 2026
@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, 9:13 AM UTC

@josephfarina

Copy link
Copy Markdown
Contributor Author

Covers the theme-editor reading this pull request records (the owner's ruling): a color set on Selector's option row writes the row's text tokens, so its label, description and custom row content follow it.

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 4dc8f8b

@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 1e76797

⏳ Building… Until it's ready, Storybook · Sandbox open the branch's previous preview.

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.

Approved pending CI: the full CI run starts once this head is approved, and it has to pass before merge.

A color set on Selector's option rows now also sets the two text tokens the option's label and description read, as the engineering owner's ruling on this pull request decides. Only that part's output changes, and the new test fails before the change and passes after it.

  • Non-blocking: the Table/Markdown case in theme-row-label-color.test.mjs checks only --color-text-secondary; asserting that neither text token appears would also catch a regression that writes only the primary one.
Claims and files checked

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

  • Claim: it replaces the closed earlier pull request with the same change on main, with that review's findings fixed. Verified: it targets main with one commit, and the description and Item wording findings are fixed.
  • Claim: a text color on a listed row that draws no text itself now reaches the text tokens its label reads. Verified: the option-row rule gains both text tokens.
  • Claim: with a dark hover fill, every option row gets readable text, its description included. Verified: the hover rule sets the primary and the secondary text token, and no new contrast problem is reported.
  • Claim: a table, card or markdown block keeps the color on itself. Verified: across every part the editor knows, only the Selector option row changes.
  • Claim: the part's component comes from the shared target lookup, and anatomy is followed only for a row listed more than once. Verified in the settings module.
  • Claim: the census records the parts drawn on the same element, so the option's Item counts as the row's label and its description follows. Verified in the census module and by the test.
  • Claim: the four listed files are the whole change, all in the theme editor apart from the release note. Verified.
  • Claim: the new test passes, and its option-row case fails on main. Verified.
  • Claim: the theme editor's test suite gives the same results as on main. Verified for the 25 test files that touch option rows or set colors with options; the full suite was not run.
  • Claim: no component changes and no public API is added. Verified.
  • Claim: one behavior is restored with nothing hidden under the fix. Verified: the single output change is the one the owner ruling covers.
  • Claim: public text carries no internal context. Verified.
  • Claim: a replay check found nothing worse at this head. Not checkable here: no replay results were available.
  • Claim (release note): an experimental patch note for the CLI describing the same behavior. Verified.
  • File .changeset/experimental-theme-row-label-color.md: clear.
  • File packages/cli/api/theme-edit/_parts.mjs: clear.
  • File packages/cli/api/theme-edit/_settings.mjs: clear.
  • File packages/cli/api/theme-edit/theme-row-label-color.test.mjs: the non-blocking guard note above.

Automated review (maintainer link)

css.match(new RegExp(`\\.astryx-${p}\\b[^{]*\\{[^}]*\\}`, 'g')) ?? []
).join('\n'),
p,
).not.toMatch(/--color-text-secondary: #123456/);

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.

Non-blocking: this guard checks only the secondary token, so a regression that wrote just --color-text-primary: #123456 into the Table or Markdown rule would still pass. Checking both keeps the guard whole:

).not.toMatch(/--color-text-(primary|secondary): #123456/);

…onent's part reaches the tokens that label reads
@josephfarina
josephfarina force-pushed the josephfarina/editor-row-label-color-2 branch from 4dc8f8b to 1e76797 Compare November 21, 2026 08:49
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 1e76797

@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: CI has not run on this head yet, and the full run has to pass before merge.

A color set on Selector's option rows with the experimental theme editor now also sets the two text tokens the option's label and description read, as the engineering owner's ruling on this pull request decides. Only that part's output changes, and the new test fails before the change and passes after it.

  • Non-blocking: the Table/Markdown case in theme-row-label-color.test.mjs checks only --color-text-secondary; asserting that neither text token appears would also catch a regression that writes only the primary one.
Claims and files checked

Review mode: full; reason: history

  • Claim: it replaces the closed earlier pull request with the same change on main, with that review's findings fixed. Verified: one commit on main whose code matches the earlier pull request's, apart from comment and release-note wording.
  • Claim (title): a text color on an option row reaches the tokens its label and description read. Verified: the option-row rule gains both text tokens.
  • Claim: a text color on a listed row that draws no text itself, whose label is its own component's part, reaches the text tokens that label reads. Verified in the settings module and by the new test.
  • Claim: with a dark hover fill, every option row gets readable text, its description included. Verified: the hover rule sets both text tokens, the label and description render white, and no new contrast problem is reported.
  • Claim: a part with a color of its own that is no such row, such as a table or a markdown block, keeps the color on itself. Verified: across every part the editor knows, only the option row changes.
  • Claim: the part's component comes from the shared target lookup, and anatomy is followed only for a row another part lists. Verified in the settings module.
  • Claim: the census records the other parts drawn on the same element, so the option's Item counts as the row's label and its description follows. Verified in the census module and by the test.
  • Claim: each change is one behaviour with its own test, and nothing outside the theme editor changes apart from the release note. Verified.
  • Claim: the four listed files are the whole change. Verified.
  • Claim: the new test passes, and its option-row case fails on main. Verified.
  • Claim: the theme editor's whole test suite gives the same results as on main. Verified for the 46 test files that touch option rows, the part census or part colors; the rest of the suite was not run.
  • Claim: no component changes, and no public API, default, visual representation or interaction model hides under the fix. Verified.
  • Claim: one behaviour is restored, with nothing else riding along. Verified: the single output change is the one the owner ruling covers.
  • Claim: public text carries no internal context. Verified.
  • Claim: a replay found nothing worse, carried from the earlier pull request with only comment and release-note text changed. The carried part is verified; the replay results themselves were not available.
  • Claim (release note): an experimental patch note for the CLI that describes the same behaviour. Verified.
  • File .changeset/experimental-theme-row-label-color.md: clear.
  • File packages/cli/api/theme-edit/_parts.mjs: clear.
  • File packages/cli/api/theme-edit/_settings.mjs: clear.
  • File packages/cli/api/theme-edit/theme-row-label-color.test.mjs: the non-blocking guard note above.

Automated review (maintainer link)

@josephfarina
josephfarina changed the base branch from main to feature/theme-editor November 21, 2026 10:29
@josephfarina
josephfarina merged commit 3db4f41 into feature/theme-editor Nov 21, 2026
17 of 71 checks passed
josephfarina added a commit that referenced this pull request Nov 21, 2026
…its label and description read (#13241)

Reviewed pull request #13241, merged into the theme working branch. It reaches main with the branch's next landing.
josephfarina added a commit that referenced this pull request Nov 21, 2026
- #13225 experimental theme: a whole-theme border color reaches the fields' edge at the nearest shade that keeps 3:1...
- #13186 fix(cli): a color said with a tint word fills with that color again
- #13091 experimental theme: a kept palette stays as saved through hand edits and undo
- #13233 fix(cli): on a one-family base, a body font set alone keeps empty-state titles on the heading font
- #13256 fix(cli): the fields-at-3:1 note prints its exact-color command in full, with the color quoted
- #13044 feat(cli): experimental theme how: readings held back from round 15
- #13241 experimental theme: a text color on an option row reaches the tokens its label and description read
@josephfarina

Copy link
Copy Markdown
Contributor Author

Landed on main in #13276.

@github-actions
github-actions Bot deleted the josephfarina/editor-row-label-color-2 branch November 22, 2026 06:04

This branch was successfully deployed

1 active deployment
Preview — 1e76797e 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