Repository navigation
feat(cli): experimental theme how: readings held back from round 15 - #13044
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
02b5acf to
d12304c
Compare
d12304c to
87008db
Compare
There was a problem hiding this comment.
Changes requested: how now removes only the look a pronoun refers to and keeps a nav bar on the top nav, but three things need fixing.
- An earlier ask joined by "and" is still swallowed into the part, so "make the buttons blue and the card border is ugly, hide it" writes
border noneon the buttons and cards and drops the blue (packages/cli/api/theme-edit/_how-question.mjs:5114-5121); cut the part after its last "and", "then" or "but" and add that ask to the test. - The new Changeset
.changeset/experimental-theme-how-pronoun-look-nav-bar.mdcredits no contributor, sopnpm check:changesetsfails; add@josephfarinaon its own line after the note. - The description's before and after table and its list of asks that keep their answers do not match the base: two of the six "changed" asks already answer this way there, "side nav bar links bold" and "side nav bar items red" change instead of keeping their answers, and row 2 never added a shadow, so describe what the target base answers.
The non-blocking notes (the first look word wins over the one the pronoun refers to, the "on"/"of" fallback needs a verb, and formatter-only test rewraps ride along) are optional.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Claim (Changeset): a look taken away by a pronoun takes away only that look on that part, for both examples: verified (new tests and probes).
- Claim (Changeset): never the part itself: verified (no probed ask writes a display change).
- Claim (Changeset): the asks said before it stay as said: verified for asks split by a comma or semicolon; false for an ask joined by "and" (blocking).
- Claim (Changeset): a nav said as a bar is the top nav even beside a side nav, and a side nav bar is the side nav: verified (tests and probes).
- Claim (Changeset): an experimental patch release note for the CLI: verified for the tag and bump; it credits no contributor, so the changesets check fails (blocking).
- Claim (earlier Changeset edit): the pronoun and nav-bar sentence moves to the new Changeset: verified.
- Claim (description): the pronoun rewrite covers the last clause with hide, remove, drop, lose or get rid of plus it or them: verified.
- Claim (description): the part is the words before the look, or after "on" or "of": verified; the code also accepts "in" and "around" and needs a verb after the part (non-blocking).
- Claim (description): clauses said before are not changed: false for an ask joined by "and" (blocking).
- Claim (description): the sidebar remap skips a nav said as a bar, and side navigation counts as a side nav: verified.
- Claim (description): there is no current record for the question reader: verified.
- Claim (description): the before and after table lists the asks whose answers change: false at the base for two rows and for the "before" of three more (blocking).
- Claim (description): no API, JSON shape or command changes, and the part is never hidden: verified.
- Claim (description): a pronoun with no look before it keeps its reading: verified (such asks write nothing before and after).
- Claim (description): the new tests cover every ask in the table: verified.
- Claim (description): side nav bar links and items keep their answers: false, they move from the top nav to the side nav at the base (blocking, with the table).
- Claim (description): the sidebar nav items ask and the top nav plus side nav ask keep their answers: verified at the base.
- Claim (description): unrelated cleanup was removed or split: false, formatter-only rewraps of unrelated tests ride along (non-blocking).
- Claim (description): the theme editor tests show no new failures against the base: verified for every test file that exercises the question reader; the one failure there fails the same way on the base.
- Claim (description): the CLI type checks and ESLint on the changed files pass: verified for ESLint and three type checks; the strict type check fails only on two unrelated template imports of an unbuilt theme.
- Claim (description): public text has no internal context: verified.
- File
.changeset/experimental-theme-how-pieces-whole-looks.md: clear. - File
.changeset/experimental-theme-how-pronoun-look-nav-bar.md: no contributor line (blocking); the earlier-asks wording is broader than the code (blocking, with the "and" finding). - File
packages/cli/api/theme-edit/_how-question.mjs: an "and"-joined ask is swallowed into the part (blocking); the first look word wins, and the on/of fallback needs a verb (non-blocking). - File
packages/cli/api/theme-edit/theme-how-reads-pieces-and-whole-looks.test.mjs: covers the table's asks but no "and" ask; formatter-only rewraps of unrelated tests (non-blocking).
251de9b to
cb8b1b8
Compare
66430ac to
d0753e0
Compare
There was a problem hiding this comment.
Changes requested: the nav-bar, "actions" and border-side readings work as described, but five how, set and undo answers now write the wrong command, and two Changesets fail the Changeset check.
- "make sure it feels playful", "less boring and more playful" and "make it playful, the current one is ugly" now step away from playful (
corners less,vibrancy less) where the base wrote nothing, because the dislike cues inpackages/cli/api/theme-edit/_how-question.mjs:32425-32437fire across "and", commas and purpose clauses; tie each cue to the feel's own clause and add these asks as rows that must never step away. - An earlier ask joined by "and" is still swallowed into the part, so "make the buttons blue and the card border is ugly, hide it" writes
border noneon buttons and cards and drops the blue (_how-question.mjs:5114-5121); cut the part after its last "and", "then" or "but". - Matching earlier parts by the first word of their name (
_how-question.mjs:29272-29280) makes "Undo the code block header change" also take back the copy button change, "Undo the button change" take back a button group change, and "Undo the text change" after "text inputs rounder" take back nothing; match the whole part name as said. - "Make the headings bigger. Make the headings blue. Undo the heading color change." now takes back both changes without saying so, because
includes(what)at_how-question.mjs:29310-29315findstextinside--text-heading-*-sizeand the "could mean more than one" answer at line 29323 no longer runs. undo <theme> border --on tabcannot remove the bordersetadded for a color, because the loop atpackages/cli/api/theme-edit/_edit.mjs:6520-6536puts it back and answers "no change"; bring a border only when the undone setting turned a side off..changeset/experimental-theme-how-actions-no-part.mdand.changeset/experimental-theme-how-pronoun-look-nav-bar.mdcredit no contributor, sopnpm check:changesetsfails; add@josephfarinaon its own line after each note.- The undo Changeset and the description say "Undo the card and heading changes" now takes back each change, but the base already does, and Reading 1's row 2 "before" and the "top nav links bold and the side nav items red" keep-list entry do not match the base either; correct the release note and the description.
The readings are separate commits, so the ones that already work could land on their own. The non-blocking notes (the first look word wins in "the outline button border is ugly, hide it", a contradictory line for "the cards have a heavy shadow, remove it", the border refusal's promise when two side nones remain, surfaces for "minimal", and formatter-only test rewraps) are optional.
Claims and files checked
Review mode: full; reason: rebase
- Changeset, border color: refused only when every side it is on is off, read in order, and undoing the none brings the border: verified (new tests, probes); the refusal's "brings the border it needs" fails when two separate side nones remain (non-blocking).
- Changeset, actions: "actions 8px corners" names no part and writes nothing, "rounder actions" still reads buttons: verified; no contributor line (blocking).
- Changeset, feel: the listed dislike asks step away, keep-away asks move nothing: verified; the cues also fire on asks that want the feel (blocking).
- Changeset, pronoun and nav: only the look goes, never the part: verified; asks said before stay as said: false for "and" joins (blocking); nav bar and side nav bar readings: verified; no contributor line (blocking).
- Changeset, undo: two named changes are both taken back: verified; "the card and heading changes" already worked on the base (blocking); a look-qualified undo takes back only that look: verified.
- Description, pronoun trigger words, look words and the part taken from before the look or after "on"/"of": verified (the code also takes "in" and "around").
- Description, earlier clauses are not changed: false for "and" joins (blocking).
- Description, the sidebar remap skips a top nav or nav bar, and side navigation counts as a side nav: verified.
- Description, no current record for the question reader: verified.
- Description, Reading 1 table: rows 1 and 3 to 6 and every "after": verified; row 2 "before": false, the base writes nothing (blocking).
- Description, no API, JSON or command change, and the part is never hidden: verified.
- Description, a pronoun with no look keeps its reading: verified.
- Description, tests cover the table and the keep list: verified for the table and three keep-list asks; "top nav links bold and the side nav items red" changes on this base (blocking).
- Description, Reading 2 and its five rows: verified.
- Description, Reading 3 steps (busy, playful, loud) and its listed asks: verified; the cue list also fires on asks that want the feel, and "so minimal, I love it" now steps away (blocking); keep-away asks move nothing: verified; surfaces is named as not taken only when it is the feel's one dial (non-blocking).
- Description, Reading 4: the two-change undo and the look-qualified undo: verified; "the card and heading changes" already worked (blocking); a color undo that could mean several changes still takes nothing back: false for headings (blocking); a single-part undo stays the same: false for parts that share a first word (blocking); the whole-theme undo, the reset note and the 20px row: verified.
- Description, Reading 5: five new tests that all fail on the base: verified; per-side refusal, ordered reading, CSS side mapping and undo bringing the border: verified; an undo of the added border brings it back (blocking).
- Description, one commit per reading with its tests: verified.
- Description, unrelated cleanup removed or split: false, formatter-only test rewraps ride along (non-blocking).
- Description, Changesets and focused tests ship with the change: verified.
- Description, no internal context in public text: verified.
- Description, the theme editor tests show no new failures against the base: verified for the
howand border test files; the one failure there fails the same way on the base. - Description, CLI type checks and ESLint: ESLint and three type checks pass; the strict check fails only on two template imports of an unbuilt theme, unrelated to this change.
- File
.changeset/experimental-theme-border-color-brings-border.md: clear (wording note non-blocking). - File
.changeset/experimental-theme-how-actions-no-part.md: no contributor line (blocking). - File
.changeset/experimental-theme-how-feel-move-away.md: states a rule that misfires (blocking, with the feel finding). - File
.changeset/experimental-theme-how-pronoun-look-nav-bar.md: no contributor line and the "and" claim (blocking). - File
.changeset/experimental-theme-how-undo-several-changes.md: its second form already worked (blocking). - File
packages/cli/api/theme-edit/_check.mjs: side fold correct for every tested case; refusal promise with two side nones (non-blocking). - File
packages/cli/api/theme-edit/_edit.mjs: undo puts the added border back (blocking). - File
packages/cli/api/theme-edit/_how-question.mjs: feel cues, undo part match, color undo and "and" swallow (blocking); outline look word and the "heavy shadow" line (non-blocking). - File
packages/cli/api/theme-edit/_tables.mjs: clear. - File
packages/cli/api/theme-edit/theme-edit-border-none-sides.test.mjs: clear. - File
packages/cli/api/theme-edit/theme-how-feel-words.test.mjs: no row for asks that want the feel (with the feel finding). - File
packages/cli/api/theme-edit/theme-how-long-ask-binding.test.mjs: the "two parts at once" row already passes on the base; no sibling-part row (with the undo findings). - File
packages/cli/api/theme-edit/theme-how-reads-pieces-and-whole-looks.test.mjs: no "and" row (with that finding); formatter-only rewraps (non-blocking). - File
packages/cli/api/theme-edit/theme-how-roles-and-sides.test.mjs: clear for the actions rows; formatter-only rewraps (non-blocking).
d0753e0 to
731ae35
Compare
dcbe812 to
ab9a079
Compare
9e464c1 to
9e7725b
Compare
ab9a079 to
981cb6b
Compare
9e7725b to
d90a658
Compare
f2ad19d to
ab28f52
Compare
d90a658 to
55c904e
Compare
ab28f52 to
0091f1a
Compare
a651bb5 to
3ae9844
Compare
…dark color after a light one brings its own; side lists read through sidesOf; the changeset limits the one-mode border to seam looks [skip ci]
…left to those readers; the note says what is new [skip ci]
…e; the white-text row reads per mode "badges with a subtle colored background and dark text" says a fill the answer writes nowhere, so the text has no ground to be measured on: it stays one line, kept to the mode it reads in, as on the base. The white-text row asserts the per-mode answer, with the measurements that decide each variant. [skip ci]
…hich reads a logical pair's start and end with calc() kept whole [skip ci]
…says so [skip ci]
…r radius") is never the look a pronoun takes away [skip ci]
…ariant "buttons with white text, cards with a light gray background" said a fill for the cards, which turned off the per-variant split of the buttons' text. The fill word now counts only in a clause that names the text's part or says the text, so the buttons' white goes to each variant in the modes it reads in; "badges with a subtle colored background and dark text" still keeps one line. [skip ci]
…re goes to that piece (a banner's description after its title)
…e; a color inside a look is the look's tint [skip ci]
…wn backticks, so it pastes as written [skip ci]
…t before still counts as color only, so the piece takes it [skip ci]
… accent dial takes it; any other hue fills the part as before [skip ci]
shift, shiftKeepAlpha, withAlpha, scaled, blurScaled and shadowAlphaScaled move out of _how-question.mjs. No behavior change. [skip ci]
…no shade word and only when it is not light by its lightness [skip ci]
… that part, and "X and Y accents" takes the last color, as main does [skip ci]
…he colors-before-role reading leaves #13044) [skip ci]
…lue helpers live in their own modules _how-question.mjs keeps the readers; HUES, STATE_WORDS, TRANSLATE and DESIGN_WORDS move to _how-words.mjs, joinSideLists and sideColorsIn to _how-sides.mjs, outOfBounds and valueAsked to _how-values.mjs. No behavior change. [skip ci]
…named whole on the text result only; the corner offer quotes "only" only when the ask said it [skip ci]
…in reads it; the lone-color note says what is new [skip ci]
…e per-mode text reading leaves #13044) HQ.7h's keep test found main's answer defensible on every row: it writes the asked color on every variant in every mode. [skip ci]
…change was taken back on; a named part with no earlier change has nothing to take back [skip ci]
…n part; "remove them" after parts listed after on takes the look from each [skip ci]
… PR (each returns as its own small PR with its open findings fixed) [skip ci]
|
Covers the readings this trimmed pull request keeps (the owners' rulings): side navigation; border sides in set and undo; a lone colour and a piece-led colour; flat over a part's own fill, and banner text; light and dark; "use the default theme"; and the text-run note and corner-offer wording. |
|
/approve-spec 52e44bc |
There was a problem hiding this comment.
Approved. The readings this pull request keeps are approved by an engineering owner for this exact head, and their tests fail on feature/theme-editor and pass here.
CI's test workflow runs only for pull requests into main and release/**, so it has not run on this pull request; it runs when feature/theme-editor goes to main.
The non-blocking notes from earlier rounds stay open on their threads; the most visible is that "return to the default theme" and "go back to the previous theme" answer with the theme switch while still listing "return" or "previous" as not taken.
Claims and files checked
Review mode: full; reason: rebase
- Claim: a border color is refused only when every side it is on is turned off, read in the order the settings are written, naming the setting and its undo — verified (
_check.mjsborderSetToNone,borderSidesOff; border-none-sides tests). - Claim: a color with a side that still draws is saved, and the border it brings goes before the part's own border settings and any saved color — verified (
broughtBorderAt; "goes before them" and saved-color tests). - Claim: a one-mode color brings its border in that mode only on a look with a seam, in every mode elsewhere, and a one-mode border counts only in its mode — verified (
borderFor,bordersBeyondCore; three tests). - Claim: undoing a none, or setting the same color again, brings the border back; undoing a radius or the brought border does not — verified (
_edit.mjs; undo tests). - Claim:
howbuilds border colors the same way — verified (_how-commands.mjsapply). - Claim: per-side colors with no width name the card looks that draw no border, with a line that gives one; a light run stays one border — verified (border-sides test; answer names transparent, muted and the color looks).
- Claim: printed stable theme commands start the way the app runs the CLI — verified (
_how.mjswithPrefix; the answer prints the app's invocation). - Claim: "works in light and dark" at the end of an ask or clause asks for both modes, never mid-clause, and nothing after a "not" — verified (offers test; mid-clause ask answers as before).
- Claim: a color led by another piece of the part goes to that piece — verified (family-named test).
- Claim: a lone color after a button, checkbox or switch fills it, after text or a plain fill it is the text or fill, a typed value is not used, and role or variant pieces go to their readers, all as before — verified (answers match the base branch for each listed ask).
- Claim: "use the default theme" prints
theme addbeforetheme use, and a theme with no base says so — verified (family-named and pieces tests; the base branch answers nothing). - Claim: "side navigation" is the side nav — verified (nav-as-bar test).
- Claim: a status's banner text goes only to title and description tokens, and a token its buttons share is left and named — verified (roles-and-sides test).
- Claim: flat surfaces keep colored and status variants and the part's own fill, per mode — verified (four flat tests).
- Claim: one unanswered ask stays a todo test, answered the same way as the base branch — verified.
- Claim: no internal context in public text; tests, type checks and lint run clean — verified for the changed files.
- Files: all 8 release notes,
_edit.mjs,_how-commands.mjs,_how.mjs,_missed.mjs,_settings.mjs, the four new helper modules (line-for-line moves) and all 17 test files — clear. - Files:
_check.mjs,_css.mjsand_how-question.mjs— clear of blocking findings; non-blocking notes stay on their threads.
|
Landed on main in #13276. |
User need
People describe a theme change the way they would to a designer. This PR carries readings of
astryx experimental theme editor howthat were held back from round 15 for their own review, one section each below.Reading 1: side navigation
"Side navigation" counts as a side nav: "side navigation bar items bigger" writes
spacing more --on side-nav-item(main:--on top-nav-item). Tests:theme-how-reads-pieces-and-whole-looks.test.mjs("a nav said as a bar").Reading 2: a border color where some sides are turned off
A border color on a part whose border the theme turns off on some sides used to be refused for the whole border. Now the editor reads the part's border settings in the order they are written, side by side. A multi-value width or style maps to sides as CSS does, and logical pairs read as start and end. A shorthand sets width and style, and a later setting that is not none draws that side again.
setrefuses a border color only when every side it is on is off, and names the none. A shorthand with no style word (border-top 1px) draws no line, so a color after it brings the border it needs. Undoing a none, or setting the same color again, brings back the border that a saved color needs. An undo brings a border back only when the setting it undoes is a border width, style or side shorthand that turned a side off (neverborder-radius 0), soundo <theme> border --on tabremoves the bordersetadded. A border brought back by an undo or by setting the same color again also goes before the part's own border settings and any earlier saved border color, so a side the theme turned off stays off and a saved color still shows.A one-mode border color brings its see-through border in that mode only where the look draws a line in the other mode (a button group's seam); a tab or banner gets it in every mode, so its size never changes with the color scheme. Tests (
theme-edit-border-none-sides.test.mjs, 15 tests, andtheme-edit-border-color-needs-a-border.test.mjs):'0 0 1px': saved on all sides and on the bottom, refused on the top;'none none solid',border-bottom none,border-block-width '0 1px',border-inline-style none;border nonethenborder-top 1px solid;border-width 0thenborder-bottom-width 2px;Per-side colors said with no width or style ("cards with a #999999 #999999 #777777 border") go to the looks that draw a border. A light run ("#eee #eee #ddd") stays one border on every look, as round 15 reads it. The looks whose default draws none (a card's transparent, muted and color looks) get no border brought, so their layout does not move. The answer names them, with the one line that gives one a border. Test in
theme-how-border-sides.test.mjs.Reading 3: a lone color after a part
A list piece that is only a color, said after a part:
progress-bar-fill); a typed value ("bigger buttons, #2563eb", "bold headings, #333333") is not used; a colored part right after the color keeps it ("red, blue buttons"); and a piece that names a role or variant ("primary blue", "red and blue accents") goes to the role and variant readers.Tests: rows in
theme-how-family-namedandtheme-how-every-clause-answered.Reading 4: flat over a part's own fill, and a status's banner text
"Flat" on a part that paints its own fill keeps its variants, and the part's own fill wins. The part's own fill counts when it is set on the part itself or through a group it is in (
--on containers), and flat drops its fill only in the modes those fills cover: a--mode darkcard fill keeps flat's fill on plain cards in light. A status's banner text means the banner's own text tokens, never a token its buttons or icon read too: "success text bold" writes--font-weight-normal 700 --on banner --when status:success(the description's weight), and "warning text 10px" writes the description's--text-supporting-size 0.625rem, leaving the title's label size, which its buttons read too, and saying so. Tests:theme-flat-keeps-colored.test.mjs(4) andtheme-how-roles-and-sides.test.mjs("a status's text on a banner …"). One ask this PR does not answer yet staysit.todointheme-held-flat-fill-banner-text.test.mjs: "a bordered strip of buttons" (main answers it the same way).Reading 5: a theme that must work in light and dark
"works in light and dark", "should work in light and dark mode", "looks good in dark and light modes" and "it needs to look good in dark and light" ask for both modes when said at the end of the ask or of its clause, so a one-mode theme gets
mode both. So do "make sure it works in light and dark mode" and "please make it work in light and dark mode". The phrase becomes a clause of its own, so a color said with it keeps its reading: "a navy theme that works in light and dark" writes the navy accent andmode both. Said before more of its clause, the phrase only qualifies that clause: "text that must work in light and dark mode should be #111111" writes the primary text color, and "headings that work in light and dark mode should be navy" adds noheadings light. Tests:theme-how-offers-follow-the-answer.test.mjs.With a "not" before it in its clause ("it doesn't need to work in light and dark mode"), the phrase asks for nothing.
Reading 6: the base theme asked for by name
"use the default theme" prints
<cli> theme add <base>, then<cli> theme use <base>, each in the form the app runs the CLI (npx @astryxdesign/cli@… theme add neutralunder npx). A theme with no base says it has none to go back to. Main writes nothing for these asks. Tests:theme-how-family-named.test.mjs("the base theme asked for by name").Current specification
No current record covers the
howquestion reader. These readings are experimental CLI behavior, changed through[experimental]patch changesets, and they follow the editor's rule that a clause writes on the part it names.Scope
Components: experimental theme editor (
how,set,undo)Testing
vitest run --project node packages/cli/api/theme-edit packages/cli/api/theme packages/cli/clients/cli/commands/experimental, compared with the base branch: no new failures.preflight run at ff2e5a4 (review deferred to the train's review)
preflight: pass 52e44bc
replay: worse 0 at 52e44bc