Skip to content

experimental theme editor how: the stripes' names match in their own forms and with the table named - #13211

Merged
josephfarina merged 1 commit into
feature/theme-editorfrom
theme-editor-how-stripe-name-forms
Nov 21, 2026
Merged

josephfarina merged 1 commit into
feature/theme-editorfrom
theme-editor-how-stripe-name-forms

Conversation

@josephfarina

Copy link
Copy Markdown
Contributor

astryx experimental theme editor how read the stripes' names from Table's isStriped doc too literally: "alternate" matched only as that exact word, and "every other row" only as that phrase (plurals aside). So "alternating row colors", "alternating rows" and "shade every other table row" got only a lookup, and "every other table row light gray" colored every row. A name's own words now match in their own forms ("alternate" as alternates, alternated, alternating, alternately; "stripes" as stripe, striped, striping), never another word that starts the same ("strip", "alternative"), and a phrase made of common words may name the component before its last word ("every other table row"). The names still come only from the doc; there is no phrase list.

What changes

  • "shade every other table row", "alternating row colors", "alternating rows", "alternately shaded rows" → the even stripe on every data-driven table (background-color 'var(--color-background-muted)' --on table-row --when parity:even), as "shade every other row" already did.
  • "every other table row light gray" → the stripe color (--color-background-muted '#e5e7eb' --on table-row --mode light), as "every other row light gray" already did, instead of a fill on every row.
  • Unchanged: "shade every other row", "alternate row shading", "every other row light gray", and "alternate table row text color red" (still the text's ask, with no stripe).

Scope

Experimental: astryx experimental theme editor how only.

  • No change to the stable CLI.
  • Public text and artifacts contain no internal Meta context.

Testing

  • theme-how.test.mjs: the five asks above, each checked for its top command (they fail on main); "strip the background from table rows" answers as "remove the background from table rows" does, and "alternatively make the table rows light gray" writes no stripe.
  • Editor and command suites with CI=1; the type gate.

replay: worse 0 at eebecc4
preflight: pass eebecc4 (review deferred to batch: subagent cap)

@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 6:06am UTC

Request Review

@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, 6:19 AM UTC

@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

Covers the theme-editor reading this pull request records (the owner's ruling): the stripes' names match in their own forms and with the table named ("striped rows", "the table's stripes").

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec eebecc4

@github-actions

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · eebecc4

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

Current run: Heavy CI deferred: runs when review passes and before merge. Lint, typecheck and any path-filtered checks ran on this push.


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: CI has not run on this head yet. The heavy suites run once this review passes, so nothing more is needed from you.

An engineering owner's /approve-spec for this head decides both new readings of how. The five asks the description lists now get the stripe line, and the asks it lists as unchanged answer exactly as before.

Non-blocking:

  • packages/cli/api/theme-edit/_how-question.mjs:4999: for a stripe name that is one common word, the new pattern needs a space before that word, so it no longer matches at the start of an ask ("rows light gray"); [...bare.slice(0, -1), named + bare.at(-1)].join('s?\\s+') builds the same pattern for "every other row" and fixes that case (Table's doc has no such name today).
Claims and files checked

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

  • Changeset: the stripe names from Table's isStriped doc match in their own forms and with the table named. Verified (_how-question.mjs:4971-4999).
  • Changeset: "alternating row colors", "alternately shaded rows" and "shade every other table row" stripe the even rows. Verified: the new tests pass on the head and fail on the base.
  • Changeset: "every other table row light gray" colours the stripe instead of every row. Verified: its test passes on the head; the base wrote a fill on every row.
  • Description: on the base, "alternate" matched only as that word and "every other row" only as that phrase. Verified from the base matcher.
  • Description: "alternating row colors", "alternating rows" and "shade every other table row" got only a lookup on the base. Verified: no set line on the base.
  • Description: the forms match (alternates, alternated, alternating, alternately; stripe, striped, striping), never "strip" or "alternative". Verified by the built pattern and the two guard tests.
  • Description: a phrase of common words may name the component before its last word. Verified for Table ("every other table row").
  • Description: the names still come only from the doc, with no phrase list. Verified: every pattern is built from the parity prop's doc.
  • Description: the four asks give the even stripe and "every other table row light gray" gives the stripe colour, as the asks without "table" already did. Verified on the head merged onto main.
  • Description: "shade every other row", "alternate row shading", "every other row light gray" and "alternate table row text color red" are unchanged. Verified: identical answers on the base and the head.
  • Description: experimental only, with no change to the stable CLI. Verified: the changed module is reached only from the experimental theme command.
  • Description: public text and artifacts contain no internal context. Verified.
  • Description: the five asks fail on main; the "strip" and "alternatively" cases hold. Verified: 5 fail on the base with the head's tests; all 658 pass on the head and on the head merged onto main.
  • Description: the editor and command suites and the type gate pass. Partly verified: the how suite passes and CI's typecheck passed at this head.
  • Description: the replay and preflight results. Not verifiable here: they are the author's own runs.
  • .changeset/experimental-theme-how-stripe-name-forms.md: clear (an [experimental] patch for @astryxdesign/cli).
  • packages/cli/api/theme-edit/_how-question.mjs: one non-blocking note (line 4999).
  • packages/cli/api/theme-edit/theme-how.test.mjs: clear; the "strip" guard compares two real answers, not two empty ones.

Automated review (maintainer link)

? new RegExp(`\\b(?:${own.map(forms).join('|')})\\b`)
: new RegExp(
`\\b${words.map(w => w.replace(/s$/, '')).join('s?\\s+')}s?\\b`,
`\\b${bare.slice(0, -1).join('s?\\s+')}s?\\s+${named}${bare.at(-1)}s?\\b`,

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: when a stripe name is a single common word, bare.slice(0, -1) is empty and this builds \bs?\s+(?:table\s+)?rows?\b, which needs a space before the word, so an ask that starts with it ("rows light gray") stops matching; the base's \brows?\b matched. Joining the component into the last word keeps "every other row" identical and covers that case:

`\\b${[...bare.slice(0, -1), named + bare.at(-1)].join('s?\\s+')}s?\\b`

Table's doc has no such name today.

@josephfarina
josephfarina changed the base branch from main to feature/theme-editor November 21, 2026 06:21
@josephfarina
josephfarina merged commit 145e952 into feature/theme-editor Nov 21, 2026
70 of 125 checks passed
@josephfarina

Copy link
Copy Markdown
Contributor Author

Landed on main in #13226.

josephfarina added a commit that referenced this pull request Nov 21, 2026
- #13211 experimental theme editor how: the stripes' names match in their own forms and with the table named
- #13176 fix(cli): experimental theme editor - "the page: …" is the page
- #13208 fix(cli): experimental theme editor - a gentle dark mode is no page color
- #12730 experimental theme set: a theme made one-mode says where the page color shows, once
- #13222 fix(cli): experimental theme editor - "bold system type" names no part
- #13223 fix(cli): experimental theme editor - a name in capitals that no part has is no subject
- #12701 fix(cli): how writes the color of a bold run said for a part's text, and the top bar's links take their looks on its nav items
@github-actions
github-actions Bot deleted the theme-editor-how-stripe-name-forms branch November 22, 2026 06:04

This branch was successfully deployed

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