Skip to content

fix: rc.0 migration findings (nearest-theme rules, codemod, ProgressBar size) - #547

Merged
lorant-one merged 3 commits into
feat/3-0-breaking-cleanupfrom
feat/3-0-breaking-cleanup-giduz4
Nov 18, 2026
Merged

lorant-one merged 3 commits into
feat/3-0-breaking-cleanupfrom
feat/3-0-breaking-cleanup-giduz4

Conversation

@lorant-one

@lorant-one lorant-one commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Before: on rc.0, a dark StyleScope on a light page (Sigilio's embedded form with theme=dark in a light browser) drew the unselected Tag toggles as white pills with near-white text. The codemod had four bugs:

  • It turned addToast({ message, variant }) into vtone: variant.
  • It made dataStyle.height a "24rem" string, which broke arithmetic on it ("24rem4").
  • It reported a Select's 1.x height="s" as a leaf prop.
  • Run on a repository root, it rewrote sub-packages that are not on Once UI core (Tavilio's native/) or that pin core 2.x (Chirio's capture/).

ProgressBar had no thin track.

After: Tag, Timeline, Input and RichTextEditor follow the element's nearest theme. The codemod writes tone: variant and parseFloat(dataStyle.height), drops the inert Select height with a note, and skips and lists nested packages that are not on the app's core. <ProgressBar size="s"> draws a 4px track.

How:

  • Nearest theme. A new foundations mixin, nearest-theme.scss in-theme($theme, $pseudo), is synced into core like glow.scss. It matches when the element is at or under $theme and not under the other theme below it, three levels deep, as fix: dark StyleScope solids on a light page; dropdowns open from the field #543's brand solids do. :is() keeps the old one-attribute specificity. Applied to every light-only or dark-only rule in core: Tag (hairline, unselected toggle, tone dot, dark glass edge), Timeline's dot, Input's light field and RichTextEditor's frame. Checked in Chromium with the compiled CSS: the unselected toggle is white on a light page and transparent under a dark scope on a light page; the other nestings are in the table below.
  • Codemod.
    • objectEntries gives a shorthand key its own span. It used to count back from the next comma or brace, after any whitespace.
    • A new transformDataStyleReads pass wraps arithmetic reads of the config's dataStyle.height in parseFloat, across files too. It reports a template that would add a second unit.
    • Select joins the fields whose height went to the native input in 2.x and did nothing, so it is dropped. The note suggests size="s" for a smaller field.
    • Below the directory it runs on, a package whose package.json does not depend on @once-ui-system/core, or pins a different major of it than the package the codemod runs in, is skipped and listed. --all-packages walks them too. It compares majors rather than requiring 3.x, since the codemod runs on 2.x trees before the bump.
  • ProgressBar. size?: "s" | "m", 4px or 8px. The default stays 8px.
  • MIGRATING. The cascade-layer section has a bullet on app rules that set type or spacing on elements with a core class (the Chirio hero's letter-spacing). The codemod section mentions the package skip.
Unselected Tag toggle Before After
light page white white
light page > dark scope white (the bug) transparent
dark page > light scope white white
light > dark > light white white

Checks: after merging the 3.0 head (with #539), the full core suite passes (4777), the codemod tests pass (481), and the lint gate is at 113, below its baseline of 115.

🤖 Generated with Claude Code

https://claude.ai/code/session_01YJHdG7ZbpQS64MtL5PVbT1

…ar size)

- Tag, Timeline, Input and RichTextEditor's light-only rules matched any
  light ancestor, so a dark StyleScope on a light page drew white
  unselected Tag toggles with near-white text. A foundations mixin,
  in-theme(), matches the element's nearest theme instead.
- Codemod: a shorthand key before whitespace lost its first letter
  (`{ message, variant }` became `vtone`); arithmetic on the config's
  dataStyle.height, now a rem string, reads it with parseFloat; a
  Select's inert 1.x height is dropped like an Input's.
- ProgressBar size: "s" draws a 4px track.
- MIGRATING: app CSS now beats core's type and spacing classes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01YJHdG7ZbpQS64MtL5PVbT1
Run on a repository root, the 3.0 codemod rewrote sub-packages that do
not use Once UI core or pin another major of it. A nested package.json
without @once-ui-system/core, or with a different major than the package
the codemod runs in, is now skipped and listed; --all-packages walks it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01YJHdG7ZbpQS64MtL5PVbT1

Copy link
Copy Markdown
Member Author

Visual check: the 3 changed shots (blocks_hero@1280__tile06–08) are all Hero6's 3D media. In the base capture the image hadn't loaded yet, and in the head capture it had. The Tag, buttons and text in those tiles are the same. That's capture timing rather than this PR (no change here touches Media or that hero), so I'm re-running the visual workflow once.


Generated by Claude Code

@lorant-one
lorant-one merged commit ac8f6f0 into feat/3-0-breaking-cleanup Nov 18, 2026
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants