Repository navigation
set: a part that holds other parts has no main text for a size - #13285
josephfarina merged 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
There was a problem hiding this comment.
Approved: set <theme> font-size <size> --on popover and --on calendar are refused again with the message main gives, and the parts that keep a single main text (top nav heading, side nav heading, mega menu item) are unchanged. The new test rows fail before the change and pass after it. Repository CI does not run on pull requests into this working branch; the landing pull request into main runs it.
Optional: the new rows accept any rejection, so pinning them to /never reaches it/, as the nav-icon row above them does, keeps them from passing on an unrelated error.
Claims and files checked
Review mode: full; reason: no-earlier-review
Claims:
- Before the change, a text size on the popover wrote the label size token on it: verified (the new test fails on the base with that write).
- The calendar took the same write: verified (the base helper returns the label size token for it).
- The editor refused these parts before the main-text rule: verified (the several-token refusal on
main). - The main-text rule read a container's inner tokens as its own text: verified (the base helper checked only the part's own size).
- The fix makes the helper name no main text for a part that holds parts: verified (
_settings.mjs:15420-15423). - After the change the size is refused, as before: verified (same error code and message as
main). - The top nav heading still takes its large text token: verified (its existing test passes; only popover and calendar change across all parts).
- The regression test refuses popover and calendar: verified (fails on the base, passes on the head).
- One guard is the whole restoration: verified (the only code change).
- The whole theme-edit test directory passes: verified for every file the change reaches (the 36 theme-edit test files that set a text size or name popover or calendar pass); the rest of the directory was not rerun to completion.
- Release note: a part that holds other parts is refused, so the buttons and fields inside keep their own sizes: verified (nothing is written).
- Release note: only a part whose own inner elements draw its text takes its main text's token: verified (the three parts that still take one hold no parts).
- Scope checklist (one defect, no tagalongs, no new public API, no internal context): verified.
Files:
.changeset/experimental-theme-text-size-main-piece-holders.md: clear.packages/cli/api/theme-edit/_settings.mjs: clear.packages/cli/api/theme-edit/theme-edit-text-size-main-piece.test.mjs: one optional note (the rows accept any rejection).
| for (const on of ['popover', 'calendar']) | ||
| await expect( | ||
| themeEditSet('x', 'font-size', '20px', {cwd, on}), | ||
| on, | ||
| ).rejects.toThrow(); |
There was a problem hiding this comment.
Optional: these rows pass on any rejection. Both parts now get the never reaches it refusal, so .rejects.toThrow(/never reaches it/), as the nav-icon row above does, keeps them from passing on an unrelated error such as a renamed part.
|
Covers the theme-editor reading this pull request fixes (the owner's ruling for #13234): font-size on a part names no main text when the part holds other parts, so such a part is refused as before. |
|
/approve-spec 5f16142 |
Reviewed pull request #13285, merged into the theme working branch. It reaches main with the branch's next landing.
- #13190 perf(cli): the first how ask compiles only the lexicon patterns it can match - #13167 how: no rounding anywhere squares the pill radius too - #13234 set: a text size for a part with several text pieces goes to its largest - #13248 docs(changeset): #13190's release note states no pattern count - #13039 fix(cli): experimental theme editor - controls share one height at each size - #13040 feat(cli): experimental theme editor - a badges setting styles the status and category badges in the theme's colors - #13285 set: a part that holds other parts has no main text for a size - #13260 how: no rounding anywhere reads its scope word on the corner ask alone - #12723 experimental theme how: a mood said beside an ask is named as not used, never dropped
|
Landed on main in #13315. |
Follows #13234 (a text size for a part with several text pieces goes to its largest), fixing the case its landing review flagged.
User impact
set <theme> font-size <size> --on popover(and--on calendar) wrote--text-label-sizeon the container, so every button and field label inside took that size, where the editor refused before #13234.Problem and solution fit
#13234's main-text rule read a container's inner size tokens as if they were its own text pieces. A part that holds other parts has no one main text: its sizes belong to the parts inside. The fix makes
mainTextSizeTokenname none for a part that holds parts, so the size is refused as before.Expected behavior and authority
#13234's changeset: where no one main text can be told, the size is refused as before.
Smallest restoration
One guard at the top of
mainTextSizeToken.Evidence
font-size 20px --on popoverwrites--text-label-size: 20pxon the popover.font-size 20px --on top-nav-headingstill writes--text-large-size: 20px.popoverandcalendar.Scope
Components: cli/api/theme-edit (set)
Testing
vitest run packages/cli/api/theme-edit(the whole theme-edit directory) passes.preflight: pass 5f16142
replay: worse 0 at 5f16142