Skip to content

experimental theme how: a heading's label run reads two-word and hyphenated labels; a short sentence is no heading - #13396

Merged
josephfarina merged 2 commits into
feature/theme-editorfrom
c/how-label-heading-run
Nov 21, 2026
Merged

josephfarina merged 2 commits into
feature/theme-editorfrom
c/how-label-heading-run

Conversation

@josephfarina

@josephfarina josephfarina commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Fixes the review findings on #13374 (stacked directly on it; the two enter together).

User impact

With #13374 alone:

  • Under a part's heading line, a run of label lines with a two-word or hyphenated label ("Card", "Background color: white", "Radius: large"; "Card", "Border-radius: 8px", "Padding: roomy") sent the next label to the whole theme. Every component's corners or spacing changed instead of the card's.
  • A short sentence on its own line ("Soft cards.", then "Radius: small.") was taken for a heading, so the label was left unread.
  • The earlier labelled-dials release note still said a label after any part keeps the part's reading.

Problem and solution fit

  • The heading walk now steps over label lines whose label has several words or a hyphen.
  • A line that ends in sentence punctuation is never a heading.
  • The earlier note now says a label keeps the part's reading in the part's own sentence or under its heading line.

Decision

The reading the owner approved on #13374, applied to these shapes. No new rule.

Expected behavior and authority

The how reader's contract: a clause names its setting and value. It is covered by theme-how-long-ask-binding.test.mjs.

Smallest restoration

Two conditions in the heading walk, plus one release-note sentence. No setting, command or flag changes.

Evidence

Scope

  • 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 vitest run --project node on the four how test files: 913/913 pass.

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

…enated labels; a short sentence is no heading

Fixes the review findings on #13374.

[skip ci]
@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:36pm 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, 4:44 PM UTC

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 328583b

@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 required checks have not run on this head yet, so it is not ready to merge until they pass.

The two conditions added to the heading walk do what the release notes say: under a part's heading line a label run stays with the part when a label has two words or a hyphen, and a line that ends in sentence punctuation is no longer a heading. The three new rows fail on the base branch and pass here, while the other 111 rows in that file and four neighbouring how suites are unchanged. The reworded labelled-dial note now matches what the code does.

  • Non-blocking: the widened label-line pattern accepts any number of lowercase words before the colon, so a prose line with a colon inside a brief joins the label run too (Cards / I want it calmer: softer shadows / Radius: small answers corners round --on card here and corners small on the base branch); capping the label at the three words the heading rule already uses keeps background color and border-radius and leaves longer prose as the heading.
Claims and files checked

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

  • Claim, new release note: under a part's heading line a label run stays the part's when a label has two words or a hyphen. Verified: the two new rows and the measured answers on both trees.
  • Claim, new release note: a short sentence on its own line is not a heading, so the label after it sets its setting. Verified: Soft cards. / Radius: small. answers corners small here and corners round on the base branch.
  • Claim, edited release note: a label keeps the part's reading in the part's own sentence or under its heading line. Verified against the two branches of the condition at _how-question.mjs:5170-5176.
  • Claim, description: the base branch answered corners large and spacing roomy for the two heading shapes and left the label unread after a short sentence. Verified by running the base branch with this head's test file.
  • Claim, description: the shapes listed as unchanged stay unchanged (Cards: heading run, a label after an earlier part sentence, Density: roomy / Radius: small). Verified by running both trees.
  • Claim, description: three new rows, one per shape, each failing on the base branch. Verified: exactly three failures there, with the file's other 111 rows passing.
  • Claim, description: no setting, command or flag changes. Verified: the command's doc file is identical between base and head and no option moves.
  • Claim, description: 913 of 913 tests pass across four how test files. Partly verified: the changed file passes 114 of 114 here and four neighbouring how suites pass; the four files behind that count are not named, so the count itself was not reproduced.
  • Claim, changeset: a patch release of the CLI package. Verified: a behaviour fix in an experimental command with no public API change.
  • File .changeset/experimental-theme-how-label-heading-run.md: clear.
  • File .changeset/experimental-theme-how-labelled-dial-values.md: clear; the reworded sentence matches the code at this head.
  • File packages/cli/api/theme-edit/_how-question.mjs: one non-blocking note, above.
  • File packages/cli/api/theme-edit/theme-how-long-ask-binding.test.mjs: clear; three rows in the existing table's style, each red on the base branch.

Automated review (maintainer link)

k >= 0 &&
(!String(lines[k]).trim() ||
/^\s*(?:\d+[.)]\s*)?[a-z]+[ \t]*:[ \t]*\S/.test(String(lines[k])))
/^\s*(?:\d+[.)]\s*)?[a-z][a-z -]*[ \t]*:[ \t]*\S/.test(

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: [a-z][a-z -]* puts no bound on the label, so any run of lowercase words before a colon counts as a label line and a prose line inside a brief joins the run. Measured: Cards / I want it calmer: softer shadows / Radius: small answers corners round --on card here and corners small on the base branch. Capping it at the three words the heading rule already uses, [a-z]+(?:[ -][a-z]+){0,2}, keeps background color and border-radius and leaves longer prose as the heading.

@josephfarina
josephfarina marked this pull request as ready for review November 21, 2026 16:46
@josephfarina
josephfarina changed the base branch from c/how-label-sentence-scope to feature/theme-editor November 21, 2026 16:47
@josephfarina
josephfarina merged commit 67808df into feature/theme-editor Nov 21, 2026
9 checks passed
josephfarina added a commit that referenced this pull request Nov 21, 2026
…enated labels; a short sentence is no heading (#13396)

Reviewed pull request #13396, merged into the theme working branch with only its own changes (the layer below it, #13374, is already here). It reaches main with the branch's next landing.
josephfarina added a commit that referenced this pull request Nov 21, 2026
…enated labels; a short sentence is no heading (#13396)

Reviewed pull request #13396, merged into the theme working branch with only its own changes (the layer below it, #13374, is already here). It reaches main with the branch's next landing.
josephfarina added a commit that referenced this pull request Nov 21, 2026
…enated labels; a short sentence is no heading (#13396)

Reviewed pull request #13396, merged into the theme working branch with only its own changes (the layer below it, #13374, is already here). It reaches main with the branch's next landing.
josephfarina added a commit that referenced this pull request Nov 21, 2026
…enated labels; a short sentence is no heading (#13396)

Reviewed pull request #13396, merged into the theme working branch with only its own changes (the layer below it, #13374, is already here). It reaches main with the branch's next landing.
josephfarina added a commit that referenced this pull request Nov 21, 2026
…enated labels; a short sentence is no heading (#13396)

Reviewed pull request #13396, merged into the theme working branch with only its own changes (the layer below it, #13374, is already here). It reaches main with the branch's next landing.
josephfarina added a commit that referenced this pull request Nov 21, 2026
- #13196 how: every part named before a colon is a subject of the list
- #13283 experimental theme how: a file named in url() is a value, written as typed
- #13297 experimental theme how: a file in a follow-up ask is written as typed
- #13298 experimental theme how: a second url() layer left unwritten is named as not used
- #13317 experimental theme how: a file's path changes no other ask inside the question reader
- #13251 set: a text size said of a title piece goes on its holder's main text
- #13374 experimental theme how: a label after an earlier part's sentence still sets its setting
- #13396 experimental theme how: a heading's label run reads two-word and hyphenated labels; a short sentence is no heading
- #13263 how: in asks like "Header: navy. Cards: …, gray header." another sentence's part stays an item
- #13378 fix(cli): a radius named for one corner writes that corner only
- #13389 experimental theme how: the url() note no longer lists the follow-up ask as uncovered
- #13435 experimental theme how: the url() layer note names only the phrasing still left out
- #13449 how: a colon-list item is read in the sentence that holds it as typed
@josephfarina

Copy link
Copy Markdown
Contributor Author

Landed on main in #13412.

@github-actions
github-actions Bot deleted the c/how-label-heading-run branch November 22, 2026 06:04

This branch was successfully deployed

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