Skip to content

set: a part that holds other parts has no main text for a size - #13285

Merged
josephfarina merged 1 commit into
feature/theme-editorfrom
josephfarina/r15-fu-text-size-main-piece-holders
Nov 21, 2026
Merged

josephfarina merged 1 commit into
feature/theme-editorfrom
josephfarina/r15-fu-text-size-main-piece-holders

Conversation

@josephfarina

@josephfarina josephfarina commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

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-size on 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 mainTextSizeToken name 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

  • Reproduction before the change: font-size 20px --on popover writes --text-label-size: 20px on the popover.
  • Result after the change: refused, as before set: a text size for a part with several text pieces goes to its largest #13234.
  • Representative unchanged path: font-size 20px --on top-nav-heading still writes --text-large-size: 20px.
  • Regression test or other mutation-sensitive proof: theme-edit-text-size-main-piece.test.mjs refuses popover and calendar.

Scope

Components: cli/api/theme-edit (set)

  • One defect is restored.
  • Separable contradictory or unsettled tagalongs were removed or split.
  • No new public API, visual representation, default, or interaction model is hidden under the bug-fix label.
  • Public text and artifacts contain no internal Meta context.

Testing

vitest run packages/cli/api/theme-edit (the whole theme-edit directory) passes.

preflight: pass 5f16142

replay: worse 0 at 5f16142

@vercel

vercel Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 21, 2026 11:12am UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 21, 2026
@astracat-bot

astracat-bot Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 21, 2026, 11:27 AM UTC

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Automated review (maintainer link)

Comment on lines +116 to +120
for (const on of ['popover', 'calendar'])
await expect(
themeEditSet('x', 'font-size', '20px', {cwd, on}),
on,
).rejects.toThrow();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@josephfarina

Copy link
Copy Markdown
Contributor Author

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.

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 5f16142

@josephfarina
josephfarina merged commit 9fa131e into feature/theme-editor Nov 21, 2026
9 checks passed
josephfarina added a commit that referenced this pull request Nov 21, 2026
Reviewed pull request #13285, merged into the theme working branch. It reaches main with the branch's next landing.
josephfarina added a commit that referenced this pull request Nov 21, 2026
- #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
@josephfarina

Copy link
Copy Markdown
Contributor Author

Landed on main in #13315.

@github-actions
github-actions Bot deleted the josephfarina/r15-fu-text-size-main-piece-holders branch November 22, 2026 06:04

This branch was successfully deployed

1 active deployment
Preview — 5f16142c Deployed Nov 21, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant