Repository navigation
experimental theme how: a heading's label run reads two-word and hyphenated labels; a short sentence is no heading - #13396
Conversation
…l sets its setting [skip ci]
…enated labels; a short sentence is no heading Fixes the review findings on #13374. [skip ci]
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
|
/approve-spec 328583b |
There was a problem hiding this comment.
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: smallanswerscorners round --on cardhere andcorners smallon the base branch); capping the label at the three words the heading rule already uses keepsbackground colorandborder-radiusand 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.answerscorners smallhere andcorners roundon 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 largeandspacing roomyfor 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
howtest files. Partly verified: the changed file passes 114 of 114 here and four neighbouringhowsuites 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.
| 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( |
There was a problem hiding this comment.
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.
- #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
|
Landed on main in #13412. |
Fixes the review findings on #13374 (stacked directly on it; the two enter together).
User impact
With #13374 alone:
Problem and solution fit
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
corners round --on cardonly (wascorners largeon the theme with experimental theme how: a label after an earlier part's sentence still sets its setting #13374).spacing more --on card(wasspacing roomyon the theme).corners small.corners small. "Density: roomy\nRadius: small" →spacing roomy,corners small.Scope
Testing
CI=1 vitest run --project nodeon the four how test files: 913/913 pass.replay: worse 0 at 328583b
preflight: pass 328583b (review deferred to batch: subagent cap)