Repository navigation
fix(cli): a padding of two to four lengths where only one works is written as its sides - #12742
josephfarina wants to merge 16 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
There was a problem hiding this comment.
Approval waits on an engineering owner decision, and the fixes below are needed after it.
The experimental theme editor's set now writes a padding of two to four lengths as its sides on parts that read padding inside calc(), and adds an asSides field to the set result. No current record decides that behavior or covers the field, so an engineering owner records the decision by commenting /approve-spec <full head SHA>; the author may do so as an engineering owner.
Blocking findings:
- After a repeat
setthat changes nothing, the result still saysundo <theme> takes back all 2next to "no undo step was added", and thatundothen takes back an earlier unrelated change (amodechange in our run); build the note and status line from what the commit wrote (_edit.mjs:6778-6782,theme.mjs:597). - Sides after the first skip the longhand replacement, so an earlier
padding-left 9pxstays saved underpadding '5px 0'and comes back afterundo <theme> padding-inline --on dropdown-menu, while a plainset padding-inlinereplaces it (_edit.mjs:6296-6299,_edit.mjs:6344-6370). - The description says a refusal happens only when the part cannot take a side, but
padding '5px 10%'is refused with onlyhow paddingoffered althoughpadding-inline 10%is accepted (_check.mjs:281); let each side's own check decide or narrow the claim. - The description's scope box says no new public API is added, but
asSidesis new on the exportedThemeEditChangeDataand inset --json; name it in the description.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Changeset:
setwith a padding of two to four lengths on a calc() padding part writes the sides in one change: verified (_check.mjs:7304-7321,_edit.mjs:5866,_edit.mjs:6296; new test). - Changeset: two lengths give block and inline, three give top, inline and bottom, four give each side, each with its typed length: verified (
_check.mjs:277-300; new test). - Changeset: the result names the sides: verified (note
_edit.mjs:6778-6782,asSides_edit.mjs:7342-7350, status linetheme.mjs:600). - Changeset: one undo takes back all of them: verified (new test; a bare undo prints "undid 4 changes"), except after a no-change repeat (first finding).
- Changeset: the same length on every side is written as that one length: verified (new test).
- Description: menus and segmented controls take padding-block, padding-inline and per-side paddings: verified (new test, theme-palette test).
- Description: the quoted result note and one bare undo removing all sides: verified (head CLI run).
- Description: any value CSS defines and the part can take is written; a refusal comes only from a side's own check: false (third finding).
- Description: a hand-edited saved entry is still checked as written: verified (theme-palette hand-edited padding test passes; only
setpassesflags.sides). - Description:
boxSidesreplacesboxSideLines, and the repair-gate coverage rule stays with a unit test: verified (diff; the test passes on base and head). - Description: before, the set refuses and offers side lines; after, the CSS has padding-top and padding-bottom 5px and padding-left and padding-right 0: verified (base and head CLI runs).
- Description: one length, a variable and calc(), min(), max() or clamp() are unchanged, and
padding-inline '4px 8px'on an item is still refused: verified (theme-palette test passes). - Description: the new test fails before the change: verified (fails on the base, passes on the head).
- Description: 483 of 492 test files pass and the typechecks are clean: not reproduced (only the changed tests were run).
- Description: no new public API under the bug-fix label: false (fourth finding).
.changeset/experimental-theme-calc-padding-sides.md: clear.packages/cli/api/theme-edit/_check.mjs: third finding (length-only filter).packages/cli/api/theme-edit/_edit.mjs: first and second findings.packages/cli/api/theme-edit/_settings.mjs: clear.packages/cli/api/theme-edit/theme-edit.type.mjs: newasSidesmember, part of the owner decision.packages/cli/clients/cli/commands/experimental/theme.mjs: first finding (status line after no change).packages/cli/api/theme-edit/theme-edit-calc-padding-sides.test.mjs: clear; it covers neither a repeat nor earlier side settings.packages/cli/api/theme-edit/theme-palette.test.mjs: clear.packages/cli/api/theme-edit/theme-repair-gate-value-carry.test.mjs: clear.
|
/approve-spec aab4ee6 |
There was a problem hiding this comment.
Changes requested: the engineering owner's approval settles the direction, and the fixes below remain.
The experimental theme editor's set now writes a padding of two to four lengths as its sides on parts that read padding inside calc(). The approval for this head covers that behavior and the new asSides result field, so no spec decision is pending.
Blocking findings:
- After a repeat
setthat changes nothing, the result still saysundo <theme> takes back all 2next to "no undo step was added", and thatundothen takes back an earlier unrelated change (for example amodechange), so build the note and status line from what the commit wrote (_edit.mjs:6778-6782,theme.mjs:597). - Sides after the first skip the longhand replacement, so an earlier
padding-left 9pxstays saved underpadding '5px 0'and comes back afterundo <theme> padding-inline --on dropdown-menu, while a plainset padding-inlinereplaces it (_edit.mjs:6296-6299,_edit.mjs:6344-6370). - The description says a refusal happens only when the part cannot take a side, but
padding '5px 10%'is refused with onlyhow paddingoffered althoughpadding-inline 10%is accepted (_check.mjs:281), so let each side's own check decide or narrow the claim. - The description's scope box says no new public API is added, but
asSidesis new on the exportedThemeEditChangeDataand inset --json, so name it in the description.
The new repair-gate commit looks right: its added assertion fails against the base's rule and passes on this head.
Claims and files checked
Review mode: incremental; reason: none
- Changeset:
setwith a padding of two to four lengths on a calc() padding part writes the sides in one change: verified (_check.mjs:7304-7321,_edit.mjs:5866,_edit.mjs:6296; new test). - Changeset: two lengths give block and inline, three give top, inline and bottom, four give each side, each with its typed length: verified (
_check.mjs:277-300; new test). - Changeset: the result names the sides: verified (note
_edit.mjs:6778-6782,asSides_edit.mjs:7342-7350, status linetheme.mjs:600). - Changeset: one undo takes back all of them: verified (new test), except after a no-change repeat (first finding).
- Changeset: the same length on every side is written as that one length: verified (new test).
- Description: menus and segmented controls take padding-block, padding-inline and per-side paddings: verified (new test, theme-palette test).
- Description: the quoted result note, and one bare undo removing all sides: verified (new test; head run).
- Description: any value CSS defines and the part can take is written, and a refusal comes only from a side's own check: false (third finding).
- Description: a hand-edited saved entry is still checked as written: verified (theme-palette passes; only
setasks for sides,_edit.mjs:5563). - Description:
boxSidesreplacesboxSideLines, and_edit.mjswrites the first side as the change and the others in the same commit, with a note: verified (diff). - Description: the base's repair-gate coverage fix stays, with a unit test: verified; this head also narrows it so a line reading the whole value carries nothing (
_normal.mjs:1847), and the new assertion fails against the base's rule. - Description: before, the set refuses and offers side lines; after, it writes the two sides and the built CSS sets the matching physical paddings: verified (base and head runs; the code is unchanged since).
- Description: one length, a variable and calc(), min(), max() or clamp() are unchanged, and
padding-inline '4px 8px'on an item is still refused: verified (theme-palette passes). - Description: the listed tests cover the new behavior and the coverage rule: verified (29 changed tests pass; nine neighbouring test files, 824 tests, pass).
- Description: 483 of 492 test files pass and the typechecks are clean: not reproduced (only the changed and neighbouring test files were run).
- Description: no new public API is hidden under the bug-fix label: false (fourth finding).
.changeset/experimental-theme-calc-padding-sides.md: clear.packages/cli/api/theme-edit/_check.mjs: third finding (length-only filter).packages/cli/api/theme-edit/_edit.mjs: first and second findings.packages/cli/api/theme-edit/_normal.mjs: clear.packages/cli/api/theme-edit/_settings.mjs: clear.packages/cli/api/theme-edit/theme-edit.type.mjs: clear (newasSidesmember, covered by the approval; see the fourth finding for the description).packages/cli/clients/cli/commands/experimental/theme.mjs: first finding (status line after no change).packages/cli/api/theme-edit/theme-edit-calc-padding-sides.test.mjs: clear; it covers neither a repeat nor earlier side settings.packages/cli/api/theme-edit/theme-palette.test.mjs: clear.packages/cli/api/theme-edit/theme-repair-gate-value-carry.test.mjs: clear.
|
/approve-spec 76b4ad5 |
There was a problem hiding this comment.
Changes requested: the engineering owner's approval settles the direction, the three earlier findings are fixed, and two fixes remain.
- Miss: after
set t padding '5px 0' --on dropdown-menu,set t padding '3px 2px' --on menusreports onlypadding-blockon dropdown-menu as no longer showing although itspadding-inline 0is hidden too, because the note in_edit.mjs(lines 7301-7304) reads only the first side; run it for every side written. - The description says a refusal happens only when a side's own check refuses, but
padding '10% 10%'and'0 0'on dropdown-menu are refused by the one-length check afterboxSidescollapses equal values (_check.mjsline 281), while'10% 5%'and'0 5px'are written; collapse only a value that is one working length, or narrow the claim.
Claims and files checked
Review mode: incremental; reason: none
- Changed rules (0): none.
- Claim: a padding of two to four values on a calc() part is written as its sides in one change (two: block and inline; three: top, inline and bottom; four: each side), verified by the calc-padding test and head runs.
- Claim: the result names the sides and one bare undo takes back all of them, verified by the calc-padding test and a head run.
- Claim: the same length said for every side is written as that one length with a note, verified for lengths by the calc-padding test and a head run.
- Claim: each side is read by its own check, so
5px 10%writespadding-inline 10%, verified by the calc-padding test and a head run. - Claim: a value CSS defines and the part can take is written, and a refusal happens only when a side's own check refuses, false for one value said on every side that is not one working length (
10% 10%,0 0). - Claim: each side replaces the longhands it covers, and an earlier
padding-left 9pxcomes back with the undo, verified by the calc-padding test and a head run. - Claim: a repeat that changes nothing says so with the typed value and claims no undo step, verified by the calc-padding test and head runs of the API and the text output.
- Claim: a hand-edited saved entry is still checked as written, verified by code: only the typed value of
setasks for sides. - Claim: the new optional
asSidesfield names the typed value and the sides, and the status line leads with it, verified by head runs ofset --jsonand the text output. - Claim: the earlier offered side lines are removed and the repair-gate coverage rule keeps a unit test, verified; the coverage rule is narrowed rather than kept as it was, which the wording understates.
- Claim: one length, a variable and math functions are unchanged, and a two-length
padding-inlineon an item is still refused, verified by the palette test. - Claim: the listed tests exist and cover the listed cases, verified in the diff; the changed and neighbouring test files pass on the head.
- Claim: the full-suite and typecheck tallies in the Testing section, partly reproduced: the changed and neighbouring files pass, and the JSON API typecheck is clean.
- Changeset: writes the sides in one change, names them, one undo takes back all, and the same length on every side is that length, verified.
- File
.changeset/experimental-theme-calc-padding-sides.md: clear. - File
packages/cli/api/theme-edit/_check.mjs: finding (equal non-length values are refused). - File
packages/cli/api/theme-edit/_edit.mjs: finding (the masked-settings note reads only the first side). - File
packages/cli/api/theme-edit/_normal.mjs: clear. - File
packages/cli/api/theme-edit/_settings.mjs: clear. - File
packages/cli/api/theme-edit/theme-edit-calc-padding-sides.test.mjs: clear. - File
packages/cli/api/theme-edit/theme-edit.type.mjs: clear. - File
packages/cli/api/theme-edit/theme-palette.test.mjs: clear. - File
packages/cli/api/theme-edit/theme-repair-gate-value-carry.test.mjs: clear. - File
packages/cli/clients/cli/commands/experimental/theme.mjs: clear.
|
/approve-spec 93e2bba |
There was a problem hiding this comment.
Changes requested: the engineering owner's approval settles the direction, both earlier findings are fixed, and one description claim needs correcting.
- The description says "A later setting that hides the sides names each side it hides", but after
set q padding '5px 0' --on dropdown-menu, a laterset q padding '1px 2px 3px 4px' --on menushides both dropdown-menu sides and names neither (and'1px 2px 3px'names onlypadding-inline), because the note in_edit.mjs(lines 7301-7307) relies onmaskedSettings, which matches only a later setting of the same side; narrow the claim to same-side settings, as for a plain side set, or extend the note to sides other longhands cover.
Claims and files checked
Review mode: incremental; reason: none
- Changed rules (0): none.
- Claim: a padding of two to four values on a calc() part is written as its sides in one change (two: block and inline; three: top, inline and bottom; four: each side), verified by the calc-padding test and head runs.
- Claim: the result note names the typed value and the sides, and one bare undo takes back all of them, verified by the calc-padding test and a head run.
- Claim: one working length said for every side is written as that length with a note, and an equal value that is no one length (
10% 10%) is written as its sides, verified by the calc-padding test and head runs (0 0too). - Claim: each side is read by its own check, so
5px 10%writespadding-inline 10%, verified by the calc-padding test. - Claim: a value CSS defines and the part can take is written, and a refusal happens only when a side's own check refuses, verified for two to four values; the one-value path is unchanged.
- Claim: each side replaces the longhands it covers, and an earlier
padding-left 9pxcomes back with the undo, verified by the calc-padding test. - Claim: a repeat that changes nothing says so with the typed value and claims no undo step, verified by the calc-padding test.
- Claim: a later setting that hides the sides names each side it hides, false for three- and four-value group paddings (head runs with the built CSS); true for a same-side group padding.
- Claim: a hand-edited saved entry is still checked as written, verified by code: only the typed value of
setasks for sides. - Claim: the new optional
asSidesfield names the typed value and the sides, and the status line leads with it, verified in the type, the result builder and the text formatter, unchanged since the last review's head runs. - Claim: the earlier offered side lines are removed and the repair-gate coverage rule keeps a unit test, verified; the rule is narrowed rather than kept as it was.
- Claim: one length, a variable and math functions are unchanged, and a two-length
padding-inlineon an item is still refused, verified by the palette test. - Claim: the listed tests exist and cover the listed cases, verified; the two new cases fail on the previous revision and pass on this head.
- Claim: the full-suite and typecheck tallies in the Testing section, partly reproduced: the changed and neighbouring files pass, and the JSON API typecheck is clean.
- Changeset: writes the sides in one change, names them, one undo takes back all, and the same length on every side is that length, verified.
- File
.changeset/experimental-theme-calc-padding-sides.md: clear. - File
packages/cli/api/theme-edit/_check.mjs: clear. - File
packages/cli/api/theme-edit/_edit.mjs: finding (the description's hidden-sides claim overstates what the note reports). - File
packages/cli/api/theme-edit/_normal.mjs: clear. - File
packages/cli/api/theme-edit/_settings.mjs: clear. - File
packages/cli/api/theme-edit/theme-edit-calc-padding-sides.test.mjs: clear. - File
packages/cli/api/theme-edit/theme-edit.type.mjs: clear. - File
packages/cli/api/theme-edit/theme-palette.test.mjs: clear. - File
packages/cli/api/theme-edit/theme-repair-gate-value-carry.test.mjs: clear. - File
packages/cli/clients/cli/commands/experimental/theme.mjs: clear.
caad34d to
e173ca5
Compare
93e2bba to
889fb7e
Compare
There was a problem hiding this comment.
Approval waits on an engineering-owner decision for this head, and one fix is needed after it.
The branch was rebased, and an /approve-spec decision covers only the head it names, so the earlier approval of writing a two-to-four-value padding as its sides, and of the new asSides result field, does not carry over. No current spec decides what the editor's set accepts or writes, so an engineering owner records the decision by commenting /approve-spec <full head SHA> on this pull request; the author may do so as an engineering owner.
- Miss: after
set q padding 4px --on dropdown-menu, a laterset q padding '5px 0' --on dropdown-menukeepspadding 4pxsaved beside the new sides with no note (_edit.mjskeys the change by its first side from line 5867), so the build still writes--_dropdown-menu-padding: 4pxfor the menu's row corners,undo q padding-inline --on dropdown-menuthen says the base theme's value applies while the inline padding is 4px, and a hand-editedpadding: 2px 6pxentry survivesset q padding '2px 6px'and keeps refusing the next command; remove and name an earlier setting of the typed shorthand in the same scope, as a plainsetreplaces its previous setting, and have the saved-entry refusal offer the whole value.
Every finding from the earlier reviews is fixed, and the narrowed claim about hidden sides matches the head.
Claims and files checked
Review mode: full; reason: rebase
- Claim: with the base pull request, a two-value padding on a calc() part is refused with the sides offered, verified by a base run.
- Claim: the part takes
padding-block,padding-inlineand each physical side, verified by head runs. - Claim:
setwrites the shorthand as its sides in one change, each side read by its own check, so5px 10%writespadding-inline 10%, verified by the calc-padding test. - Claim: two values become block and inline, three become top, inline and bottom, four become each side, verified by the calc-padding test.
- Claim: the result note names the typed value and the sides, and one bare undo takes back all of them, verified by the calc-padding test and a head run.
- Claim: one working length said for every side is written as that length with a note, and an equal value that is not one length (
10% 10%) is written as its sides, verified by the calc-padding test. - Claim: a value the part can take is written and a refusal happens only when a side's own check refuses, verified for two to four values (
5px autois refused aspadding-inline); the one-value path is unchanged. - Claim: each side replaces the longhands it covers, and an earlier
padding-left 9pxcomes back with the undo, verified by the calc-padding test; an earlierpaddingitself is not replaced (finding). - Claim: a repeat that changes nothing says so with the typed value and claims no undo step, verified by the calc-padding test and a head run.
- Claim: a later setting of the same side names each written side it hides, and a later setting of other longhands that cover it is not named, verified by the calc-padding test and head runs.
- Claim: a hand-edited saved entry is still checked as written, and a hand-edited two-length padding still refuses the next command, verified by a head run.
- Claim: the split helper gives the sides and the calc() check returns them only when
setasks, verified in code. - Claim: the first side is the change's setting, the others are written in the same commit, each replaces its covered longhands, and the note is added, verified in code and tests.
- Claim: the new optional
asSidesfield names the typed value and the sides on the experimental result and inset --json, and the status line leads with it, verified by head runs. - Claim: the offered side lines are removed and the repair-gate coverage fix stays with a unit test, verified; the carry is kept only for a line that offers fewer tokens than were typed.
- Claim: one length, a variable and math functions are unchanged, and a two-length
padding-inlineon an item is still refused, verified by the palette test and head runs. - Claim: after the change the menu's CSS has 5px top and bottom and 0 left and right, and one undo removes both, verified by a head run.
- Claim: the listed tests exist and cover the listed cases, verified; they pass on this head.
- Claim: the Testing section's tallies, partly reproduced: the changed and neighbouring test files pass and the JSON API typecheck is clean; the full suite, the API type sync, the structure check and Prettier were not rerun.
- Claim: the one new public field is
asSideson the experimental result, verified. - Changeset: writes the sides in one change, names them, one undo takes back all, and the same length on every side is that length, verified.
- File
.changeset/experimental-theme-calc-padding-sides.md: clear. - File
packages/cli/api/theme-edit/_check.mjs: clear. - File
packages/cli/api/theme-edit/_edit.mjs: finding (an earlier padding on the same part is not replaced by a two-to-four-value padding). - File
packages/cli/api/theme-edit/_normal.mjs: clear. - File
packages/cli/api/theme-edit/_settings.mjs: clear. - File
packages/cli/api/theme-edit/theme-edit-calc-padding-sides.test.mjs: clear. - File
packages/cli/api/theme-edit/theme-edit.type.mjs: clear. - File
packages/cli/api/theme-edit/theme-palette.test.mjs: clear. - File
packages/cli/api/theme-edit/theme-repair-gate-value-carry.test.mjs: clear. - File
packages/cli/clients/cli/commands/experimental/theme.mjs: clear.
|
/approve-spec d7c682c |
There was a problem hiding this comment.
Changes requested: the engineering owner's approval of this head settles the direction, and the earlier-padding finding is fixed; one fix remains.
- Setting
padding '5px 0' --on dropdown-menuagain afterpadding '3px 2px' --on menushas hidden its sides moves them back on top and adds an undo step, but the note stops at "undo q" (and with'5px 9px'names onlypadding-inline), becausesidesChanged(packages/cli/api/theme-edit/_edit.mjs:6374) counts only sides whose saved entry is new; count every side that moves as changed.
Claims and files checked
Review mode: incremental; reason: none
- Claim: before this change, the two-length padding was refused with offered side lines (verified: the removed
boxSideLinesin_check.mjs). - Claim: two, three and four values become block and inline, top, inline and bottom, and each side, in one change (verified: the sides test).
- Claim: each side is read by its own check, so
5px 10%writespadding-inline 10%(verified: the sides test). - Claim: the result names the sides, and one bare undo takes back all of them (verified: the sides test and a head run).
- Claim: one working length on every side is written as that length with a note, while
10% 10%is written as sides (verified: the sides test). - Claim: a refusal happens only when a side's own check refuses (verified:
5px autois refused aspadding-inline). - Claim: each side replaces the longhands it covers, and an earlier
padding-left 9pxcomes back with the undo (verified: the sides test). - Claim: an earlier
paddingon the part is replaced, named, and restored by undo (verified: the sides test and a head run). - Claim: a repeat that changes nothing keeps every side in place and claims no undo step (verified: the sides test).
- Claim: when only some sides change, the undo note names only those (verified for
5px 0then5px 2px; false when a hidden side moves, the finding above). - Claim: a later setting of the same side names each written side it hides (verified: the sides test).
- Claim: a hand-edited saved entry is still checked as written and refuses the next command (verified: a head run).
- Claim:
asSidesis on the experimentalsetresult and--json, and the status line leads with it (verified:theme-edit.type.mjs:93,theme.mjs:597and:600). - Claim: the CSS gives the menu top and bottom 5px and left and right 0 (verified: a head run).
- Claim: one length, a variable and the calc functions are unchanged, and
padding-inline '4px 8px'on an item is still refused (verified: the palette test). - Claim: the repair-gate fix stays with a unit test (verified: the repair-gate test).
- Claim: typechecks, the CLI structure check and Prettier are clean (verified for the JSON-API typecheck, the structure check and Prettier; the strict typecheck's two errors are in unchanged template pages that import an unbuilt theme).
- Claim: 483 of 492 test files pass (not rerun in full; the three changed test files pass).
- Claim (changeset): the sides are written in one change, named, taken back by one undo, and one repeated length is written once (verified).
- File
.changeset/experimental-theme-calc-padding-sides.md: clear. - File
packages/cli/api/theme-edit/_check.mjs: clear. - File
packages/cli/api/theme-edit/_edit.mjs: the finding above. - File
packages/cli/api/theme-edit/_normal.mjs: clear. - File
packages/cli/api/theme-edit/_settings.mjs: clear. - File
packages/cli/api/theme-edit/theme-edit-calc-padding-sides.test.mjs: clear. - File
packages/cli/api/theme-edit/theme-edit.type.mjs: clear. - File
packages/cli/api/theme-edit/theme-palette.test.mjs: clear. - File
packages/cli/api/theme-edit/theme-repair-gate-value-carry.test.mjs: clear. - File
packages/cli/clients/cli/commands/experimental/theme.mjs: clear.
|
/approve-spec b38afd0 |
There was a problem hiding this comment.
Changes requested: the engineering owner's approval of this head settles the direction, and the earlier undo-note finding is fixed; one fix remains.
- Miss: setting
padding '5px 0' --on dropdown-menuagain after a laterpadding-top 9px(orpadding-left 9px) on the menu removes that longhand and adds an undo step that puts it back, but the first note stops at "undo q " because the undo clause (packages/cli/api/theme-edit/_edit.mjs:6835-6842) names only moved sides and an earlier typed padding; name the longhands the change removes too (for example "brings back padding-top = 9px on dropdown-menu"), so the clause is never empty.
Claims and files checked
Review mode: incremental; reason: none
- changed rules (0): none
- Claim: before this change, a two-length padding on the menu was refused with offered side lines (verified: the removed
boxSideLinesin_check.mjsand the removed test expectations). - Claim: two, three and four values become block and inline; top, inline and bottom; and each side, in one change (verified: the sides test).
- Claim: each side is read by its own check, so
5px 10%writespadding-inline 10%(verified: the sides test). - Claim: the result names the sides, and one bare undo takes back all of them (verified for a first write and for a re-set over a group padding; the undo clause is empty when a re-set only removes a later longhand, the finding above).
- Claim: one working length on every side is written as that length with a note, while
10% 10%is written as sides (verified: the sides test). - Claim: a refusal happens only when a side's own check refuses (verified:
5px autois refused aspadding-inline). - Claim: each side replaces the longhands it covers, and an earlier
padding-left 9pxcomes back with the undo (verified: the sides test). - Claim: an earlier
paddingon the part is replaced, named and restored by undo (verified: the sides test). - Claim: a repeat that changes nothing keeps every side in place, says so with the typed value and claims no undo step (verified: the sides test and a head run).
- Claim: when only some sides change, the undo note names only those (verified: the sides test).
- Claim: a later setting of the same side names each written side it hides, and other covering longhands are not named (verified: the sides test).
- Claim: a hand-edited saved entry is still checked as written (verified: the expansion flag is passed only for the typed
setvalue,_edit.mjs:5564). - Claim:
asSidesis on the experimentalsetresult and--json, and the status line leads with it (verified:theme-edit.type.mjs:93,theme.mjs:597and:600). - Claim: the CSS gives the menu top and bottom 5px and left and right 0 (verified: a head run).
- Claim: one length, a variable and the calc functions are unchanged, and
padding-inline '4px 8px'on an item is still refused (verified: the palette test). - Claim:
boxSideLinesis removed and the repair-gate fix stays with a unit test (verified: the diff and the repair-gate test). - Claim: the CLI typechecks, the structure check and Prettier are clean (verified for the JSON-API typecheck, the structure check and Prettier; the strict typecheck's two errors are in unchanged template pages that import an unbuilt theme).
- Claim: 483 of 492 test files pass (not rerun in full; the three changed test files pass).
- Claim (changeset): the sides are written in one change, named, taken back by one undo, and one repeated length is written once (verified: the sides test).
- File
.changeset/experimental-theme-calc-padding-sides.md: clear. - File
packages/cli/api/theme-edit/_check.mjs: clear. - File
packages/cli/api/theme-edit/_edit.mjs: the finding above. - File
packages/cli/api/theme-edit/_normal.mjs: clear. - File
packages/cli/api/theme-edit/_settings.mjs: clear. - File
packages/cli/api/theme-edit/theme-edit-calc-padding-sides.test.mjs: clear. - File
packages/cli/api/theme-edit/theme-edit.type.mjs: clear. - File
packages/cli/api/theme-edit/theme-palette.test.mjs: clear. - File
packages/cli/api/theme-edit/theme-repair-gate-value-carry.test.mjs: clear. - File
packages/cli/clients/cli/commands/experimental/theme.mjs: clear.
|
/approve-spec 9d13f83 |
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet.
The engineering owner's approval of this head settles the direction, and the earlier undo-note finding is fixed: setting the same padding again after a later padding-top on the menu now says that undo brings it back. No blocking findings remain.
Claims and files checked
Review mode: incremental; reason: none
- changed rules (0): none
- Claim: before this change, a two-length padding on the menu was refused with offered side lines (verified: the removed
boxSideLinesand its removed test expectations). - Claim: two, three and four values become block and inline; top, inline and bottom; and each side, in one change (verified: the sides test).
- Claim: each side is read by its own check, so
5px 10%writespadding-inline 10%(verified: the sides test). - Claim: the result names the sides, and one bare undo takes back all of them (verified: the sides test and a head run).
- Claim: one working length on every side is written as that length with a note, while
10% 10%is written as sides (verified: the sides test). - Claim: a refusal happens only when a side's own check refuses (verified:
5px autois refused aspadding-inlinein a head run). - Claim: each side replaces the longhands it covers, and an earlier
padding-left 9pxcomes back with the undo (verified: the sides test). - Claim: an earlier
paddingon the part is replaced, named and restored by undo (verified: the sides test and a head run). - Claim: a repeat that changes nothing keeps every side in place, says so with the typed value and claims no undo step (verified: the sides tests and a head run).
- Claim: when only some sides change, the undo note names only those (verified: the sides test).
- Claim: a later setting of the same side names each written side it hides, and other covering longhands are not named (verified: the sides test).
- Claim: a hand-edited saved entry is still checked as written, and a hand-edited
padding: 2px 6pxrefuses the next command (verified: a head run; the expansion is asked only for the typedsetvalue,_edit.mjs:5564). - Claim:
asSidesis on the experimentalsetresult and--json, and the status line leads with it (verified:theme-edit.type.mjs:93,theme.mjs:597and:600). - Claim: the CSS gives the menu top and bottom 5px and left and right 0, and one undo removes both (verified: a head run and the sides test).
- Claim: one length, a variable and the calc functions are unchanged, and
padding-inline '4px 8px'on an item is still refused (verified: the palette test). - Claim:
boxSideLinesis removed and the repair-gate fix stays with a unit test (verified: the diff and the repair-gate test). - Claim: the CLI typechecks, the API type sync, the structure check and Prettier are clean (verified for the JSON-API, template-docs and authoring typechecks, the API type sync, the structure check and Prettier; the strict typecheck's two errors are in unchanged template pages that import an unbuilt theme).
- Claim: 483 of 492 test files pass, the failures matching main (verified for the three changed test files, 162 tests; the full run was not repeated).
- Claim (changeset): the sides are written in one change, named, taken back by one undo, and one repeated length is written once (verified: the sides test).
- File
.changeset/experimental-theme-calc-padding-sides.md: clear. - File
packages/cli/api/theme-edit/_check.mjs: clear. - File
packages/cli/api/theme-edit/_edit.mjs: clear. - File
packages/cli/api/theme-edit/_normal.mjs: clear. - File
packages/cli/api/theme-edit/_settings.mjs: clear. - File
packages/cli/api/theme-edit/theme-edit-calc-padding-sides.test.mjs: clear. - File
packages/cli/api/theme-edit/theme-edit.type.mjs: clear. - File
packages/cli/api/theme-edit/theme-palette.test.mjs: clear. - File
packages/cli/api/theme-edit/theme-repair-gate-value-carry.test.mjs: clear. - File
packages/cli/clients/cli/commands/experimental/theme.mjs: clear.
|
/approve-spec 9ce34ac |
…the same value on every side collapses only when it is one working length [skip ci]
…g on the part, and a repeat that changes nothing keeps every side in place [skip ci]
…r moves back on top [skip ci]
… away, so it is never empty [skip ci]
…so a padding written as sides is offered as working [skip ci]
…e, as set writes it as its sides [skip ci]
…iable's typo note [skip ci]
…epeat whose later side carries a note adds no undo step [skip ci]
…ver a stale build claims no undo step [skip ci]
…s its sides [skip ci]
9361f65 to
a1eb90e
Compare
There was a problem hiding this comment.
Approval waits on an engineering-owner decision for this exact head; no code changes are needed.
No current spec decides that set writes a two-to-four value padding on a part that reads its padding inside calc() (dropdown-menu, segmented-control, the menus group) as its sides in one undoable change, that how offers that whole-value line, or the new experimental asSides result field. The earlier /approve-spec comments name older heads, and the decision binds one exact head, so an engineering owner identifies the governing spec or records the decision by commenting /approve-spec <full head SHA> on this head; the author may do so as an engineering owner. The last review's two blockers are fixed here: the branch now carries only its own 12 files, and the CLI's strict typecheck passes.
Claims and files checked
Review mode: full; reason: rebase
- Claim: a two-to-four value padding on a part that reads it inside calc() is written as its sides in one change (verified: the sides tests and command-line runs).
- Claim: before this change,
mainrefused it and offered the side lines (verified: a command-line run onmain). - Claim: two, three and four values become block and inline; top, inline and bottom; and each side, and one undo takes back all of them (verified: the sides tests and command-line runs).
- Claim: each side is read by its own check, so
5px 10%writespadding-inline 10%(verified: a command-line run and the sides test). - Claim: one working length on every side is written once with a note, while
10% 10%is written as sides (verified: a command-line run and the sides tests). - Claim: each side replaces the longhands it covers, and an earlier padding on the part is replaced, named and restored by undo (verified: the sides tests).
- Claim: a repeat that changes nothing keeps every side, names the typed value and claims no undo step, also over a stale or missing build (verified: the sides tests and a command-line run).
- Claim: the undo note names only the sides a change changes (verified: the sides test).
- Claim: a later setting of the same side names each written side it hides (verified: the sides test).
- Claim:
howoffers the whole-valuesetline, never the first length alone (verified: the sides test and runs onmainand this head). - Claim: a state word read as another state is said once for every side (verified: the sides test).
- Claim: a hand-edited saved entry is still checked as written and offered back whole (verified: the sides test).
- Claim:
asSidesis on the experimentalsetresult and--json, and the status line leads with it (verified: command-line runs). - Claim: the offered side lines are replaced, and the repair-gate coverage fix keeps a unit test (verified: the diff and the repair-gate test).
- Claim: one length, a variable and
calc()are unchanged, andpadding-inline '4px 8px'on an item is still refused (verified: the palette test). - Claim: no separable tag-alongs, and
asSidesis the only new API (verified: the diff at this head). - Claim: one defect is restored (not settled: the write is new behaviour that waits on the owner decision above).
- Claim: the CLI typechecks, the API type sync, the CLI structure check and Prettier are clean (verified: each run at this head).
- Claim: the listed test run passes apart from nine environment failures (partly verified: the three changed and seventeen neighbouring test files pass; the full run was not repeated).
- Changeset:
setnow writes the sides in one change, the result names them, one undo takes back all, and one working length is written once (verified: command-line runs); its "before" text (verified: runs of the code before the side lines landed). - File
.changeset/experimental-theme-calc-padding-sides.md: clear. - File
packages/cli/api/theme-edit/_check.mjs: clear. - File
packages/cli/api/theme-edit/_edit.mjs: clear. - File
packages/cli/api/theme-edit/_how-commands.mjs: clear. - File
packages/cli/api/theme-edit/_normal.mjs: clear. - File
packages/cli/api/theme-edit/_settings.mjs: clear. - File
packages/cli/api/theme-edit/_vet.mjs: clear. - File
packages/cli/api/theme-edit/theme-edit.type.mjs:asSideswaits on the owner decision. - File
packages/cli/clients/cli/commands/experimental/theme.mjs: clear. - File
packages/cli/api/theme-edit/theme-edit-calc-padding-sides.test.mjs: clear. - File
packages/cli/api/theme-edit/theme-palette.test.mjs: clear. - File
packages/cli/api/theme-edit/theme-repair-gate-value-carry.test.mjs: clear.
There was a problem hiding this comment.
Approval waits on an engineering-owner decision for this exact head; no code changes are needed.
No current spec decides that set writes a two-to-four value padding on a part that reads its padding inside calc() (dropdown-menu, segmented-control, the menus group) as its sides in one undoable change, what its replace and undo notes say, that how offers that whole-value line, or the new experimental asSides result field. The earlier /approve-spec comments name older heads, and the decision binds one exact head, so an engineering owner identifies the governing spec or records the decision by commenting /approve-spec <full head SHA> on this head; the author may do so as an engineering owner. The new commit's note fix checks out: the undo note now names back only entries undo restores, and its test passes.
Claims and files checked
Review mode: incremental; reason: none
- Claim: a two-to-four value padding on a part that reads it inside calc() is written as its sides in one change (verified: the sides tests).
- Claim: before this change,
mainrefused it and offered the side lines (verified: the refusal code onmainand the earlier command-line run). - Claim: two, three and four values become block and inline; top, inline and bottom; and each side, and one undo takes back all of them (verified: the sides tests).
- Claim: each side is read by its own check, so
5px 10%writespadding-inline 10%(verified: the sides test). - Claim: one working length on every side is written once with a note, while
10% 10%is written as sides (verified: the sides tests). - Claim: a refusal happens only when a side's own check refuses that side's value (verified: each side goes through the setting check).
- Claim: each side replaces the longhands it covers, and an earlier side comes back with undo (verified: the sides test).
- Claim: an earlier padding on the part is replaced and named, and undo brings it back only when the editor still accepts it, with no promise for a refused hand edit (verified: two sides tests and a probe of the following undo).
- Claim: a repeat that changes nothing keeps every side, names the typed value and claims no undo step, also over a stale or missing build (verified: the sides tests).
- Claim: the undo note names only the sides a change changes (verified: the sides test).
- Claim: a later setting of the same side names each written side it hides, and other covering longhands are not named (verified: the sides test and the note code).
- Claim:
howoffers the whole-valuesetline, never the first length alone (verified: the sides test). - Claim: a state word read as another state is said once for every side (verified: the sides test).
- Claim: a hand-edited saved entry is still checked as written (verified: the stored check runs without the sides flag, and the sides test).
- Claim:
asSidesis on the experimentalsetresult and--json, and the status line leads with it (verified: the type and the formatter). - Claim: the offered side lines are replaced, and the repair-gate coverage fix keeps a unit test (verified: the diff and the repair-gate test).
- Claim: one length, a variable and
calc()are unchanged,padding-inline '4px 8px'on an item is still refused, and a hand-editedpadding: 2px 6pxstill refuses the next command (verified: the palette and sides tests). - Claim: no separable tag-alongs, and
asSidesis the only new API (verified: the diff). - Claim: one defect is restored (not settled: the write is new behaviour that waits on the owner decision above).
- Claim: the CLI typechecks, the API type sync, the CLI structure check and Prettier are clean (partly verified: the strict typecheck has no error in the changed code and Prettier is clean; the other checks were not repeated for this note-only commit).
- Claim: the listed test run passes apart from nine environment failures (partly verified: the three changed test files pass; the full run was not repeated).
- Changeset:
setnow writes the sides in one change, the result names them, one undo takes back all, one working length is written once, and its "before" text describes the last release (verified: the tests and the code before the side lines landed). - File
.changeset/experimental-theme-calc-padding-sides.md: clear. - File
packages/cli/api/theme-edit/_check.mjs: clear. - File
packages/cli/api/theme-edit/_edit.mjs: clear. - File
packages/cli/api/theme-edit/_how-commands.mjs: clear. - File
packages/cli/api/theme-edit/_normal.mjs: clear. - File
packages/cli/api/theme-edit/_settings.mjs: clear. - File
packages/cli/api/theme-edit/_vet.mjs: clear. - File
packages/cli/api/theme-edit/theme-edit.type.mjs:asSideswaits on the owner decision. - File
packages/cli/clients/cli/commands/experimental/theme.mjs: clear. - File
packages/cli/api/theme-edit/theme-edit-calc-padding-sides.test.mjs: clear. - File
packages/cli/api/theme-edit/theme-palette.test.mjs: clear. - File
packages/cli/api/theme-edit/theme-repair-gate-value-carry.test.mjs: clear.
|
Covers the theme-editor behavior this pull request decides (the owner's ruling): on a part whose padding Core reads inside calc(), two to four padding values are written as their sides in one change, each side value checked on its own; one bare undo takes them all back; the same length on every side is written as that one length; |
|
/approve-spec 3352125 |
…e works is written as its sides
- #12742 fix(cli): a padding of two to four lengths where only one works is written as its sides Author: @josephfarina - #13185 chore(theme editor): a status border is measured like the icon, so its own exemption and note go Author: @josephfarina
|
Landed in #13189. |
User impact
Since #12729,
set <theme> padding '5px 0' --on dropdown-menuoffers the sides instead of a dead end. A user still needs a second command for something the editor can do itself. A menu or segmented control reads its padding insidecalc(), where one length works, but itspadding-block,padding-inlineand per-side paddings all work.Problem and solution fit
setrefused a valid CSS shorthand, though each side it names can be set on that part.setwrites the shorthand as its sides, in one change. Each side is read by its own check, sopadding '5px 10%'writespadding-inline 10%where the part takes it.5px 0becomespadding-block 5px+padding-inline 0; three lengths become top / inline / bottom; four become each side. The result names them: "wrote padding '5px 0' as its sides, padding-block 5px, padding-inline 0: dropdown-menu reads padding inside calc(), where one length works; undo t takes back all 2". One bareundotakes back all of them. The same working length for every side (5px 5px) is written as that one length, with a note; the same value that is no one length there (10% 10%) is written as its sides.Expected behavior and authority
A value CSS defines and the part can take is written. A refusal happens only when a side's own check refuses that side's value. Each side replaces the longhands it covers, as a plain side set does: an earlier
padding-left 9pxis replaced bypadding '5px 0'and comes back with its undo. An earlierpaddingon the part is replaced by the sides and named ("replaces padding = 4px on dropdown-menu"); the undo brings it back when the editor still accepts it (a hand-edited value it refuses is left out, and the note does not promise it). A repeatsetthat changes nothing, also after a change elsewhere, keeps every side where it is, says so with the typed value and claims no undo step. When only some sides change ('5px 0'then'5px 2px'), the undo note names only those. A later setting of the same side that hides a written side names it, as for a plain side set (a later setting of other longhands that cover it is not named).howchecks such a padding the waysetwrites it, so it offersset <theme> padding '5px 0' --on dropdown-menu, never the first length alone. A repeat over a stale or missing build claims no undo step, and a state word read as another state is said once for every side. A hand-edited saved entry is still checked as written (the expansion applies only to the valuesetis given).Smallest restoration
boxSidesin_check.mjsgives the sides of a 2–4 lengthpadding/margin. The calc() padding check returns them, each checked bycheckSetting, only whensetasks (flags.sides)._edit.mjswrites the first side as the change's setting and the others beside it in the same commit, replaces each side's covered longhands, and adds the note.asSides({thing, value, sides}) on the experimentalsetresult (ThemeEditChangeData,set --json). It names the value typed and the sides written. The status line leads with it:padding = 5px 0 on dropdown-menu (padding-block 5px, padding-inline 0).boxSideLinesis removed. fix(cli): a padding of two to four lengths where only one works offers its sides #12729's repair-gate coverage fix stays, with a unit test.Evidence
set t padding '5px 0' --on dropdown-menurefuses (with fix(cli): a padding of two to four lengths where only one works offers its sides #12729, it offers two lines).padding-block 5px,padding-inline 0; the CSS haspadding-top/bottom: 5px,padding-left/right: 0on the menu. Oneundo tremoves both.calc()/min()/max()/clamp();padding-inline '4px 8px'on an item is still refused. A hand-editedpadding: 2px 6pxentry still refuses the next command.theme-edit-calc-padding-sides.test.mjs(writes, names, one undo for 2/3/4 lengths; one length for equal sides; an earlier side is replaced and comes back with undo; a no-change repeat claims no undo;5px 10%writes both sides;asSidesin the result).theme-palettenow expects the shorthand written as sides.theme-repair-gate-value-carryhas a unit test for the coverage rule.Scope
Components: cli (experimental theme editor)
asSideson the experimentalsetresult, is named above).Testing
CI=1 vitest run --project node packages/cli/api/theme-edit packages/cli/api/theme packages/cli/clients/cli/commands/experimental: 483 of 492 files pass. The 9 failing files (app copy, compile check, clean-checkout builds and one picture run) fail the same on main in this environment. The five CLI typechecks andsync:api-typesare clean, the CLI structure check passes, and Prettier is clean.preflight: pass 3352125