Repository navigation
experimental theme: a text color on an option row reaches the tokens its label and description read - #13241
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
|
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. |
|
/approve-spec 4dc8f8b |
PR Analysis Report🔎 Preview ·
|
There was a problem hiding this comment.
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.mjschecks 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.
| css.match(new RegExp(`\\.astryx-${p}\\b[^{]*\\{[^}]*\\}`, 'g')) ?? [] | ||
| ).join('\n'), | ||
| p, | ||
| ).not.toMatch(/--color-text-secondary: #123456/); |
There was a problem hiding this comment.
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
4dc8f8b to
1e76797
Compare
|
/approve-spec 1e76797 |
There was a problem hiding this comment.
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.mjschecks 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.
- #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
|
Landed on main in #13276. |
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. Socolor #fff --on option-rows --state hoverbeside 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
setorhowcommands, with its own test, and touches nothing outsidepackages/cli/api/theme-editapart from its changeset.colorTokensReachedtakes 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 (listedin the census).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 recordsdrawnAs.packages/cli/api/theme-edit/_settings.mjs:colorTokensReachedreaches 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.packages/cli/api/theme-editsuite gives the same results as on main.Scope
Components: none (experimental theme editor only)
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)