Skip to content

3.0: fix list from the Graphite migration (real app on 2.6) #359

Open

Description

@lorant-one

This list comes from a migration report on two real codebases that moved to Once UI 2.6 on 28 Oct: a website rebuilt from the Stack template on Next 16, and a Vite + React 19 app whose components were swapped in place. Each item was checked against feat/3-0-breaking-cleanup as of 77f9d35. Priorities follow the report: P0 ships broken or heavy by default, P1 forced a workaround.

In PRs

Still open on 3.0 (checked in source)

  • P0 The global stylesheet is heavy. App CSS went from 17 to 54 kB gzip; rules from 1,019 to 5,096; :root custom properties from 73 to 800; style recalculation got 3.6× slower and dialogs open 40–56 ms slower. Possible fixes: generate utilities from use, ship tokens for the active theme only, and load component CSS only with its component. This needs a design decision before code.
  • P1 Dialog is full screen at ≤1024 px for every dialog, alerts included, and has no size prop.
  • P1 Dialog z-index is fixed at 8/9, under typical app layers (sidebar 20, menus 90). Expose a token for it.
  • P1 A Button with no onClick/href/type renders a Flex div (ElementType fallback), so it is not focusable and has no role.
  • P1 SegmentedControl puts className/style on every segment, so the root can't be styled. Unchosen options are dimmed with inline opacity: 0.6, which fails WCAG AA contrast. Use a colour token instead.
  • P1 Switch without label: id never reaches the input, so <label for> names nothing and it announces "Toggle switch". ControlLabelContext is not exported.
  • P1 Input: className lands on the wrapper and nothing reaches the <input>. Add inputClassName or slot props, and make id optional.
  • P1 Table: every cell is white-space: nowrap, with no prop to wrap, no column widths and no colspan.
  • P1 Logo throws without ToastProvider (useToast) and always bundles ContextMenu/Option/Toast.
  • P1 RevealFx ignores reduced motion, has no in-view trigger, and renders its content hidden before hydration.
  • P1 Meta.generate has no og:site_name, og:locale, image size/alt or twitter:site. Schema emits one node, with no @graph.
  • P1 /mdx fails a webpack build without prismjs, despite the documented fallback (needs a re-check on 3.0's module split).

Stack template (separate repo)

P2, for later

Missing source maps for styles.css/tokens.css; Vite late-dependency reloads; Dialog slot props for body, footer and overlay; Setting wraps the control under its label; Toast onDismiss without a button and double announcements; leaf components are all client components; SmartLink padding in running text; MediaVideoPlayer poster/preload/tracks; MDX {#id} headings; Card href typing; Grid subgrid; @layer once-ui so app CSS wins; global resets (smooth scroll, a:not(.button), reduced-motion specificity); layout components throw without LayoutProvider; useInViewport recreates its observer on inline options.

Activity

  1. self-assigned this
    on Oct 28, 2026
  2. lorant-one commented on Nov 4, 2026

    @lorant-one
    MemberAuthor

    Status of the P0 global stylesheet item, measured on feat/3-0-breaking-cleanup (93fe0ac) with a production docs build and Chromium traces.

    Bytes

    Recalc / dialog open

    • Opening the first dialog on /components/dialog costs about 56 ms of style recalc on 3.0. The same page on 2.6 production docs costs about 61 ms, so 3.0 is no slower than 2.6.
    • The largest single recalc is the whole page turning inert (about 3,400 elements). A modal needs that for accessibility.
    • Removing every custom property cuts dialog-open recalc only from 56 to 40 ms. Dropping the palette vars, the cursor rules, the .x ::selection rules or the invert-theme :is() selectors made no difference beyond noise.
    • Going from 70 to 800 root vars adds about 0.7 ms to a theme toggle over 1,500 elements.

    I found no safe token change that would be worth the risk before beta.2. The heavier numbers in the migration report compare 2.6 with that app's own pre-Once UI CSS, not 2.x with 3.0.


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions