Repository navigation
experimental theme how: a label after an earlier part's sentence still sets its setting - #13374
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
|
/approve-spec e806292 |
There was a problem hiding this comment.
Changes requested: the label fix works for its own example, and an engineering owner recorded the reading for this head, but three things need fixing.
- A part named as a heading with a colon ("Cards:" then "Radius: large") or above numbered labels ("1. Padding: roomy"), or with a blank line before its labels, now sends a corners label to the whole theme (
corners large) instead of the part (corners round --on card), because the heading walk inpackages/cli/api/theme-edit/_how-question.mjs(lines 5157-5166) skips or rejects those heading lines, so the release note's "under a part's heading line ... still keeps the part's reading" does not hold for them. - A decimal in the part's own sentence ends that sentence, so "cards: 1.5px border, radius: large" now writes
corners largeon the whole theme, because line 5154 splits on every full stop instead of only on one before a space or the end, as the clause scans further down the same file do. - The earlier unreleased release note
.changeset/experimental-theme-how-labelled-dial-values.mdstill says a label sets its value only "when no part is named before it in the ask", which this change makes false, so the two notes in the next release contradict each other; reword it to the new scope.
Each fix wants a test row: a colon heading, a numbered list under a heading, a blank line under a heading, and a decimal in the part's sentence. A new commit needs a fresh /approve-spec for its head.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Claim, release note: tagged experimental with a patch bump for the CLI: verified.
- Claim, release note: a spacing or corners label now sets its value after an earlier sentence that names a part: verified ("soft shadows on cards. Radius: small." writes
corners small). - Claim, release note: a label in a part's own sentence keeps the part's reading: verified for the example given; false when that sentence holds a decimal (second finding).
- Claim, release note: a label under a part's heading line keeps the part's reading: verified for "Card" then "Radius: large"; false for a heading with a colon, numbered labels or a blank line (first finding).
- Claim, description: before the change the shadow was written and "Radius" read as one step rounder: verified on the base (
corners round). - Claim, description: a part now keeps a label only in its own sentence or on the heading line above the label lines: holds for plain headings and sentences without decimals; false for the cases in the first two findings.
- Claim, description: the same reading as the earlier, owner-approved label step, only narrowed: the earlier approval covered labels with no part named before them; this head carries its own owner approval; the earlier ruling it names is not recorded in the repository.
- Claim, description: the reader's clause contract is covered by the long-ask binding tests: the test file states the clause-binding rules; no spec record states them.
- Claim, description: one check in the label step, with no setting, command or flag change: verified.
- Claim, description: after the change the label writes
corners smalland the shadow line is unchanged: verified. - Claim, description: the three unchanged asks (a heading with two labels, a part's colon list, two label lines) answer as before: verified, identical on the base and the head.
- Claim, description: the new test row fails on the base: verified (the base writes
corners round). - Claim, description: split out of the earlier labelled-settings pull request: consistent with that pull request's review history.
- Claim, checklist: one defect restored, no tagalongs, no new public API, no internal context: verified; the restoration also brings the regressions in the first two findings.
- Claim, testing: the four how test files pass, 904 of 904: verified at this head.
- File
.changeset/experimental-theme-how-label-after-part-sentence.md: its heading and own-sentence sentences overreach (first two findings). - File
packages/cli/api/theme-edit/_how-question.mjs: first and second findings. - File
packages/cli/api/theme-edit/theme-how-long-ask-binding.test.mjs: clear; the new row fails on the base and passes on the head; rows for the first two findings are missing.
…l sets its setting [skip ci]
e806292 to
3e7094d
Compare
|
/approve-spec 3e7094d |
There was a problem hiding this comment.
Changes requested: the earlier heading and decimal regressions are fixed, and an engineering owner recorded the reading for this head, but two things still need fixing.
- Miss: a label line with a two-word label under a part's heading ("Card", then "Background color: white", then "Radius: large") now sends the corners label to the whole theme (
corners largeinstead ofcorners round --on card), because the heading walk inpackages/cli/api/theme-edit/_how-question.mjs(line 5162) accepts only one word before a label line's colon; letting it take one to three words keeps these asks on the part. - The earlier unreleased release note
.changeset/experimental-theme-how-labelled-dial-values.mdstill says a label that "comes after a part is named" keeps the part's reading, which contradicts the new note and what "soft shadows on cards. Radius: small." now does; reword it to a label in a part's own sentence or under its heading line.
Please add a test row for a two-word label line under a heading. A new commit needs a fresh /approve-spec for its head.
Claims and files checked
Review mode: full; reason: history
- Claim, title: a label after an earlier part's sentence still sets its setting: verified (
corners small). - Claim, new release note: tagged experimental with a patch bump for the CLI: verified.
- Claim, new release note: a spacing or corners label now sets its setting after an earlier sentence that names a part: verified.
- Claim, new release note: a label in a part's own sentence keeps the part's reading: verified, decimals included.
- Claim, new release note: a label under a part's heading line keeps the part's reading: verified for plain, colon, blank-line and numbered headings; false when a two-word label line sits between (first finding).
- Claim, earlier release note as reworded: a label that names the spacing or corners setting, with one of its values, sets it; one that belongs to a part keeps the part's reading: verified.
- Claim, earlier release note as reworded: a label that comes after a part is named keeps the part's reading: false (second finding).
- Claim, description: before the change the shadow was written and "Radius" read as one step rounder: verified (
corners round). - Claim, description: after the change the label writes
corners smalland the shadow line is unchanged: verified. - Claim, description: the seven heading and decimal asks it lists still write only part lines: verified.
- Claim, description: two label lines with no part set spacing and corners: verified.
- Claim, description: a part keeps a label in its own sentence, or under the short heading above a run of label lines, past numbered labels, blank lines and a heading's colon: false for a run holding a two-word label line (first finding).
- Claim, description: an engineering owner approved this reading at this head: verified.
- Claim, description: the earlier release note is reworded to match: partly; one clause still contradicts (second finding).
- Claim, description: the reader's clause contract is covered by the long-ask binding tests: the test file states the clause rules; no spec record states them.
- Claim, description: one check in the label step, with no setting, command or flag change: verified.
- Claim, description: the new row fails before the change, and new rows cover each heading and decimal shape: verified.
- Claim, checklist: one defect restored, no tagalongs, no new public API, no internal context: verified, apart from the first finding's regression.
- Claim, testing: the four how test files pass, 910 of 910: verified.
- File
.changeset/experimental-theme-how-label-after-part-sentence.md: its heading sentence overreaches (first finding). - File
.changeset/experimental-theme-how-labelled-dial-values.md: second finding. - File
packages/cli/api/theme-edit/_how-question.mjs: first finding. - File
packages/cli/api/theme-edit/theme-how-long-ask-binding.test.mjs: clear; a row for the first finding is missing.
| while ( | ||
| k >= 0 && | ||
| (!String(lines[k]).trim() || | ||
| /^\s*(?:\d+[.)]\s*)?[a-z]+[ \t]*:[ \t]*\S/.test(String(lines[k]))) |
There was a problem hiding this comment.
Miss: this test takes only one word before the colon, so a two-word label line ends the walk, becomes the heading, and is then rejected at line 5170 for holding a colon. "Card" ⏎ "Background color: white" ⏎ "Radius: large" now writes corners large on the whole theme (before: corners round --on card), and so do "Font weight: bold" and "Text color: gray" lines; "Card" ⏎ "Border radius: 12px" ⏎ "Padding: roomy" writes spacing roomy. Taking one to three words before the colon keeps these on the part:
/^\s*(?:\d+[.)]\s*)?[a-z]+(?:[ \t]+[a-z]+){0,2}[ \t]*:[ \t]*\S/.test(String(lines[k]))| [experimental] `astryx experimental theme editor how` reads a labelled look more closely: | ||
|
|
||
| - A label at the start of a clause or a line that names the spacing or the corners setting, followed by one of that setting's own values ("Density: roomy.", "Radius: small"), sets it to that value when no part is named before it in the ask. A label that belongs to a part ("Body weight: bold.", "Buttons: soft."), or comes after a part is named ("Card" with "Radius: large" on the next line), keeps the part's reading. | ||
| - A label at the start of a clause or a line that names the spacing or the corners setting, followed by one of that setting's own values ("Density: roomy.", "Radius: small"), sets it to that value. A label that belongs to a part ("Body weight: bold.", "Buttons: soft."), or comes after a part is named ("Card" with "Radius: large" on the next line), keeps the part's reading. |
There was a problem hiding this comment.
"or comes after a part is named" still contradicts the new note: "soft shadows on cards. Radius: small." comes after a part is named and now writes corners small. Something like "or sits in a part's own sentence or under its heading line ("Card" with "Radius: large" on the next line)" matches the new rule.
- #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. |
User impact
In
astryx experimental theme editor how, a labelled spacing or corners value ("Radius: small.") was left unread when any part had been named earlier in the ask. "soft shadows on cards. Radius: small." wrote the shadow but read "Radius" only as one step rounder (corners round), not ascorners small.Problem and solution fit
The label step skipped every label after any part named earlier in the ask. That keeps a part's own labels with the part, but it also drops labels that come in a later sentence. Now a label is the part's only when:
Decision
The owner approved this reading at this head: a "Label: value" for spacing or corners sets that setting unless a part keeps it as above. The earlier labelled-dials release note is reworded to match.
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
One check in the label step. Its sentence and heading start after the label's lead (the period or line break before it). No setting, command or flag changes.
Evidence
corners round.corners small, and the shadow line is unchanged.--on cardlines only.spacing roomy,corners small.Scope
Testing
CI=1 vitest run --project nodeon the four how test files (binding, every-clause, how, non-asks): 910/910 pass.replay: worse 0 at 3e7094d
preflight: pass 3e7094d (CI half pass; review findings are the paired fix's: #13396)