Repository navigation
feat(cli): experimental theme editor: round 15 parts 14–19 in one change - #13049
josephfarina wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
d620787 to
ac68159
Compare
ac68159 to
d915401
Compare
6b54f70 to
b739f24
Compare
b5c927f to
f13d6f6
Compare
f13d6f6 to
fcc0ed3
Compare
1a9da19 to
67f03dc
Compare
fcc0ed3 to
5d1ce50
Compare
5d1ce50 to
e3639d3
Compare
There was a problem hiding this comment.
Waiting on an engineering owner's decision. No current spec record governs the behaviors below, so approval needs an engineering owner to approve them as shipped (or identify the governing spec, or say which should change) by commenting /approve-spec e3639d395c4a358adcc2615613eaaeb4e95edcfe on this pull request; the author may do so as an engineering owner.
Behaviors to settle:
set: a border color on a part that draws no border also writes a see-through border at the theme's border width, reports the measured size change, and is refused after a whole-bordernone.how: per-side color runs (light mode only unless a width or style is written on a look with no line of its own), borders on several sides, a transparent side, padding side lists, and named corners with "only" and "except" (logical longhands for left and right corners, so they mirror right to left).how: a top nav's links as its items, a display heading's size token, a part's own piece hidden withdisplay: none, one variant made to look like another, product-named looks asked about, and "like before" as undo.- Gradients set for a variant, a state or a mode compiled as background longhands, with a note when a variant's shorthand resets a whole-part longhand.
Fix independent of that decision:
- The description says the change is based on
theme-r15-p13, but it targetstheme-r15-p02-13andtheme-r15-p13is not an ancestor of this head, so please correct that line.
The adapter move and the five changesets match the current CLI and release records, and one small suggestion is inline. CI has not run on this head yet.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Changeset, border color brings a border: see-through border at the theme width, width named, size change measured, one undo takes back both, refused after a whole none, a partial none saved as written — verified (tests and a base-and-head run).
- Changeset, per-side borders: color runs, several sides, transparent side, a part's side, light or both modes with the dark-page contrast — verified (32 tests, base-and-head run).
- Changeset, corner asks: only the corners named, only and except square the rest, one radius for top, bottom or all, logical longhands otherwise — verified (15 tests, base-and-head run).
- Changeset, pieces and whole looks: top nav items, product names asked, like before as undo, variant likeness, kept, shown and background-only pieces, no icon-in-button hide — verified (20 tests, base-and-head run).
- Changeset, gradient longhands: longhands in variants, states and modes, whole-part longhands still apply, reset note — verified (27 tests).
- Description: editor-only change in the CLI package, no Core change — verified (31 paths).
- Description: whole-change line delta of the question reader, +1477/-106 — verified.
- Description: a color after a whole-border none is refused, a partial none is saved — verified.
- Description: follow-up items keep main's behavior — verified against main for per-side runs on buttons and cards.
- Description: based on
theme-r15-p13— false (see above). - Description: per-part line deltas and "adds no mood or feel phrase matches" — no mood or feel entries added; per-part deltas cannot be separated from one commit.
- Description: CI has not run on this head — verified.
- Description: held-out answer key and look gate — not checkable from the repository.
packages/cli/api/theme-edit/_edit.mjs— non-blocking note (measuring page left in the cache when the build throws).packages/cli/api/theme-edit/_check.mjs— non-blocking note (four slightly different "no line" tests)..changeset/experimental-theme-border-color-brings-border.md— clear.changeset/experimental-theme-how-border-sides.md— clear.changeset/experimental-theme-how-corner-positions.md— clear.changeset/experimental-theme-how-pieces-whole-looks.md— clear.changeset/experimental-theme-variant-gradient-longhands.md— clearpackages/cli/api/theme-edit/_adapter.mjs— clearpackages/cli/api/theme-edit/_how-commands.mjs— clearpackages/cli/api/theme-edit/_how-question.mjs— clearpackages/cli/api/theme-edit/_part-words.mjs— clearpackages/cli/api/theme-edit/_preview.mjs— clearpackages/cli/api/theme-edit/_settings.mjs— clearpackages/cli/api/theme-edit/_tables.mjs— clearpackages/cli/api/theme-edit/theme-built-css-shorthand-order.test.mjs— clearpackages/cli/api/theme-edit/theme-built-variant-gradient-longhands.test.mjs— clearpackages/cli/api/theme-edit/theme-edit-border-added-size.test.mjs— clearpackages/cli/api/theme-edit/theme-edit-border-color-needs-a-border.test.mjs— clearpackages/cli/api/theme-edit/theme-how-border-sides.test.mjs— clearpackages/cli/api/theme-edit/theme-how-corner-positions.test.mjs— clearpackages/cli/api/theme-edit/theme-how-reads-pieces-and-whole-looks.test.mjs— clearpackages/cli/api/theme-edit/theme-how-whole-look-said.test.mjs— clearpackages/cli/api/theme-edit/theme-how.test.mjs— clearpackages/cli/api/theme-edit/theme-regrown-look-keeps-card-text.test.mjs— clearpackages/cli/clients/cli/commands/experimental-theme-editor-how.doc.mjs— clearpackages/cli/foundation/render/part-boxes.mjs— clearpackages/cli/foundation/render/picture-chrome.mjs— clearpackages/cli/foundation/render/picture-playwright.mjs— clearpackages/cli/test-utils/css-shorthand-order.mjs— clearpackages/cli/test-utils/long-ask-binding-rows.mjs— clearscripts/vitest-node-durations.json— clear
| // before the change is built, to measure what the added width moves. | ||
| // Measured every time, a rare path: the result says, never leaves it to | ||
| // be asked for. | ||
| const sizeBefore = borderAdded |
There was a problem hiding this comment.
Non-blocking: this draws size-<theme>-<pid>-before.html into the project cache before commitTheme, which can still throw. Only borderSizeNote removes the file, so a refused or failed build leaves it behind. Remove it in a finally around the commit, or draw the before page after the commit succeeds.
30368d6 to
dd564ba
Compare
6cf0903 to
2718441
Compare
There was a problem hiding this comment.
Waiting on an engineering owner's decision, with three fixes needed.
No current spec record governs the editor behaviors this pull request adds, so approval needs an engineering owner to approve them as shipped (or identify the governing spec, or say which should change) by commenting /approve-spec 2718441460b8fcd84f4a91e53d5f1f6e3b555bbf on this pull request; the author may do so as an engineering owner. To settle: set adding a see-through border (with a measured size note) for a border color on a part that draws none and refusing one after a whole-border none; how's readings of sides, transparent sides, per-side runs, padding lists, corners, hidden pieces, look-alikes, product names, "like before" and "use the default theme"; and gradient longhands for variants, states and modes.
Fixes needed whatever that decision is:
how "selected tab: transparent bottom, #dddddd border"listsborder-bottom '1px solid transparent'beforeborder '1px solid …', so running it in order letssetdrop the see-through bottom while the answer says it is drawn; put the shorthand first again and make the test attheme-how-border-sides.test.mjs:342assert the order.- Regression:
.changeset/experimental-theme-how-border-sides.mdsays per-side colors are read as written "with a width beside them or not", but a bare light run such as#eee #eee #dddstill writes one light border with the first color, as before, so reword it (and the description's move-out line) to match. - The description gives
_how-question.mjsas +1477/-106, but at this head it is +1505/-107.
The earlier non-blocking note on the measuring page left in the cache when the build throws still applies, and CI has not run on this head.
Claims and files checked
Review mode: full; reason: rebase
- Changeset, a border color brings a border: see-through border at the theme width, named, its size change measured, one undo takes back both, refused after a whole-border none, a partial none saved as written: verified (tests pass; the badge grows 2px in width on a real render).
- Changeset, per-side borders: several sides, a transparent side, a part's own side, the dark-page contrast note: verified for the examples it gives; a transparent side said before the border: lost when the answer runs in order (see above).
- Changeset, per-side borders: colors one per side are one border color as written, with a width or not: false for a bare light run, which stays one light border as before.
- Changeset, corner asks: only the corners named, only and except, one radius of four for the top, the bottom or all corners, logical longhands otherwise: verified (tests and a before-and-after run).
- Changeset, pieces and whole looks: top nav items, product names asked, like before as undo, variant look-alikes, kept, shown and background-only pieces, no hide for a button's icon or a piece that holds a control, theme add before theme use: verified (tests and a before-and-after run).
- Changeset, gradient longhands: longhands in variants, states and modes, whole-part longhands still apply, reset note: verified (tests).
- Description: editor-only change in the CLI package, no Core change: verified.
- Description: line delta of the question reader, +1477/-106: false (+1505/-107 at this head).
- Description: a color after a whole-border none is refused, a partial none is saved: verified.
- Description: the follow-up keeps today's behavior for a pronoun hide, nones on borderless parts and light per-side runs on standalone buttons and other card looks: verified, though a bare light run keeps today's behavior on every part, not only those.
- Description: a top nav said beside a side nav stays the top nav: verified.
- Description: based on the parts 2 to 13 branch; adds no mood or feel phrase matches; the switch-thumb test change lives lower in the stack: verified.
- Description: two pre-existing gaps (a border and a white fill in one clause; a hide after a negation): not checked, outside this change.
- Description: CI has not run on this head: verified; held-out answer key and look gate: not checkable from the repository.
.changeset/experimental-theme-border-color-brings-border.md: clear.changeset/experimental-theme-how-border-sides.md: finding: overstates per-side reading for a bare light run.changeset/experimental-theme-how-corner-positions.md: clear.changeset/experimental-theme-how-pieces-whole-looks.md: clear.changeset/experimental-theme-variant-gradient-longhands.md: clearpackages/cli/api/theme-edit/_adapter.mjs: clearpackages/cli/api/theme-edit/_check.mjs: non-blocking note (five slightly different no-line tests)packages/cli/api/theme-edit/_edit.mjs: non-blocking note (measuring page left in the cache when the build throws)packages/cli/api/theme-edit/_how-commands.mjs: clearpackages/cli/api/theme-edit/_how-question.mjs: finding: a transparent side said before the border is ordered after itpackages/cli/api/theme-edit/_part-words.mjs: clearpackages/cli/api/theme-edit/_preview.mjs: clearpackages/cli/api/theme-edit/_settings.mjs: clearpackages/cli/api/theme-edit/_tables.mjs: clearpackages/cli/api/theme-edit/theme-built-css-shorthand-order.test.mjs: clearpackages/cli/api/theme-edit/theme-built-variant-gradient-longhands.test.mjs: clearpackages/cli/api/theme-edit/theme-edit-border-added-size.test.mjs: clearpackages/cli/api/theme-edit/theme-edit-border-color-needs-a-border.test.mjs: clearpackages/cli/api/theme-edit/theme-how-border-sides.test.mjs: finding: the order assertion was droppedpackages/cli/api/theme-edit/theme-how-corner-positions.test.mjs: clearpackages/cli/api/theme-edit/theme-how-family-named.test.mjs: clearpackages/cli/api/theme-edit/theme-how-reads-pieces-and-whole-looks.test.mjs: clearpackages/cli/api/theme-edit/theme-how-whole-look-said.test.mjs: clearpackages/cli/api/theme-edit/theme-how.test.mjs: clearpackages/cli/api/theme-edit/theme-regrown-look-keeps-card-text.test.mjs: clearpackages/cli/clients/cli/commands/experimental-theme-editor-how.doc.mjs: clearpackages/cli/foundation/render/part-boxes.mjs: clearpackages/cli/foundation/render/picture-chrome.mjs: clearpackages/cli/foundation/render/picture-playwright.mjs: clearpackages/cli/test-utils/css-shorthand-order.mjs: clearpackages/cli/test-utils/long-ask-binding-rows.mjs: clearscripts/vitest-node-durations.json: clear
2718441 to
c1d17af
Compare
dd564ba to
80ad03a
Compare
There was a problem hiding this comment.
Waiting on an engineering owner's decision, with three fixes needed.
No current spec record governs the editor behaviors this pull request adds, so approval needs an engineering owner to approve them as shipped (or identify the governing spec, or say which should change) by commenting /approve-spec c1d17afb5c725be3b0b2899684afaed08fd512fe on this pull request (the author may do so as an engineering owner; an approval given for an earlier head does not carry). To settle: set adding a see-through border (with a measured size note) for a border color on a part that draws none and refusing one after a whole-border none; how's readings of sides, transparent sides, per-side runs, padding lists, corners, hidden pieces, look-alikes, product names, "like before" and "use the default theme"; and gradient longhands for variants, states and modes.
Fixes needed whatever that decision is:
how "selected tab: transparent bottom, #dddddd border"listsborder-bottom '1px solid transparent'beforeborder '1px solid …', so running it in order letssetdrop the see-through bottom while the answer says it is drawn; put a shorthand said after one of its sides first in the sequence and make the test attheme-how-border-sides.test.mjs:342assert the order.- Regression:
.changeset/experimental-theme-how-border-sides.mdsays per-side colors are read as written "with a width beside them or not", but a bare light run such as#eee #eee #dddstill writes one light border with the first color, so reword it (and the description's move-out line) to match. - The description gives
_how-question.mjsas +1477/-106, but at this head it is +1505/-107.
Claims and files checked
Review mode: full; reason: merge-touches-pr-files
- Changeset, a border color brings a border: see-through border at the theme width, named, its size change measured, one undo takes back both, refused after a whole-border none, a partial none saved as written: verified (tests pass; the badge grows 2px in width on a real render).
- Changeset, per-side borders: several sides, a transparent side, a part's own side, the dark-page contrast note: verified for the examples it gives; a transparent side said before the border: lost when the answer runs in order (see above).
- Changeset, per-side borders: colors one per side are one border color as written, with a width or not: false for a bare light run, which stays one light border.
- Changeset, corner asks: only the corners named, only and except, one radius of four for the top, the bottom or all corners, logical longhands otherwise: verified (tests and a before-and-after run).
- Changeset, pieces and whole looks: top nav items, product names asked, like before as undo, variant look-alikes, kept, shown and background-only pieces, no hide for a button's icon or a piece that holds a control, theme add before theme use: verified (tests and a before-and-after run).
- Changeset, gradient longhands: longhands in variants, states and modes, whole-part longhands still apply, reset note: verified (tests).
- Description: editor-only change in the CLI package, no Core change: verified.
- Description: line delta of the question reader, +1477/-106: false (+1505/-107 at this head).
- Description: a color after a whole-border none is refused, a partial none is saved: verified.
- Description: the follow-up keeps today's behavior for a pronoun hide, nones on borderless parts and light per-side runs on standalone buttons and other card looks: verified, though a bare light run keeps today's behavior on every part, not only those.
- Description: a top nav said beside a side nav stays the top nav: verified.
- Description: based on the parts 2 to 13 branch; adds no mood or feel phrase matches; the switch-thumb test change lives lower in the stack: verified.
- Description: two pre-existing gaps (a border and a white fill in one clause; a hide after a negation): not checked, outside this change.
- Description: CI has not run on this head: verified; held-out answer key and look gate: not checkable from the repository.
.changeset/experimental-theme-border-color-brings-border.md: clear.changeset/experimental-theme-how-border-sides.md: finding: overstates per-side reading for a bare light run.changeset/experimental-theme-how-corner-positions.md: clear.changeset/experimental-theme-how-pieces-whole-looks.md: clear.changeset/experimental-theme-variant-gradient-longhands.md: clearpackages/cli/api/theme-edit/_adapter.mjs: clearpackages/cli/api/theme-edit/_check.mjs: non-blocking note (five slightly different no-line tests)packages/cli/api/theme-edit/_edit.mjs: non-blocking note (measuring page left in the cache when the build throws)packages/cli/api/theme-edit/_how-commands.mjs: clearpackages/cli/api/theme-edit/_how-question.mjs: finding: a transparent side said before the border is ordered after itpackages/cli/api/theme-edit/_part-words.mjs: clearpackages/cli/api/theme-edit/_preview.mjs: clearpackages/cli/api/theme-edit/_settings.mjs: clearpackages/cli/api/theme-edit/_tables.mjs: clearpackages/cli/api/theme-edit/theme-built-css-shorthand-order.test.mjs: clearpackages/cli/api/theme-edit/theme-built-variant-gradient-longhands.test.mjs: clearpackages/cli/api/theme-edit/theme-edit-border-added-size.test.mjs: clearpackages/cli/api/theme-edit/theme-edit-border-color-needs-a-border.test.mjs: clearpackages/cli/api/theme-edit/theme-how-border-sides.test.mjs: finding: the order is not assertedpackages/cli/api/theme-edit/theme-how-corner-positions.test.mjs: clearpackages/cli/api/theme-edit/theme-how-family-named.test.mjs: clearpackages/cli/api/theme-edit/theme-how-reads-pieces-and-whole-looks.test.mjs: clearpackages/cli/api/theme-edit/theme-how-whole-look-said.test.mjs: clearpackages/cli/api/theme-edit/theme-how.test.mjs: clearpackages/cli/api/theme-edit/theme-regrown-look-keeps-card-text.test.mjs: clearpackages/cli/clients/cli/commands/experimental-theme-editor-how.doc.mjs: clearpackages/cli/foundation/render/part-boxes.mjs: clearpackages/cli/foundation/render/picture-chrome.mjs: clearpackages/cli/foundation/render/picture-playwright.mjs: clearpackages/cli/test-utils/css-shorthand-order.mjs: clearpackages/cli/test-utils/long-ask-binding-rows.mjs: clearscripts/vitest-node-durations.json: clear
80ad03a to
9fb75c8
Compare
c1d17af to
0224bbb
Compare
- #13054 feat(cli): experimental theme editor: round 15 parts 2–13 in one change Author: @josephfarina - #13049 feat(cli): experimental theme editor: round 15 parts 14–19 in one change Author: @josephfarina - #13048 feat(cli): experimental theme editor: round 15 parts 20–25 in one change Author: @josephfarina - #12803 experimental theme set: a state the part marks another way is written as that state Author: @josephfarina - #12735 experimental theme: a theme whose palette recipe a newer CLI made opens unchanged Author: @josephfarina
|
Landed in #13083. |
Summary: experimental theme editor: round 15 parts 14–19 as one change, so they review and merge together (a border colour shows where the part draws no border; padding side lists; corner asks; hiding a look; token colours; regrown looks keep the base's readable text). Experimental theme editor in
packages/clionly; no Core change.Replaces the six part PRs #12510, #12511, #12512, #12513, #12514 and #12515 (closed when this merges). Based on
theme-r15-p02-13; it retargets onto main once parts 1–13 land._how-question.mjsline delta for the whole change: +1566/-107.border-color, on a two-mode theme: one light border, as main writes it) on standalone buttons and on non-default cards. A top nav said beside a side nav stays the top nav in this change.The sections below are the six parts' own descriptions.
Owner decision this change follows (posted on the part pull request, #12510 (comment)): "Where the theme sets that border to none,
setstill refuses."set border none --on tabfollowed by a border colour on that part is refused, naming the none and its undo; main saved such a colour, a line that drew nothing.Known, as on main (follow-up #13044): a side colour given as a token (
border-bottom-color var(--color-accent)) said before a whole border in one list keeps the order said, so the whole border written after it replaces the side; main writes the same order.Side lists end at a comma when another look follows ("cards with a border on top, bottom padding 8px" gives the top border and the bottom padding, as main does).
fix(cli): a border colour on a part that draws no border brings the border it needs
Summary: fix(cli): a border colour on a part that draws no border brings the border it needs. Editor-only (experimental theme editor in
packages/cli); no Core, spec record or official-theme change.What changes
Phrase rules
Test plan
CI=1, the five cli typechecks,check-cli-structure,check:changesets, and the held-outhowanswer key (252 right, 0 wrong writes).Border colour where the theme turned the border off:
setrefuses it, naming the none and offeringundo <theme> border --on <part>(the recorded owner decision); a none on fewer sides than the colour is no conflict and the colour is saved.experimental theme how: per-side borders are read as said
Summary: experimental theme how: per-side borders are read as said. Editor-only (experimental theme editor in
packages/cli); no Core, spec record or official-theme change.What changes
Phrase rules
Test plan
CI=1, the five cli typechecks,check-cli-structure,check:changesets, and the held-outhowanswer key (252 right, 0 wrong writes).Pre-existing (main does the same; follow-up): "cards border #dddddd white background" writes nothing: reading a border and a white fill from one comma-less clause is not done yet.
experimental theme how: an ask's corners are the ones it names
Summary: experimental theme how: an ask's corners are the ones it names. Editor-only (experimental theme editor in
packages/cli); no Core, spec record or official-theme change.What changes
Phrase rules
Test plan
CI=1, the five cli typechecks,check-cli-structure,check:changesets, and the held-outhowanswer key (252 right, 0 wrong writes).experimental theme how: a top nav's links are its items
Summary: experimental theme how: a top nav's links are its items. Editor-only (experimental theme editor in
packages/cli); no Core, spec record or official-theme change.What changes
Phrase rules
Test plan
CI=1, the five cli typechecks,check-cli-structure,check:changesets, and the held-outhowanswer key (252 right, 0 wrong writes).Pre-existing (main does the same; follow-up): "…isn't useful so hide it" still hides nothing (the statement gate keeps it as "not sure"); round 15 no longer reads the earlier negation as ruling the hide out.
fix(cli): variant and state gradients keep the part's background longhands
Summary: fix(cli): variant and state gradients keep the part's background longhands. Editor-only (experimental theme editor in
packages/cli); no Core, spec record or official-theme change.What changes
Phrase rules
Test plan
CI=1, the five cli typechecks,check-cli-structure,check:changesets, and the held-outhowanswer key (252 right, 0 wrong writes).experimental theme test: a regrown look keeps the base theme's card text readable
Summary: experimental theme test: a regrown look keeps the base theme's card text readable. Editor-only (experimental theme editor in
packages/cli); no Core, spec record or official-theme change.What changes
Phrase rules
Test plan
CI=1, the five cli typechecks,check-cli-structure,check:changesets, and the held-outhowanswer key (252 right, 0 wrong writes).