Repository navigation
fix(cli): how writes the color of a bold run said for a part's text, and the top bar's links take their looks on its nav items - #12701
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
|
/approve-spec 5cc3299 |
PR Analysis Report🔎 Preview ·
|
There was a problem hiding this comment.
Changes requested: the two reported asks now write every look, but the look-run split and the top-bar mapping break other asks, each reproduced on this head against main.
- An existing test, "bold white text in the header gives the weight and the color" in
theme-neutral-mode-words-direction.test.mjs, passes onmainand fails on this head because the split drops the bold. - "cards with bold 14px text" (and the same ask for buttons and dialogs, or "bold white text on dark cards") now sets the whole theme's
text-size 14or--text-body-weight 700instead of the card's own font size or weight, because the split clauses lose the part named before "with". - "make the links in the header white", the release note's own example, now writes nothing and answers that the header cannot be kept apart, where
mainwrote the link token on the header. - With a sidebar anywhere in the ask ("a light gray sidebar and a top bar #3b5998 with white links"), the top bar's links are written on
side-nav-item, because the sidebar remap right after the new loop turns everytop-nav-itemintoside-nav-item. - A length before "text shadow" or "link underline" becomes a text size: "headings with a 1px white text shadow" sets headings to 1px and "a 2px blue link underline" sets links to 2px.
- The release note promises more than the code does: a run that starts with a hex color ("#3b5998 bold 13px text") still loses the bold and the color, and a bar read as the top nav ("top nav #3b5998 with white bold 11px links") still writes on every link, so fix both or narrow the note.
Please add each of these asks to the test with its fix; a new commit also needs a fresh /approve-spec for the new head. Not blocking: a typed list such as "navy header, blue links, rounder cards" now colors only the top nav items, because a person's comma reads like the rewrite's own.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Claim: every look said together before a text is written — true for the two examples in the new test; false for a run that starts with a hex color and for a run said after "with" a part.
- Claim: a size given to links ("11px links") is their text size — verified; the head writes it on the links.
- Claim: links joined to the top bar by "with" or a comma are its nav items — verified for "top bar … with … links"; false when a sidebar is named or the bar reads as the top nav.
- Claim: "the links in the header" are its nav items — false; nothing is written.
- Claim: links said apart from the bar ("a navy header and blue links") stay every link — verified by the new test.
- Claim: a run needs at least one weight or size, and colors alone read as before — verified from the pattern.
- Claim: the new test fails before the fix and passes after it — verified; two of its three tests fail on
main. - Claim: every theme-how test file passes — verified (25 files, 811 tests).
- Claim: ESLint, Prettier and the changeset check are clean — verified; the strict CLI type check shows no errors in the changed files, and the other type checks were not run.
- Claim: public text holds no internal context — verified.
- File
.changeset/how-text-look-runs.md— finding: claims broader than the code. - File
packages/cli/api/theme-edit/_how-question.mjs— findings: scope lost in the split, the header refusal, the sidebar remap, shadow and underline sizes, hex-led runs, the top nav. - File
packages/cli/api/theme-edit/theme-how-text-look-runs.test.mjs— clear: it passes and fails onmainfirst, but covers none of the asks above.
5cc3299 to
9566952
Compare
|
/approve-spec 9566952 |
9566952 to
da364a5
Compare
|
/approve-spec da364a5 |
There was a problem hiding this comment.
Changes requested: the two reported asks now write every look on the right part, and the /approve-spec for this head settles the new readings, but one kind of ask now writes on the wrong part.
- A hex run said for one part's text but placed in another part now restyles that place: "tabs with bold 13px #3b5998 text on cards" writes bold, 13px and the text color on every card (and "buttons with bold 14px #ffffff text in dialogs" on every dialog) where
mainwrote nothing, soownRunin_text-looks.mjsshould decline a run when one of the clause's parts is only the place the words put it in (while keeping "on hover" and "in dark mode"), and the test should pinmain's answer for these asks.
Not blocking: a look said for the bar's links after "and" ("… and underline them on hover", "… and make its text bold") still lands on every link while their color goes to the nav items. A new commit needs a fresh /approve-spec for its head.
Claims and files checked
Review mode: full; reason: rebase
- Changeset: a run said right before a part's own text writes every look, its color included — verified ("tabs: bold 13px #3b5998 text", "tabs with bold uppercase 13px #3b5998 text").
- Changeset: links said with the top bar or top nav go on its nav items — verified ("top bar #3b5998 with white bold 11px links", "top bar with white links").
- Changeset: a run with no part of its own, or links said with another part, read as before — verified ("#3b5998 bold 13px text", "a sidebar with white bold 13px links").
- Description: the two reported asks fail on
mainas described — verified. - Description: a run needs a weight or a size, and a color or numeric weight right before the length keeps
main's answer — verified ("cards with 13px #3b5998 bold text"). - Description: a noun after the run (stroke, glow, halo, shadow, underline) makes no run — verified.
- Description: a run counts only for a part's own text, and one the words place on something else keeps
main's answer — false for a run placed in another part ("tabs with bold 13px #3b5998 text on cards"). - Description: bar links joined by "with", said in a bar with no look of its own, with a sidebar named, split into several asks, led by a hex, or said again for a mode or a state go on the nav items — verified.
- Description: links placed elsewhere, plain more links, links said apart and links placed in the header read as on
main— verified. - Description: a text or bar look said after the links with "and" goes back to the bar, and a look said for the links reads as on
main— verified. - Description:
weightInmoves with no behavior change — verified (identical apart from a type cast). - Description: a test fails before the fix and passes after it — verified (16 of 16 on this head; the file cannot load on the merge base).
- Description: a replay of 729 asks differs only on this change's own asks — not reproducible here (the list is not in the pull request); an ask outside it differs (the finding above).
- Description: the theme-how and theme-neutral tests pass — verified on this head merged into
main, together with every other test file that callshow. - Description: ESLint, Prettier and the strict CLI typecheck are clean on the changed files — verified.
- Description: public text holds no internal context — verified.
- File
.changeset/how-text-look-runs.md— clear. - File
packages/cli/api/theme-edit/_how-question.mjs— clear. - File
packages/cli/api/theme-edit/_text-looks.mjs— finding: a run placed in another part is read as that part's own; note: later looks for the bar's links. - File
packages/cli/api/theme-edit/theme-how-text-look-runs.test.mjs— clear: it passes, with no case for a run placed in another part.
| held && | ||
| // (Only a look said for text, or one the bar draws itself; "underline | ||
| // them on hover" is still the links'.) | ||
| !/\b(?:them|their|they|it|its)\b/.test(c.text) && |
There was a problem hiding this comment.
Non-blocking: "it" and "its" usually name the bar, so "a navy top bar with white links and make its text bold" makes every link bold. A later look for "them" ("… and underline them on hover") also stays on every link while the links' color goes to top-nav-item.
da364a5 to
b0df508
Compare
|
/approve-spec b0df508 |
There was a problem hiding this comment.
Changes requested: the two reported asks now write every look on the right part, and the /approve-spec for this head settles the new readings, but one kind of ask now writes on the wrong part.
- A hex run said for one part's text but placed in another part restyles that place: "tabs with bold 13px #3b5998 text on cards" writes bold, 13px and the text color on every card (and "buttons with bold 14px #ffffff text in dialogs" on every dialog) where
mainwrote nothing, soownRunin_text-looks.mjsshould decline a run when one of the clause's parts is only the place the words put it in (while keeping "on hover" and "in dark mode"), and the test should pinmain's answer for these asks.
Not blocking: "… and make its text bold" after the bar's links still bolds every link while their color goes to the nav items. A new commit needs a fresh /approve-spec for its head.
Claims and files checked
Review mode: full; reason: rebase
- Changeset: a run said right before a part's own text writes every look, its color included — verified ("tabs: bold 13px #3b5998 text", "tabs with bold uppercase 13px #3b5998 text").
- Changeset: links said with the top bar or top nav go on its nav items instead of every link — verified ("top bar #3b5998 with white bold 11px links", "top bar with white links").
- Changeset: elsewhere, such as a run with no part or links said with another part, it reads as before — verified for those cases; false for a run placed in another part ("tabs with bold 13px #3b5998 text on cards").
- Description: the two reported asks fail on
mainas described — verified. - Description: a run needs a weight or a size, and a color or numeric weight right before the length keeps
main's answer — verified ("cards with 13px #3b5998 bold text"). - Description: a noun after the run (stroke, glow, halo, shadow, underline) makes no run — verified.
- Description: a run counts only for a part's own text; one with no part, on the page, or placed on something else keeps
main's answer — verified for "#3b5998 bold 13px text", "a page with bold 13px #333 text" and "bold 13px text on a #3b5998 background"; false for a run placed in another part. - Description: bar links joined by "with", said in a bar with no look of its own, with a sidebar named, split into several asks, led by a hex, or said again for a mode or a state go on the nav items — verified.
- Description: links placed elsewhere, plain more links, links said apart and links placed in the header read as on
main— verified. - Description: a text or bar look said after the links with "and" stays on the bar — verified ("… and a shadow", "… and white text", "… and bold text").
- Description: a look said for the links again by "them" goes on the nav items — verified ("… and underline them on hover").
- Description: case and style asks of a bar's links go on its nav items — verified ("top bar with bold uppercase links").
- Description:
weightInmoves with no behavior change — verified (the same body apart from a type cast). - Description: a test fails before the fix and passes after it — verified (17 of 17 on this head;
main's answers fail its assertions). - Description: a replay of 732 asks differs only on this change's own asks — not reproducible (the list is not in the pull request); an ask outside it differs (the finding above).
- Description: the theme-how and theme-neutral tests pass (28 files, 860 tests) — verified on this head; every test file that calls
howalso passes on this head merged intomain. - Description: ESLint, Prettier and the strict CLI typecheck are clean on the changed files — verified.
- Description: public text holds no internal context — verified.
- File
.changeset/how-text-look-runs.md— finding: "elsewhere it reads as before" is false for a run placed in another part (same fix). - File
packages/cli/api/theme-edit/_how-question.mjs— clear. - File
packages/cli/api/theme-edit/_text-looks.mjs— finding: a run placed in another part is read as that part's own; note: "its" after the bar's links. - File
packages/cli/api/theme-edit/theme-how-text-look-runs.test.mjs— clear: it passes, with no case for a run placed in another part.
… top bar's links, and puts the bar's link looks on its nav items The text-look readers live in a leaf module and apply once each clause has its parts. Every other ask reads as on main.
b0df508 to
bb2ce4f
Compare
|
/approve-spec bb2ce4f |
There was a problem hiding this comment.
Needs an owner decision: the two reported asks now write every look on the right part, and runs placed in another part read as on main again, but no record decides how how reads these words and the earlier /approve-spec comments covered older heads.
Approval waits on an engineering owner deciding both readings (a run of looks said for one part's own text also writes its color; the top bar's link looks go on top-nav-item while their color stays the bar's link token) by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner.
Blocking, to fix as well:
- A second part said with the same run loses its color, because
addRunLooksskips any clause whose words already appeared (_text-looks.mjs:132-139), so "cards with bold 13px #3b5998 text, buttons with bold 13px #3b5998 text" colors the cards but answers "but not #3b5998" for the buttons; key that guard on the words and the part, and add such an ask to the test. - The description says a run led by "italic" keeps
main's answer, but "cards with italic bold 13px #333 text" now writes#333as the card's text color, so that sentence needs correcting (or the italic answer pinned in the test).
Not blocking: "tabs with bold 13px #3b5998 text and selected tabs with bold 13px #ffffff text" writes the tab's color while the same reply still says #3b5998 was not written, a line main's clause reader already produced.
Claims and files checked
Review mode: full; reason: rebase
- Description: on
main, the top-bar ask wrote only the bar's fill and refused the links, and the tabs ask answered "but not" for its color — verified (run onmain). - Description: a hex in a run was no text color and "11px links" was no size — verified (
main's answers and the typed-color check). - Description: a run is looks said together right before "text" or "links", with a weight or a size, and a noun after it makes no run — verified (stroke, glow, halo, shadow and underline asks read as before).
- Description: a run whose color or numeric weight sits right before its length keeps
main's answer — verified ("cards with 13px #3b5998 bold text", "cards with 600 13px #333 text"). - Description: a run led by "italic" keeps
main's answer — false ("cards with italic bold 13px #333 text" now writes the color). - Description: a run said for a state keeps
main's answer — verified ("tabs with bold 13px #3b5998 text on hover"). - Description: a run counts only for one part's own text, never the page, every link or a part it is placed in — verified for the page, links and placed runs.
- Description and changeset: such a run writes its color, and its other drafts stop reporting that color — false for a second part said with the same run (Concrete Defects 1); verified for one part.
- Description and changeset: the top bar's links take weight, size and case on its nav items, keep the bar's link color, and with a sidebar named put the color on the nav items — verified.
- Description: a colon list, links placed elsewhere and "the links in the header" read as on
main— verified. - Description: split asks, hex-led links, more links for a mode or a state, and a look said again by "them" go on the nav items — verified.
- Description: a text or bar look said after the links stays on the bar — verified ("… and a shadow", "… and bold text", "… and white text").
- Description: "… and make its text bold" is unchanged and bolds every link — verified (same as
main). - Description:
weightInmoves unchanged into a new leaf module — verified (one type cast added). - Description: the new test fails on
mainand passes after — verified (20 of 20 on this head; it imports the new module). - Description: a replay of 742 asks differs only on this change's own asks — not reproducible (the list is not in the pull request).
- Description: the theme-how and theme-neutral tests pass (63 files, 1,340 tests), and ESLint, Prettier and the strict CLI typecheck are clean on the changed files — verified.
- Description: public text holds no internal context — verified.
- File
.changeset/how-text-look-runs.md— finding: "writes every look of a run … for a part's own text" is false for a second part with the same run. - File
packages/cli/api/theme-edit/_how-question.mjs— clear. - File
packages/cli/api/theme-edit/_text-looks.mjs— finding: the repeated-words guard drops a second part's color; note: one copied-words refusal line now contradicts a written color. - File
packages/cli/api/theme-edit/theme-how-text-look-runs.test.mjs— clear: it passes, with no ask that gives two parts the same run.
…, and counts a run's color read once [skip ci]
|
/approve-spec e079e02 |
There was a problem hiding this comment.
Changes requested: the /approve-spec for this head settles both readings, and another part said with the top bar now reads as on main, but the new state-color pass drops asked colors without a word and two earlier findings still stand.
- A state color said beside a run of the same color now disappears without a report, because the post-pass at
_text-looks.mjs:193-207treats any state clause whose hex a run read anywhere in the question as read, so "cards with bold 13px #3b5998 text and selected tabs with bold #3b5998 text" writes no selected-tab color and says nothing about it; key the read colors on the part as well as the hex, write or report the state's color for the same part, and add that ask to the test. - A second part said with the same run still loses its color, because
addRunLooksskips any clause whose words already appeared (_text-looks.mjs:132-139), so "cards with bold 13px #3b5998 text, buttons with bold 13px #3b5998 text" colors the cards but answers "but not #3b5998" for the buttons; key that guard on the words and the part, and add such an ask to the test. - The description says a run led by "italic" keeps
main's answer, but "cards with italic bold 13px #333 text" now writes#333as the card's text color, so that sentence needs correcting (or the italic answer pinned in the test).
The combined tabs ask no longer repeats the written #3b5998 as unwritten.
Claims and files checked
Review mode: incremental; reason: none
- Description: on
main, the top-bar ask wrote only the bar's fill and refused the links, and the tabs ask answered "but not" for its color — verified (run onmain). - Description: a run is looks said together right before "text" or "links", with a weight or a size, and a noun after it makes no run — verified (stroke, glow, halo, shadow and underline asks read as before).
- Description: a run led by "italic" keeps
main's answer — false ("cards with italic bold 13px #333 text" now writes the color). - Description: a run said for a state keeps
main's answer — false ("tabs: bold 13px #3b5998 text; selected tab bold #3b5998 text" dropsmain's report for the selected tab). - Description: a run counts only for one part's own text, never the page, every link or a part it is placed in — verified.
- Description and changeset: such a run writes its color, and its other drafts stop reporting that color — false for a second part said with the same run; verified for one part.
- Description: only links said with the top bar are its nav items, and another part said with it reads as on
main— verified ("top bar navy with blue buttons", "top nav navy with blue buttons", "a navy header with rounded buttons"). - Description and changeset: the top bar's links take weight, size and case on its nav items, keep the bar's link color, and with a sidebar named first put the color on the nav items — verified.
- Description: a text or bar look said after the links stays on the bar, and "… and make its text bold" is unchanged — verified.
- Description: the new tests pass, the theme-how and theme-neutral tests pass (63 files, 1,341 tests), and ESLint and Prettier are clean on the changed files — verified.
- Description: a replay of 748 asks differs only on this change's own asks — not reproducible (the list is not in the pull request).
- File
.changeset/how-text-look-runs.md— finding: "writes every look of a run … for a part's own text" is false for a second part with the same run. - File
packages/cli/api/theme-edit/_how-question.mjs— clear. - File
packages/cli/api/theme-edit/_text-looks.mjs— findings: the state-color pass silences asked colors; the repeated-words guard drops a second part's color. - File
packages/cli/api/theme-edit/theme-how-text-look-runs.test.mjs— clear: it passes, with no ask that gives another part's state the run's color or two parts the same run.
…read it [skip ci]
|
/approve-spec 129fb3a |
There was a problem hiding this comment.
Changes requested: the /approve-spec for this head settles both readings, and a state color said for another part is reported again, but the release note and the description still promise more than how does.
- A second part said with the same run words still loses its color: "cards with bold 13px #3b5998 text, buttons with bold 13px #3b5998 text" colors the cards but answers "but not" for the buttons, because
addRunLooksskips every clause whose words appeared earlier (_text-looks.mjs:133-139), so key that guard on the words and the part, or narrow the changeset's and title's "every look of a run said … right before a part's own text". - The description says a run led by "italic" keeps
main's answer, but "cards with italic bold 13px #333 text" now writes the card's text color, so narrow that half to an italic run with no weight or pin the answer in the test. - Miss: the same sentence says a run whose color sits right before its size keeps
main's answer, but "tabs with bold #3b5998 13px text" now writescolor '#3b5998' --on tab, so say that only a run opening with its color or size keeps it.
The new test and the theme-how and theme-neutral tests pass on this head.
Claims and files checked
Review mode: incremental; reason: none
- Changed rules (0).
- Claims, changeset:
- A run said right before one part's own text writes every look, its color included: false for a second part said with the same words (finding 1); true for one part (new test, probe).
- Links said with the top bar or top nav take weight, size and case on its nav items instead of being refused: verified (new test, probe).
- The bar keeps their color as its link color, and with a sidebar named first the color goes on the nav items: verified (new test, probe).
- A run with no part, a run placed in another part, and links said with another part read as before: verified (new test, probe).
- Claims, description:
- On
mainthe top-bar ask writes only the fill and refuses the links, and the tabs ask answers "but not": verified (probe onmain). - The causes (a hex inside a run is no text color, "11px links" is no size, links in the bar are every link): verified (
_how-question.mjs:13863-13884, probe onmain). - A noun after the run makes no run: verified (stroke, glow, halo, shadow and underline rows of the new test).
- A run whose color sits right before its size keeps
main's answer: false for a weight-led run (finding 3). - A run whose numeric weight sits right before its size keeps
main's answer: verified (probe). - A run led by "italic" keeps
main's answer: false when a weight follows (finding 2). - A run said for a state keeps
main's answer: verified for its own looks (probe); a hex its own part's run already wrote is reported once, as the description says. - A run counts only for one part's own text, never one placed in another part: verified (new test, probe).
- The run's color and a links size become asks of their own, and any other typed color is still reported: verified (new test).
- Only links said with the bar go on its nav items, with every case the description lists: verified (new test, probe).
- A text or bar look said after the links stays on the bar, and links placed elsewhere or in the header read as before: verified (new test, probe).
- The readers move to a new private module and
weightInmoves unchanged: verified (diff; only a type annotation is added). - "… and make its text bold" after the bar's links still bolds every link: verified (probe).
- The evidence list of test assertions: verified (22 of 22 pass).
- The long-ask binding test passes unchanged: verified (70 tests pass).
- The 750-ask replay: not checkable, as its ask list is not in the pull request.
- 63 files and 1,342 tests pass: verified (same count on this head).
- ESLint and Prettier are clean and the strict typecheck finds no error in the changed files: verified.
- Public text has no internal context: verified.
- On
- Files:
.changeset/how-text-look-runs.md: finding 1.packages/cli/api/theme-edit/_how-question.mjs: clear.packages/cli/api/theme-edit/_text-looks.mjs: finding 1; the state pass is fixed.packages/cli/api/theme-edit/theme-how-text-look-runs.test.mjs: clear.
…ves a list of parts as before [skip ci]
|
/approve-spec 57f95d7 |
There was a problem hiding this comment.
Changes requested: the /approve-spec for this head settles both readings, and two parts said with the same run words now both take the color, but one list shape now loses a color without saying so and two claims overstate the change.
- "cards, tabs and buttons with bold 13px #3b5998 text" writes the color on tabs and buttons but not on cards and no longer reports it (
_text-looks.mjs:133-169), so give every listed part the color or leave the whole list as onmain, and add that ask to the test. - The changeset's new "with at least one weight or size" is false, since "tabs with uppercase 13px #3b5998 text" and "tabs with 13px #3b5998 bold text" still drop the color as on
main, so restore "led by a weight word". - The description says weight-led runs with the color right before the size, and italic-led runs, keep
main's answer, but "tabs with bold #3b5998 13px text" and "cards with italic bold 13px #333 text" now write the color, so narrow that sentence to runs that open with their color and size, or an italic run with no weight.
The new test and the theme-how and theme-neutral tests pass on this head.
Claims and files checked
Review mode: incremental; reason: none
- Changed rules (0).
- Claims, changeset:
- A run said right before one part's own text with at least one weight or size writes every look, its color included: false for size- or case-led runs (finding 2); true for weight-led runs and for two parts said with the same words (new test, probe).
- Links said with the top bar or top nav take weight, size and case on its nav items instead of being refused: verified (new test, probe).
- The bar keeps their color as its link color, and with a sidebar named first the color goes on the nav items: verified (new test, probe).
- A run with no part, a run placed in another part, and links said with another part read as before: verified (new test, probe).
- Claims, description:
- On
mainthe top-bar ask writes only the fill and refuses the links, and the tabs ask answers "but not": verified (probe onmain). - The three causes (a hex inside a run is no text color, "11px links" is no size, links in the bar are every link): verified (the typed-color check in the question reader, probe on
main). - A run is looks said together right before the text or links with a weight or size: verified for weight-led and color-led runs; size- or case-led runs keep
main's answer (finding 2). - A noun after the run makes no run: verified (stroke, glow, halo, shadow and underline rows of the new test).
- Weight-led runs with the color right before the size, and italic-led runs, keep
main's answer: false (finding 3). - A run said for a state keeps
main's answer: verified (new test, probe). - The same words said for two parts are two runs: verified (new test, probe).
- A list of parts said with one run reads as on
main: false for a list with "and" (finding 1). - A run counts only for one part's own text, never the page, every link or a part it is placed in: verified (new test, probe).
- The run's color and a links size become asks of their own, and any other typed color is still reported: verified (new test).
- Only links said with the bar go on its nav items, including split asks, hex-led links, mode or state links and "them": verified (new test).
- A text or bar look said after the links stays on the bar, and links placed elsewhere or in the header read as before: verified (new test, probe).
- The readers move to a new private module and the weight reader moves unchanged: verified (diff; only a type cast is added).
- "… and make its text bold" after the bar's links still bolds every link: verified (probe, same as
main). - The listed test evidence: verified (23 of 23 pass).
- The long-ask binding test passes unchanged: verified (70 tests pass).
- The 754-ask replay: not checkable, as its ask list is not in the pull request.
- 63 files and 1,343 tests pass: verified (same count on this head).
- ESLint and Prettier are clean and the strict typecheck finds no error in the changed files: verified.
- A test fails before the fix and passes after it: verified (
mainanswers differently for the tested asks). - Public text has no internal context: verified.
- On
- Files:
.changeset/how-text-look-runs.md: finding 2.packages/cli/api/theme-edit/_how-question.mjs: clear.packages/cli/api/theme-edit/_text-looks.mjs: finding 1; the same-words guard is fixed.packages/cli/api/theme-edit/theme-how-text-look-runs.test.mjs: clear apart from the missing list ask in finding 1.
… reader splits, as on main The release note and the run reader's comment name the runs it reads whole.
|
/approve-spec ba4f386 |
There was a problem hiding this comment.
Changes requested: the /approve-spec for this head settles both readings and the list fix holds, but the release note and the description still misstate which runs change.
- The release note and the description list runs that start with a numeric weight or are a size and then a color ("tabs with 13px #3b5998 text") as now written "instead of dropping its color", but
mainalready writes the color for "tabs with 13px #3b5998 text", "tabs with 600 13px #3b5998 text" and "tabs with medium 13px #3b5998 text" and both drop the 600 and medium weights, so say the color is now written when the run has a weight word such as bold or semibold before its size, and drop those cases. - The release note and the description say a run that starts with italic or uppercase reads as before, but "tabs with italic bold 13px #3b5998 text" and "tabs with uppercase bold 13px #3b5998 text" now write the color where
mainanswered "but not", so say that such a run with no weight word reads as before.
The new test, the theme-how and theme-neutral suites, ESLint, Prettier and the strict typecheck of the changed files pass on this head.
Claims and files checked
Review mode: incremental; reason: none
- Changed rules (0).
- Claims, release note:
- A run said right before one part's own text writes every look, its color included, when it starts with a weight word, a numeric weight or a color, or is a size and then a color: true for runs with bold or semibold before the size; false for numeric-weight, "medium" and size-then-color runs, which already wrote their color on
mainand still drop the 600 or medium weight (finding 1). - A run that starts with a size and then a weight reads as before: verified (probe).
- A run that starts with italic or uppercase reads as before: true with no weight word, false with one (finding 2).
- Links said with the top bar or top nav take weight, size and case on its nav items instead of being refused: verified (new test, probe).
- The bar keeps their color as its link color, and with a sidebar named first the color goes on the nav items: verified (new test, probe).
- A run with no part, a run placed in another part, and links said with another part read as before: verified (new test, probe).
- A run said right before one part's own text writes every look, its color included, when it starts with a weight word, a numeric weight or a color, or is a size and then a color: true for runs with bold or semibold before the size; false for numeric-weight, "medium" and size-then-color runs, which already wrote their color on
- Claims, description:
- On
mainthe top-bar ask writes only the fill and refuses the links, and the tabs ask answers "but not": verified (probe onmain). - The three causes (a hex inside a run is no text color, a size said with links is no size, links in the bar are every link): verified (probe on
main). - A run is read whole when it starts with a weight word, a numeric weight or a color, or is a size and then a color: false for numeric-weight and size-then-color runs (finding 1).
- A run that starts with a size and then a weight, or with italic, uppercase or a typed weight, keeps
main's answer: false for italic or uppercase followed by a weight word (finding 2); verified otherwise. - A noun after the run makes no run: verified (new test).
- A run said for a state keeps
main's answer: verified (probe). - A run said for a list keeps
main's answer unless every listed part takes its color: verified; the guard also holds back a run beside another part said with fewer of its looks (non-blocking). - A run counts only for one part's own text, never the page, every link or a part it is placed in, and the same words said for two parts are two runs: verified (new test, probe).
- The run's color and a links size become asks of their own, and any other typed color is still reported: verified (new test).
- Only links said with the bar go on its nav items, including split asks, hex-led links, mode or state links and "them", and a colon list reads as on
main: verified (new test, probe). - A text or bar look said after the links stays on the bar, and links placed elsewhere or in the header read as on
main: verified (new test). - The readers move to a new private module and the weight reader moves unchanged: verified (only a type cast is added).
- "… and make its text bold" after the bar's links still bolds every link: verified (probe, same as
main). - A state said after a run still answers "but not" for the reader's copy: verified (probe).
- The listed test evidence: verified (23 of 23 pass; the selected tab keeps its weight and size, by probe).
- The long-ask binding test passes unchanged: verified.
- The 1014-ask replay: not checkable, as its ask list is not in the pull request.
- 63 files and 1,343 tests pass: verified (same count on this head).
- ESLint and Prettier are clean and the strict typecheck finds no error in the changed files: verified.
- A test fails before the fix and passes after it: verified (
mainanswers the tested asks differently). - Public text has no internal context: verified.
- On
- Files:
.changeset/how-text-look-runs.md: findings 1 and 2.packages/cli/api/theme-edit/_how-question.mjs: clear.packages/cli/api/theme-edit/_text-looks.mjs: clear; non-blocking note on the list guard's reach.packages/cli/api/theme-edit/theme-how-text-look-runs.test.mjs: clear.
| for (const x of clauses) { | ||
| if (!x.text || !sameState(x)) continue; | ||
| const ws = looks(String(x.text)); | ||
| if (!ws.every(w => own.has(w))) continue; | ||
| const into = /#[0-9a-f]{3,8}\b/i.test(x.text) ? withColor : withLooks; | ||
| for (const p of x.parts) into.add(p.on); | ||
| } | ||
| if ([...withLooks].some(on => !withColor.has(on))) continue; |
There was a problem hiding this comment.
Non-blocking: this compares the run's words with every clause in the question, not only the clauses the reader split from the run's own list. So "cards with bold text and tabs with bold 13px #3b5998 text" adds card to withLooks, and the tabs keep main's "but not" answer. Comparing only the clauses that share this run's list would color the tabs.
|
/approve-spec 1e873a1 |
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet. The rewritten release note now matches what how answers, and the author's /approve-spec for this head settles both readings.
The new test, the theme-how and theme-neutral suites, ESLint, Prettier and the CLI structure check pass on this head.
Claims and files checked
Review mode: incremental; reason: none
- changed rules (0): none
- Claims, release note:
- A run said right before one part's own text writes its color when it has a weight word such as bold or semibold before its size ("tabs: bold 13px …", "bold uppercase", "italic bold"): verified (new test, probe on both trees).
- A run with no weight word, or with its size before its weight, reads as before: verified (probe: size-led, numeric-weight, medium, italic- and uppercase-only runs answer as on
main). - Links said with the top bar or top nav take weight, size and case on its nav items instead of being refused: verified (new test, probe).
- The bar keeps their color as its link color, and with a sidebar named first the color goes on the nav items: verified (new test, probe).
- A run with no part, a run placed in another part, and links said with another part read as before: verified (probe).
- Claims, description:
- On
mainthe top-bar ask writes only the fill and refuses the links, and the tabs ask answers "but not": verified (probe onmain). - The three causes (a hex inside a run is no text color, a size said with links is no size, links in the bar are every link): verified (probe on
main). - A run's color is written when it has a weight word before its size; no weight word or size before weight reads as on
main: verified (probe). - A noun after the run makes no run, and a run said for a state keeps the earlier answer: verified (new test, probe).
- A run said for a list keeps the earlier answer unless every listed part takes its color: verified (probe).
- A run counts only for one part's own text, never the page, every link or a part it is placed in, and the same words for two parts are two runs: verified (new test, probe).
- The run's color and a links size become asks of their own, and any other typed color is still reported: verified (new test).
- Only links said with the bar go on its nav items, including split asks, hex-led links, mode or state links and "them"; a colon list, links placed elsewhere and "the links in the header" read as on
main: verified (new test, probe). - A text or bar look said after the links stays on the bar: verified (new test, probe).
- The readers move to a new private module and the weight reader moves unchanged: verified (only a type cast is added).
- "… and make its text bold" after the bar's links still bolds every link, and a state said after a run still answers "but not" for the reader's copy: verified (probe).
- The listed test evidence and the unchanged long-ask binding test: verified (23 and 70 tests pass).
- The 1014-ask replay: not checkable, as its ask list is not in the pull request.
- 63 files and 1,343 tests pass: verified.
- ESLint and Prettier are clean and the strict typecheck finds no error in the changed files: verified.
- A test fails before the fix and passes after it: verified (
mainanswers the tested asks differently). - Public text has no internal context: verified.
- On
- Files:
.changeset/how-text-look-runs.md: clear.packages/cli/api/theme-edit/_how-question.mjs: clear.packages/cli/api/theme-edit/_text-looks.mjs: clear; non-blocking notes on the list guard's reach and on "its text bold".packages/cli/api/theme-edit/theme-how-text-look-runs.test.mjs: clear.
- #13211 experimental theme editor how: the stripes' names match in their own forms and with the table named - #13176 fix(cli): experimental theme editor - "the page: …" is the page - #13208 fix(cli): experimental theme editor - a gentle dark mode is no page color - #12730 experimental theme set: a theme made one-mode says where the page color shows, once - #13222 fix(cli): experimental theme editor - "bold system type" names no part - #13223 fix(cli): experimental theme editor - a name in capitals that no part has is no subject - #12701 fix(cli): how writes the color of a bold run said for a part's text, and the top bar's links take their looks on its nav items
|
Landed on main in #13226. |
Bug
Found while recreating a classic social-network look with the theme editor.
astryx experimental theme editor howlost parts of a text look when several were said together:how "top bar background #3b5998 with white bold 11px links"wrote only the bar's fill. It answered that the editor cannot keep the links apart in the bar, and dropped "bold" and "11px".how "tabs: background #d8dfea, bold 13px #3b5998 text; selected tab white with #333 text"answeredread "bold text #3b5998" but not "#3b5998", so nothing is writtenfor the tabs' text color.Cause
Fix
main. A noun after the run ("a 2px black text stroke", "a text glow") makes no run. A run said for a state ("selected tabs with …") keepsmain's answer. A run said for a list of parts keepsmain's answer unless every part in the list takes its color ("cards, tabs and buttons with bold 13px #3b5998 text" reads as onmain).main). In such a clause, when every ask the clause makes is a look of that text, the run's color, and a size said for the links, are asks of their own. The drafts for the run's other looks leave its color to that ask, so they no longer report that color as unread; any other typed color in the clause is still reported.main); links said with the top bar or the top nav ("top bar #3b5998 with white links", "top bar with bold uppercase links") take their weight, size, case and style on the bar's nav items (top-nav-item). Where the question reader places the links in the bar, their color stays the bar's link color as it writes it (--color-text-accent … --on app-shell-header), and a size said alone for them ("top bar #3b5998 with 11px white links", "… with 11px #ffffff links") goes on the nav items. Links in a colon list ("top bar: #3b5998, white bold 11px links") read as onmain. Where it does not ("a light gray sidebar and a top bar #3b5998 with white links"), the color goes on the nav items instead of every link. This also holds for every ask split from one links clause, for links led by a hex, for more links said after them with "and" for a mode or a state, and for a look said for them again by "them" ("… and underline them on hover"). A look said after the links for text, or one the bar draws (a fill, border, shadow or corners), stays on the bar ("top bar with white links and a shadow", "a navy top bar with white links and bold text"). Links placed elsewhere ("the links on cards") and "the links in the header" read as onmain._text-looks.mjs, with the text-look list the question reader shares.weightInmoves there unchanged, so_how-question.mjsgets shorter.Not changed here, as on
main: "… and make its text bold" after the bar's links bolds every link; a state said after a run ("tabs with bold 13px #3b5998 text and hovered tabs with bold 14px #3b5998 text") still answers "but not" for the copy of the run the question reader gives it. A follow-up handles that copy.Evidence
theme-how-text-look-runs.test.mjs, on the neutral base:font-weight 700andfont-size 11pxontop-nav-item, and--color-text-accent '#ffffff' --on app-shell-header, with nothing onlinkor the unscoped link token;color '#3b5998',font-weight 700andfont-size 13px, with no "but not" answer;top-nav-item;font-size 11px --on top-nav-item;top-nav-itemon hover;main's "but not" answer; stroke, glow, halo, shadow and underline lengths write no size.theme-how-long-ask-binding.test.mjspasses unchanged, including "white links on a dark bar are written for both modes".Replay: I ran every
howask the existing theme-edit tests make, together with the asks from the reviews (1014 in all, with a sweep of states, parts, weights, sizes, styles and colors), onmainand on this head. 811 answers are the same. The 203 that differ are this pull request's own asks: runs said for a tab's, a card's, a button's or the headings' own text, and the top bar's link looks moved onto its nav items.Scope
Components: cli (experimental theme editor how)
Testing
CI=1 vitest run --project node packages/cli/api/theme-edit/theme-how packages/cli/api/theme-edit/theme-neutral: 63 files, 1343 tests pass.preflight: pass 1e873a1
replay: worse 0 at 1e873a1