Repository navigation
fix(cli): experimental theme editor - controls share one height at each size - #13039
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
d33fab3 to
eb639f4
Compare
There was a problem hiding this comment.
This needs an engineering owner's decision on the new spec text before it can be approved, and six fixes are needed whatever that decision is.
Approval waits on an engineering owner approving or amending the new spec:AST-050 DEC-16, which settles which parts count as controls, that a height with no --when changes only the medium size, that it replaces other control heights at that size, and what --only does on a part such as button, where the existing DEC-11 says --only changes nothing. An engineering owner records it by commenting /approve-spec <full head SHA> on this pull request, and the author can do that as an engineering owner.
Blocking findings:
set <theme> height 31px --on button --onlyignores--onlyand writes the height on all 13 controls, but DEC-16 says a height set with--onlystays on its one part.- DateTimeInput and ComplexSelector size by the control token but are left out of
controls, so after a shared height they keep the base height (32px beside 24px inputs in a browser), while the note and changeset say every input and selector moved, and a text-area height still lands on both. - The CLI's strict typecheck fails on the new text-area filter (
controls.has(s.on)withs.onpossibly undefined, in the settings module). - The note's line for giving one control its own height (
set <theme> --size-element-md <V> --on button) saves a setting thatshowthen lists as a miss, and the fix it offers moves every control. - Setting a control height again deletes an earlier every-size height on that control, so its small and large heights change while the note says the other sizes keep their own heights.
- The
setandundocommand docs still list the--ongroups withoutcontrols, and still say a height on one input styles the whole inputs group.
Also worth fixing: undo <theme> height --on button refuses after this set, so the refusal should suggest the saved token entry.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Claim, release note: a height set on a control becomes every control's height at that size. False for DateTimeInput and ComplexSelector (measured 32px beside 24px).
- Claim, release note and description:
--onlykeeps a height on its one input. Verified for a text input (new test). False for button, where every control moves. - Claim, release note and description:
showlists a saved height that splits the controls, with a joining line. Verified (new tests). It also lists the note's own one-control line. - Claim, description: before this change a button height stayed at every size while inputs followed the size tokens. Verified: five of the six new tests fail on the base.
- Claim, description: before this change a text-area height spread to every input drawn alike. Verified on the base.
- Claim, description: a text-area height no longer reaches the inputs drawn alike. Partly false: it still reaches DateTimeInput and ComplexSelector.
- Claim, description: the result names what it replaced and gives the line for one control. The names are verified. The line's result is then reported as a miss.
- Claim, description: a theme with no control height builds as before, and a dialog header keeps the base tokens. Verified (new test; the new code runs only for height properties).
- Claim, description: Bootstrap and Classic Facebook before and after heights. Not checked: those themes are not in this repository.
- Claim, description: the new tests, the theme editor suites, the knowledge check and prettier pass. Verified, apart from one theme editor test that fails on the base too. eslint reports one error in the settings module that predates this change.
- File
.changeset/editor-control-heights.md: overstates which controls follow (DateTimeInput and ComplexSelector). - File
docs/specs/AST-050-app-themes/spec.md: needs an owner decision. Its--onlysentence conflicts with DEC-11 for parts styled on their own. - File
packages/cli/api/theme-edit/_edit.mjs: the one-control line and the replaced every-size height. - File
packages/cli/api/theme-edit/_missed.mjs: clear. - File
packages/cli/api/theme-edit/_parts.mjs: leaves DateTimeInput and ComplexSelector out ofcontrols. The reflow of three statements is required formatting. - File
packages/cli/api/theme-edit/_settings.mjs:--onlyon button is not kept, and the strict typecheck fails on the new filter. - File
packages/cli/api/theme-edit/_tables.mjs: clear. - File
packages/cli/api/theme-edit/theme-control-heights.test.mjs: clear. It passes on the head, but no case covers--onlyon a button or the two inputs left out.
8098c48 to
8d694e4
Compare
0321483 to
66430ac
Compare
There was a problem hiding this comment.
This needs an engineering owner's decision on the new spec text before it can be approved, and the fixes below are needed whatever that decision is, starting with a rebase.
Approval waits on an engineering owner approving or amending the new spec:AST-050 DEC-16, which settles which parts count as controls, that a height with no --when changes only the medium size, that it replaces other control heights, that a padding on a selector, typeahead or tokenizer loses its top and bottom, and what --only does on a part such as button, where the existing DEC-11 says --only changes nothing. An engineering owner records it by commenting /approve-spec <full head SHA> on this pull request, and the author can do that as an engineering owner.
Blocking findings:
- The branch still sits on the pre-rebase tip of
theme-r15-p22, so the pull request shows 435 commits, conflicts with its base in 9 files and cannot merge; its one commit rebases cleanly and its tests pass there. set <theme> height 31px --on button --onlyignores--onlyand writes the height on all 13 controls, but DEC-16 says a height set with--onlystays on its one part.- DateTimeInput and ComplexSelector size by the control token but are left out of
controls, so after a shared height they keep their own height while the note and changeset say every input and selector moved, and a text-area height still lands on both. - Miss: Typeahead and Tokenizer draw 28px and 30px under a 25px small height, while the note says every control is 25px and
showlists no miss. - The note's line for giving one control its own height (
set <theme> --size-element-md <V> --on button) saves a setting thatshowthen lists as a miss, and the fix it offers moves every control. - Setting a control height again deletes an earlier every-size height on that control, so its small and large heights change while the note says the other sizes keep their own heights.
padding-toporpadding-blockon a selector is saved and reported as styled with no note, but nothing reaches the selector, typeahead or tokenizer, and with--onlythe note wrongly says the selector's height now differs.- The
setandundocommand docs still list the--ongroups withoutcontrols, and still say a height on one input styles the whole inputs group. - The description says a theme with no control height builds as before, but a padding on the inputs now builds differently, and its large-size figure (30px) cannot come from a theme made like neutral, whose large controls are 36px.
Also worth fixing: undo <theme> height --on button refuses after this set, so the refusal should suggest the saved token entry.
Claims and files checked
Review mode: full; reason: history
- Claim, release note: buttons, inputs, selectors and input groups share one height at each size. False for DateTimeInput and ComplexSelector, and for Typeahead and Tokenizer at a 25px small height.
- Claim, release note and description:
--onlykeeps a height on its one input. Verified for a text input (new test). False for button, where every control moves. - Claim, release note and description:
showlists a saved height that splits the controls, with a joining line. Verified (new tests). It also lists the note's own one-control line. - Claim, description: before this change a button height stayed at every size, a padding on the inputs made a small selector taller, and a text-area height spread to the inputs. Verified: six of the seven new tests fail on the base.
- Claim, description: a padding on a selector, typeahead or tokenizer reaches only its sides. Verified (new test and probe). A padding with only top or bottom sides is dropped with no note.
- Claim, description: buttons, text inputs and selectors measure 25px at sm and 31px at md. Verified in a browser for those three. The 30px large-size figure is false.
- Claim, description: a theme with no control height builds as before. False for a padding on the inputs or a selector.
- Claim, description: parts that are not controls (a dialog header) keep the base's tokens. Verified (new test).
- Claim, description: Core's selector keeps a 20px line box, so heights under 22px still draw 22px. Consistent with Core's selector styles; it leaves out Typeahead and Tokenizer.
- Claim, description: the new tests pass. Verified, on the head and on the commit rebased onto the current base.
- Claim, description: Bootstrap and Classic Facebook before and after heights. Not checked: those themes are not in this repository.
- File
.changeset/editor-control-heights.md: overstates which controls follow. - File
docs/specs/AST-050-app-themes/spec.md: needs an owner decision. Its--onlysentence conflicts with DEC-11 for parts styled on their own. - File
packages/cli/api/theme-edit/_edit.mjs: the one-control line and the replaced every-size height. - File
packages/cli/api/theme-edit/_missed.mjs: clear. - File
packages/cli/api/theme-edit/_parts.mjs: leaves DateTimeInput and ComplexSelector out ofcontrols. The reflow of three statements is required formatting. - File
packages/cli/api/theme-edit/_settings.mjs:--onlyon button is not kept, and a block-only padding on a selector is dropped silently. The earlier typecheck error is fixed. - File
packages/cli/api/theme-edit/_tables.mjs: clear. - File
packages/cli/api/theme-edit/theme-control-heights.test.mjs: clear. No case covers--onlyon a button, the controls left out, or a block-only padding. - The other 308 files: the base branch's own commits from before its rebase, 297 identical to the base and 11 older than it; they leave this pull request once it is rebased.
5cf2801 to
fa75d70
Compare
8d694e4 to
517c2c6
Compare
517c2c6 to
25a2c90
Compare
3ae9844 to
7942b54
Compare
7942b54 to
190927a
Compare
There was a problem hiding this comment.
This needs an engineering owner's decision on the new spec text before it can be approved, and six fixes are needed whatever that decision is.
Approval waits on an engineering owner approving or amending the new spec:AST-050 DEC-16, which settles which parts count as controls, that a height with no --when changes only the medium size and replaces other control heights, that a padding on a selector, typeahead or tokenizer loses its top and bottom, and that --only keeps a control height on one part as an exception to the existing DEC-11. An engineering owner records it by commenting /approve-spec <full head SHA> on this pull request, and the author can do that as an engineering owner.
Blocking findings:
- The settings reader now keeps a saved
--onlyon a height of any part styled on its own, such asapp-shell-headerorcard(_settings.mjs:2378-2380), so three tests intheme-bar-height-reaches-row.test.mjsfail and undo leaves the header height in place, against DEC-11. - Miss:
set <theme> height auto --on buttonwrites--size-element-md: autoon every control, and because Core uses that token insidecalc(), the medium controls draw 36/30/22/28/30px instead of one height, so only a length should become the shared token. - After a height on a group such as
--on inputs, the note offersset <theme> height <V> --on inputs --only, which the editor refuses. - The refusal of a top or bottom padding alone on a selector, typeahead or tokenizer suggests only
how padding-top, because its height line holds a<size>placeholder (_check.mjs:5388). - The changeset says every button, input, selector and input group shares one height, but Typeahead and Tokenizer stay 28px and 30px at a 25px small height and ComplexSelector keeps its own height.
- The
setdocs still say a height on one input styles the whole inputs group, which a text-area height no longer does.
Also worth fixing: undo <theme> height --on button refuses right after the matching set, so its refusal could point at the saved --size-element-md entry on controls.
Claims and files checked
Review mode: full; reason: rebase
- Claim, release note: buttons, inputs, selectors and input groups share one height at each size. False for Typeahead and Tokenizer at a 25px small height, and for ComplexSelector.
- Claim, release note: a height on a control is written as that size's token on
controls. Verified (new tests and a probe). - Claim, release note:
--onlykeeps a height on its one input. Verified, for a button too (new tests and a probe). - Claim, release note:
showlists a saved height that splits the controls, with a joining line. Verified (new tests). - Claim, description: before this change a button height stayed at every size, a padding on the inputs made a small selector taller, and a text-area height spread to the inputs. Verified: ten of the eleven new tests fail on the base.
- Claim, description:
controlsholds the parts sized by the tokens on their own box or their parts' boxes. Verified: 14 parts, DateTimeInput included. - Claim, description: a set replaces the other control heights, keeps a replaced every-size height at the other sizes, and names the
--onlyline. Verified for one control. For a group, the named line is refused. - Claim, description: a saved
onlyon a control's height is read, not dropped. Verified for controls. The reader also keeps it on parts that are not controls, against DEC-11. - Claim, description: a text-area height no longer reaches the inputs. Verified (new test).
- Claim, description: a padding on a content-growing control reaches only its sides, and a top or bottom padding alone is refused with the height line that works. Sides verified. The refusal carries no height line.
- Claim, description: the
setandundodocs listcontrolsand state the rule. Verified for the lists. Thesetdocs keep the old whole-group sentence. - Claim, description: buttons, text inputs and selectors measure 25px, 31px and 36px at the three sizes. Verified in a browser.
- Claim, description: a dialog header keeps the base's tokens, and a theme with no control height builds as before. Dialog header verified (new test). A saved
onlyon a height of another part now builds differently. - Claim, description: known limits (the selector's line box, Typeahead about 28px, Tokenizer about 30px, ComplexSelector outside
controls). Verified by measurement and a probe. - Claim, description: before-the-change figures from other themes. Not checked: those themes are not in this repository.
- Claim, description: the new tests, the editor suites, the knowledge check, eslint and prettier pass. The new tests, knowledge check, eslint and prettier pass. An existing editor test file fails three tests at this head.
- File
.changeset/editor-control-heights.md: overstates which controls follow. - File
docs/specs/AST-050-app-themes/spec.md: DEC-16 needs an owner decision. - File
packages/cli/api/theme-edit/_check.mjs: the padding refusal drops its height line. - File
packages/cli/api/theme-edit/_edit.mjs: the note's group line is refused. - File
packages/cli/api/theme-edit/_missed.mjs: clear. - File
packages/cli/api/theme-edit/_parts.mjs: clear. The three reflowed statements are formatting. - File
packages/cli/api/theme-edit/_settings.mjs: the reader keepsonlyon any height, and a keyword height becomes the shared token. - File
packages/cli/api/theme-edit/_tables.mjs: clear. - File
packages/cli/api/theme-edit/theme-control-heights.test.mjs: clear. No case covers a keyword height or a savedonlyon a height of a part that is not a control. - File
packages/cli/api/theme-edit/themeEditSet.doc.mjs: keeps the whole-group sentence. - File
packages/cli/clients/cli/commands/experimental-theme-editor-set.doc.mjs: keeps the whole-group sentence. - File
packages/cli/clients/cli/commands/experimental-theme-editor-undo.doc.mjs: clear.
ed915a5 to
1744879
Compare
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet.
The spec text for shared control heights, and the matching exception to the saved-only rule, are approved at this head. The commit that spread a saved --only height to every control is gone, so a height kept on one control stays that control's own at the other sizes. The new how change, which stops offering a block-padding line that set refuses, is correct and tested.
Claims and files checked
Review mode: full; reason: history
Claims:
- A button height set by the earlier editor stays on the button at every size while the inputs follow the size tokens: verified (base build writes
heighton the button alone; Chromium on neutral 25/28/30px, 31/32/32px, 31/36/36px). The figures in the description depend on the theme's size tokens. - A height on a control is written as that size's token on a new
controlsgroup, so every control at that size takes it: verified (sharedControlHeight; tests; head CSS sets the token on 14 control parts). - The
controlsgroup holds the parts that size by the control tokens, a date and time input included: verified (familyRoles; date and time input test). - A height replaces the other control heights at that size, a replaced every-size height stays at the other sizes, and the result says what it replaced: verified (replacement and carry tests; probe notes).
--onlykeeps a height on one control, a button included, as its own size token, and the same height set again stays: verified (--onlytests; a saved--onlyheight keeps its other sizes after a shared height, per the probe).- A height written as a size token must be a length in any CSS unit; a word, a percentage or a value that reads its own token is refused with the chain named; a carried height that reads a size token keeps the value it showed: verified (unit, refusal, loop and carry tests).
- A height on a text area or complex selector stays on that part, and a replaced height keeps them their own height with a line: verified (text-area and group-token tests).
- A selector, typeahead, tokenizer or file input field keeps Core's top and bottom padding, a top or bottom padding alone there is refused with a height line to fill in, and the drop zone still takes them: verified (padding, refusal and drop-zone tests; head CSS pads the selector at its sides only).
- A saved word height or a saved top padding on a selector still opens, only a new
setis refused, andmin-heightis the shared height only on controls that grow: verified (saved-entry and least-height tests). - A height on a group that mixes controls with other parts stays a plain height, and a check's height still spreads to the other checks: verified (mixed-group test; checks suite passes).
- A picture's control height is one size token on
controls, and a size token an earlier picture answer saved on the button-like parts counts as a control height thatshowlists: verified (picture-traits tests; button-like test). showlists each saved length height that keeps controls apart, with its line: verified (missed tests).how selects compactgives the spacing step alone, with no block-padding line: verified (new test; the base offered the padding line).- The
setandundodocs listcontrolsunder--on, and thesetdocs state the control-height rule: verified. - Core's selector keeps a 20px least line box, and ComplexSelector is outside the census: verified (Selector line-box floor;
familyRoles). - The rendered-page check carries over because this head adds only the
howanswer text to the earlier patch: verified (the first three commits are identical to the earlier head). - The regression file holds 41 tests: verified (41 pass).
- Changeset: controls share one height per size,
--onlykeeps one apart, a size-token height must be a length, growing controls keep Core's top and bottom padding while the drop zone keeps its own, andshowlists split heights: verified (as above).
Files:
.changeset/editor-control-heights.md: cleardocs/specs/AST-050-app-themes/spec.md: clearpackages/cli/api/theme-edit/_check.mjs: clearpackages/cli/api/theme-edit/_edit.mjs: clearpackages/cli/api/theme-edit/_how-question.mjs: clearpackages/cli/api/theme-edit/_how.mjs: clearpackages/cli/api/theme-edit/_missed.mjs: clearpackages/cli/api/theme-edit/_parts.mjs: clearpackages/cli/api/theme-edit/_picture-traits.mjs: clearpackages/cli/api/theme-edit/_settings.mjs: clearpackages/cli/api/theme-edit/_tables.mjs: clearpackages/cli/api/theme-edit/theme-control-heights.test.mjs: clearpackages/cli/api/theme-edit/theme-picture-traits.test.mjs: clearpackages/cli/api/theme-edit/theme-saved-only-reads-as-written.test.mjs: clearpackages/cli/api/theme-edit/themeEditSet.doc.mjs: clearpackages/cli/clients/cli/commands/experimental-theme-editor-set.doc.mjs: clearpackages/cli/clients/cli/commands/experimental-theme-editor-undo.doc.mjs: clear
|
Covers |
|
/approve-spec 2d516d3 |
|
Covers |
|
/approve-spec 0964f08 |
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet.
The shared-control-height rule and its saved-only exception are approved for this head. The new commit, which keeps a file input's drop zone padded under another condition such as --when status:error, builds the drop zone's top and bottom padding under that joined condition and is covered by its test. Nothing else needs to change; the deferred CI jobs run next.
Claims and files checked
Review mode: full; reason: rebase
Claims:
- An earlier editor's button height stays fixed at every size while the inputs follow the size tokens: verified (the base editor writes
heighton the button alone; Chromium on neutral 25/28/30, 31/32/32, 31/36/36px); the example figures depend on the theme's size tokens. - A height on a control is written as that size's token on a new
controlsgroup, so every control at that size takes it: verified (tests; the built theme sets the token on every control). - The
controlsgroup holds the parts sized by the control tokens, a date and time input included: verified (date and time input test). - A height replaces the other control heights at that size, a replaced every-size height stays at the other sizes, and the result names what it replaced and the
--onlyline: verified (replacement and carry tests; notes). --onlykeeps a height on one control, a button included, as its own size token, and the same height set again stays: verified (--onlytests).- A height that is not a size (
auto) is refused, since Core reads the size tokens inside its own sums: verified (refusal tests). - A height on a text area no longer reaches the inputs drawn alike: verified (text-area tests).
showlists each saved length height that keeps controls apart, with its line, and leaves out a saved word height: verified (missed tests).- A selector, typeahead or tokenizer keeps Core's top and bottom padding, a padding reaches only its sides, the result says so, and a top or bottom padding alone is refused with a height line: verified (padding tests; built CSS).
- A height that also reaches parts that are not controls keeps those parts' height as their own
--onlyheight, named with its line: verified (tests). - A saved word height still opens and builds; a saved block-only padding on a growing control opens with a note and no longer builds its block sides; only a new
setis refused; a self-reading height is refused;min-heightis shared only on growing controls: verified (saved-entry, loop and least-height tests). - A control height takes any CSS length and refuses a word or a percentage; a looping height is refused naming the chain; a carried height that reads a size token is carried as that token's value: verified (unit, loop and carry tests).
- A file input's field keeps Core's top and bottom padding while its drop zone takes them: verified (drop-zone tests; built CSS).
- A height on a group that mixes controls with other parts stays a plain height, and a check's height still spreads to the other checks: verified (mixed-group test; checks suite passes).
- A picture's control height is one size token on
controls: verified (picture-traits tests). - A size token saved on a group that holds controls among other parts counts as a control height that
showlists: verified (button-like test). how's compact answer for a growing control gives the spacing step alone: verified (compact-select test).- A padding on the file input under another condition still gives its drop zone the top and bottom sides under that condition, and the refusal and the note read the same: verified (new test; built CSS; refusal text).
- The
setandundodocs listcontrolsunder--on, and thesetdocs state the control-height rule: verified. - A theme with no control height builds as before, and parts that are not controls keep the base's tokens: verified (dialog header test).
- The rendered-page check of an earlier head carries, as the patch differs from it only by the
howtext and the drop-zone condition: verified (the other commits are identical apart from context). - Known limits: the selector keeps a 20px line box, a typeahead and tokenizer keep about 28px and 30px, and ComplexSelector is outside the census: verified (Selector styles; Chromium 28px and 30px at a 25px small size; group test).
- The regression file holds 42 tests: verified (42 pass).
- Changeset: controls share one height per size, growing controls keep their content height and Core's top and bottom padding,
--onlykeeps one apart, a size-token height must be a length, the drop zone keeps its padding, andshowlists split heights: verified (as above).
Files:
.changeset/editor-control-heights.md: cleardocs/specs/AST-050-app-themes/spec.md: clearpackages/cli/api/theme-edit/_check.mjs: clearpackages/cli/api/theme-edit/_edit.mjs: clearpackages/cli/api/theme-edit/_how-question.mjs: clearpackages/cli/api/theme-edit/_how.mjs: clearpackages/cli/api/theme-edit/_missed.mjs: clearpackages/cli/api/theme-edit/_parts.mjs: clearpackages/cli/api/theme-edit/_picture-traits.mjs: clearpackages/cli/api/theme-edit/_settings.mjs: clearpackages/cli/api/theme-edit/_tables.mjs: clearpackages/cli/api/theme-edit/theme-control-heights.test.mjs: clearpackages/cli/api/theme-edit/theme-picture-traits.test.mjs: clearpackages/cli/api/theme-edit/theme-saved-only-reads-as-written.test.mjs: clearpackages/cli/api/theme-edit/themeEditSet.doc.mjs: clearpackages/cli/clients/cli/commands/experimental-theme-editor-set.doc.mjs: clearpackages/cli/clients/cli/commands/experimental-theme-editor-undo.doc.mjs: clear
…ch size Inputs, selects, input groups and buttons take one height at each size from the control size tokens on a new controls group. A height set on a control is written as that size's token and replaces the other control heights there; --only keeps a height on one control. show lists a saved height that keeps controls apart, with the line that joins them. AST-050 DEC-16 records the rule.
…n-like parts is a control height show lists A size token on a group that holds controls among other parts (the button-like parts an earlier picture answer wrote it on) counts as a control height, so show lists the buttons it keeps apart from the fields, with the line that joins them.
… part, as before, and one control-height constant partsOf reaches the other members only for a comma list of conditions, as on main; a condition joined with + keeps to its own part. onlyHeightShape reads CONTROL_HEIGHT_PROPS, and groupsOf's doc names controls.
…ck padding line A control that grows with its content keeps Core's block padding, so the tighter answer for it gives the spacing step alone and no longer promises a padding line that sets its height.
…ndition still reaches its drop zone A padding set on the file input with a --when on another axis (status:error) gives the drop zone its top and bottom sides under that condition too, joined to the drop zone's mode. The refusal and the set note read the same joined conditions.
|
/approve-spec 97d448d |
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet.
The shared-control-height rule (spec:AST-050 DEC-16) and its saved-only exception are approved for this head. The rebase keeps the updated base's text-size sentence in the set docs beside the control-height rule, and the change's tests and the nearby theme-editor suites pass on it. Nothing else needs to change; CI runs next.
Claims and files checked
Review mode: full; reason: rebase
Claims:
- An earlier editor's button height stays fixed at every size while the inputs follow the size tokens: verified (the base writes
heighton the button alone; Chromium on neutral with a 4px input padding: 25/28/30, 31/32/32, 31/36/36px). - A height on a control is written as that size's token on a new
controlsgroup, so every control at that size takes it: verified (tests; the built theme sets the token on every control). - The
controlsgroup holds the parts sized by the control tokens, a date and time input included: verified (date and time input test; census rule). - A height replaces the other control heights at that size, a replaced every-size height stays at the other sizes, and the result names what it replaced and the
--onlyline: verified (replacement and carry tests; notes). --onlykeeps a height on one control, a button included, as its own size token, and the same height set again stays: verified (--onlytests).- A height that is not a size (
auto) is refused, since Core reads the size tokens inside its own sums: verified (refusal tests). - A height on a part that is not a control no longer reaches the inputs drawn alike: verified (text-area tests).
showlists each saved length height that keeps controls apart, with its line, and leaves out a saved word height: verified (missed tests).- A selector, typeahead or tokenizer keeps Core's top and bottom padding, a padding reaches only its sides, the result says so, and a top or bottom padding alone is refused with a height line: verified (padding and refusal tests; built CSS).
- A height that also reaches parts that are not controls keeps those parts' height as their own
--onlyheight, named with its line: verified (text-area and set-apart tests). - A saved word height still opens and builds; a saved block-only padding on a growing control opens with a note and no longer builds its block sides; only a new
setis refused; a self-reading height is refused;min-heightis shared only on growing controls: verified (saved-entry, loop and least-height tests). - A control height takes any CSS length and refuses a word or a percentage; a looping height is refused naming the chain; a carried height that reads a size token is carried as that token's value: verified (unit, loop and carry tests).
- A file input's field keeps Core's top and bottom padding while its drop zone takes them: verified (drop-zone tests; built CSS).
- A height on a group that mixes controls with other parts stays a plain height, and a check's height still spreads to the other checks: verified (mixed-group test; checks suite passes).
- A picture's control height is one size token on
controls: verified (picture-traits tests). - A size token saved on a group that holds controls among other parts counts as a control height that
showlists: verified (button-like test). how's compact answer for a growing control gives the spacing step alone: verified (compact-select test).- A padding on the file input under another condition still gives its drop zone the top and bottom sides under that condition, and the refusal and the note read the same: verified (test; built CSS).
- The
setandundodocs listcontrolsunder--on, and thesetdocs state the control-height rule: verified (both doc files, which also keep the base's text-size sentence). - After the change, buttons, text inputs and selectors are 25/25/25px at sm, 31/31/31px at md and 36/36/36px at lg: verified (Chromium capture at this head).
- A theme with no control height builds as before, and parts that are not controls keep the base's tokens: verified (dialog header test).
- The rendered-page check of an earlier head carries, as the patch differs from it only by the
howtext and the drop-zone condition: verified for the patch difference (commit comparison); the page run itself is the author's and was not repeated. - Known limits: the selector keeps a 20px line box and ComplexSelector is outside the census: verified (Selector styles; group test); the typeahead's and tokenizer's 28px and 30px are the author's figures, not re-measured.
- The regression file holds 42 tests: verified (42 pass).
- Changeset: controls share one height per size, growing controls keep their content height and Core's top and bottom padding,
--onlykeeps one apart, a size-token height must be a length, the drop zone keeps its padding, andshowlists split heights: verified (as above).
Files:
.changeset/editor-control-heights.md: cleardocs/specs/AST-050-app-themes/spec.md: clearpackages/cli/api/theme-edit/_check.mjs: clearpackages/cli/api/theme-edit/_edit.mjs: clearpackages/cli/api/theme-edit/_how-question.mjs: clearpackages/cli/api/theme-edit/_how.mjs: clearpackages/cli/api/theme-edit/_missed.mjs: clearpackages/cli/api/theme-edit/_parts.mjs: clearpackages/cli/api/theme-edit/_picture-traits.mjs: clearpackages/cli/api/theme-edit/_settings.mjs: clearpackages/cli/api/theme-edit/_tables.mjs: clearpackages/cli/api/theme-edit/theme-control-heights.test.mjs: clearpackages/cli/api/theme-edit/theme-picture-traits.test.mjs: clearpackages/cli/api/theme-edit/theme-saved-only-reads-as-written.test.mjs: clearpackages/cli/api/theme-edit/themeEditSet.doc.mjs: clearpackages/cli/clients/cli/commands/experimental-theme-editor-set.doc.mjs: clearpackages/cli/clients/cli/commands/experimental-theme-editor-undo.doc.mjs: clear
|
Landed on main in #13315. |
User impact
Buttons, inputs and selectors sit side by side in a toolbar or a form row, and people expect them to line up. A theme the experimental theme editor makes can give one control a height of its own: a button set to
height 31pxstays 31px at every size while the inputs follow the size tokens, so a small row reads 31/25/30px and a large one 31/32/32px. Nothing in the editor said so, and nothing made the other controls follow.Problem and solution fit
spec:AST-050/DEC-16, added here).The editor now writes a height set on a control as that size's control token on a new
controlsgroup, so every control at that size takes it;showlists any saved height that keeps controls apart, with the line that joins it to the others.Expected behavior and authority
spec:AST-050/DEC-16(added here, decided by the maintainers under the CLI owner's delegation): buttons, inputs, selectors and input groups share one height at each size.Smallest restoration
controlsgroup in the editor's part map: the parts that take their height from--size-element-sm/md/lg, on their own box or on the boxes of their parts (a date and time input's segments), and are a button, an input, or a form control's own part (an input group).set … height V --on <control or group of controls> [--when size:S]writes--size-element-S(md without--when) oncontrolsand replaces the other heights set on controls at that size. A replaced height that was set for every size stays every control's height at the other sizes, written as their tokens. The result names what it replaced and the--onlyline that gives one control its own height.--onlykeeps a height on its one control, a button included: it is written as that control's own size token, on it alone. A height that is not a size (auto) is refused, since Core reads the size tokens inside its own sums. The same height set again stays.showlists, under missed, each saved length height that keeps some controls apart at a size, with its line (a saved height that is not a size has no line that works, so it is not listed).--onlyheight, and the note names them with their line. A saved height that is not a size still opens and builds as a plain height; a saved top or bottom padding alone on a selector, typeahead or tokenizer still opens, with a note, but its top and bottom sides no longer build, so the control keeps its size's height. Only a newsetof either is refused, and a height that reads the size token it would be written as is refused too.min-heightbecomes the shared height only on controls that grow with their content.controls.showlists the buttons it keeps apart, with the line that joins them.how's tighter answer for a control that grows with its content ("selects compact") gives the spacing step alone; it no longer offers a block padding line, which never sets that control's height.--when status:error) still gives its drop zone the top and bottom sides under that condition (status:error+mode:dropzone); the refusal and thesetnote read the same.setandundodocs list thecontrolsgroup in--on; thesetdocs state the control-height rule.Evidence
set <theme> height 31px --on buttondraws buttons 31px at every size while the inputs keep the size tokens;padding 4px --on inputsmakes a small selector taller than the small controls beside it;height auto --on text-areamakes every inputauto.padding 4px --on inputs,height 25px --on button --when size:smandheight 31px --on button: buttons, text inputs and selectors are 25/25/25px at sm, 31/31/31px at md and 36/36/36px at lg (the base's large size). Before, the small selector was taller than the controls beside it, and a button height set for every size kept buttons apart at sm and lg.packages/cli/api/theme-edit/theme-control-heights.test.mjs.how's answer text for a compact control and a file input's drop-zone padding under a--when, and no page sets either.controlsand keeps its base height, as on main.Scope
Components: CLI experimental theme editor (
api/theme-edit/_settings.mjs,_parts.mjs,_tables.mjs,_edit.mjs,_missed.mjs,_check.mjs,_how.mjs,_picture-traits.mjs; docsapi/theme-edit/themeEditSet.doc.mjs,clients/cli/commands/experimental-theme-editor-set.doc.mjs,experimental-theme-editor-undo.doc.mjs),docs/specs/AST-050-app-themes/spec.md(DEC-16, and the DEC-11 exception line)controlsgroup and writes a control height as a size token; both are recorded inspec:AST-050/DEC-16.Writing rubric results
R1 narration: none; DEC-16 states what the editor does, in the present tense.
R2 research: none in the record.
R3 evidence: none cited in the record.
R4 rejected alternatives: two, each one line inside DEC-16.
R5 change references: none.
R6 open questions: none added.
R7 project status: none.
Testing
CI=1 vitest run packages/cli/api/theme-edit/theme-control-heights.test.mjs --project node(42 tests)CI=1;pnpm check:knowledge; eslint and prettier on the changed filesreplay: worse 0 at 97d448d
preflight: pass 97d448d (the only finding at this head was a merge conflict from a base rebuild, since repaired on the base; every file and claim was otherwise clear)