Repository navigation
Conversation
… select, tooltip and hover-card onto ui-sdk Replace the Radix primitives behind seven atoms with ui-sdk parts. The public exports, props, refs and displayName values are unchanged. Radix-only props (asChild, onEscapeKeyDown, onPointerDownOutside, onInteractOutside, onOpenAutoFocus, onCloseAutoFocus, delayDuration, forceMount, loop, dir) are still accepted and mapped to the closest ui-sdk behavior, and the Radix data-state, data-highlighted, data-side, data-align and data-orientation attributes and --radix-* CSS variables are still emitted. Popups no longer inherit the browser [popover] defaults (background, padding), collision padding defaults to 0 like Radix, and menu content does not wrap with the arrow keys unless loop is set.
Dialog, Sheet, AlertDialog, CompletionDialog, Command and Drawer now build on @ui-sdk/react instead of Radix, cmdk and vaul. Public exports and props stay the same; Radix data-state attributes, asChild, onEscapeKeyDown, onPointerDownOutside, onInteractOutside, onOpenAutoFocus and onCloseAutoFocus are kept through compat wrappers. The command empty state collapses its padding while items match.
…bar onto ui-sdk Accordion, Tabs, Rating, ListBox, Meter and ProgressBar render ui-sdk parts and keep their exports, props, ARIA roles, Radix-style data attributes and class strings. Separator, Toolbar and TreeView stay as they are.
Move what dropdown-menu, context-menu and menubar repeated into lib/ui-sdk-menu (createMenuParts, each menu passes its class strings), and the Radix dismissal callbacks (onEscapeKeyDown, onPointerDownOutside, onInteractOutside, onFocusOutside to details.cancel()) into lib/ui-sdk-dismiss, which select and navigation-menu reuse and the dialog family can adopt. Public exports, props and DOM stay as they were. Fix two Radix regressions on the way: an indeterminate CheckboxItem exposes aria-checked="mixed", and the dropdown menu and menubar content is aria-labelledby its trigger. The context menu stays unlabelled, as in Radix.
ui-sdk's password input disables its toggle with a disabled field and hides the value on form submit and page hide; the current component does neither.
Port cmdk 1.1.1 commandScore to src/lib/command-score.ts (MIT notice in the file, full text in command-score.LICENSE) and make it the default match of Command. ui-sdk accepts a custom score but never reorders composed items, so CommandList moves the items inside their parent by score, as cmdk does. Groups keep their place, ties keep the authored order and a cleared search restores it. Export commandScore and createCommandRanker.
Dialog, Sheet, Drawer and AlertDialog drop their local copies of the dismissal code for useDismissRoot, useRegisterDismissHandlers and DismissContext from lib/ui-sdk-dismiss, and use AsChildProps and NarrowPartProps in place of the local part prop type. Handlers now receive the DOM event itself, and onFocusOutside is accepted on Dialog, Sheet and Drawer content.
The foundation test setup now supplies the Web Animations stand-in, so the local stub in drawer.test.tsx goes.
ui-sdk's Dialog always renders in the browser top layer, so the dialog covered the whole viewport instead of its positioned container. Render in place again, without ui-sdk's Dialog or Radix, from the kit's own hooks: useFocusContainment, useEscapeKey and useBodyScrollLock, plus local inert siblings, outside-press dismissal and a relative body (Radix's scroll lock did that too, which the parity baseline shows).
ui-sdk's shared popup runtime makes popup-heavy entries heavier than Radix: Dialog 67.7 KB to 111.6 KB, DataTable 186.6 KB to 230.3 KB, TutorialMDX 198.4 KB to 251.5 KB, every export 2,135 KB to 2,317 KB (minified). Button drops to 23.1 KB without the Radix Slot, so its budget tightens. TutorialMDX leaves the per-module cap: the split build counts whole shared chunks, and its named check budgets the real up-front size.
|
The preview deployment for registry is ready. 🟢 Open Preview | Open Build Logs | Open Application Logs Last updated at: 2026-11-25 21:35:32 CET |
|
The preview deployment for storybook is ready. 🟢 Open Preview | Open Build Logs | Open Application Logs Last updated at: 2026-11-25 21:32:59 CET |
ui-sdk closes a tooltip on the trigger's click, where Radix used pointer down. CopyButton's trigger dropped the click handler the tooltip passed in, so the tooltip stayed open after a copy. Forward it, and test the tooltip's visibility, since ui-sdk keeps a closed tooltip in the page.
ui-sdk renders CommandEmpty as a status live region, which belongs outside the list. The kit places it inside CommandList, as cmdk did, and a listbox may hold only options and groups, so axe failed the Command and ModelSelector stories. Inside the list it is presentational again, as cmdk rendered it; outside the list it still announces.
ui-sdk's close animation sets inert on the panel and clears it when the transition ends. React had already rendered inert for the closed panel and did not write it again, so the closed panel's links became reachable by Tab once the animation finished. Put inert back whenever it goes missing from a closed panel, and test it after the transition.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #719
What
@vllnt/uidrops every Radix package,cmdkandvaul. Its components are now built on Vercel's ui-sdk (@ui-sdk/react+@ui-sdk/core, pinned0.1.0-beta.7, the newest release that passes the 7-dayminimumReleaseAge). Exports, props, class strings and the Radix-facing DOM stay the same.Slotnow handlesasChildon Button, Link, Banner, Form and the other non-primitive parts.data-statewith Radix's values;--radix-*CSS variables, aliased to ui-sdk's;data-radix-scroll-area-viewport;asChild,onOpenAutoFocus/onCloseAutoFocus(withpreventDefault()),onEscapeKeyDown,onPointerDownOutside/onFocusOutside/onInteractOutside(withdetail.originalEvent),forceMount,delayDuration;*Portalexports, which now render their children in place.src/liband are exported, because registry shims may only import public names:ui-sdk.tsx:Slot,asChildProps,withDataAttributes, focus adapters;ui-sdk-dismiss.tsx: Radix dismissal callbacks on ui-sdk;ui-sdk-menu.tsx: one implementation behind DropdownMenu, ContextMenu and Menubar, which takes each file from about 600 lines to about 100;command-score.ts: cmdk 1.1.1'scommandScore, MIT notice kept, identical on 60,000 random cases.pnpm-lock.yaml: 62 packages removed, 2 added.Left as they are, with a reason
Evidence
Visual parity. Every Storybook story (890) was screenshotted in light and dark, against a baseline built from
main(46d81bb) with PlaywrightmaxDiffPixels: 0at 1024×720. Open, hover, focus and mobile states were added for the 43 component directories this PR touches: 1,780 tests in total.mainagainst its own baseline fails 107 of 172 shots in those directories.[tabindex="0"]or button. Radix gave the group roottabindex="0", so onmainthe harness hovered the group centre (item "I"), and on this branch it hovers "B".open: true). Radix portalled it outside#storybook-root, somainhad no "open" baseline.maindraws the panel text with subpixel (LCD) antialiasing, 5,410 coloured fringe pixels, and this branch draws it in greyscale. Layout, glyph positions and colours are the same.popover), and Chrome draws top-layer text in greyscale.main's exact 5,410 subpixel pixels. Pixel-aligning it does not.mainbaseline gives the same 1,653 pass / 127 fail. The failing set differs from the first run only in animated stories (a different random subset of spinners, meteors and animated text) and in 4 dark Calendar and RangeCalendar shots, where the only changed pixels are the "today" marker moving from the 24th to the 25th: the date changed between baseline and rerun. Calendar is not migrated.::afterwas missing;statuslive region, which axe rejects (Command and ModelSelector stories). InsideCommandListit is presentational again, as cmdk rendered it;inertat the end of the transition. The panel now getsinertback.Gates run locally at HEAD (exit codes):
tsconfig.build.json) 0@vllnt/ui0, registry 0size0, check:dist-imports 0, pack:check 0registry:check0,registry:integrity0, i18n 0, verify-mdx 0, verify-previews 0 (890 stories)--update-snapshots=none: 89 pass, 356 have no baseline (CI creates them with--update-snapshots), 5 animated stories drift (BorderBeam, Marquee, UnicodeSpinner, Watchlist, ProgressTracker).maingives the same 356 + 5 locally. The one functional failure, the Accordion keyboard test, is fixed: 15 of 15 runs pass, 13 of 15 fail without the fix, andmainpasses 20 of 20.mainmerge), all passed: Core and Web Quality Gates, E2E (registrynext buildand Playwright), Build Storybook, Verify Stories, Visual Regression and Storybook Tests (axe on 890 stories, light, dark, glass and solid).mainat ced4d3e to pick up fix(native): align expo to ~57.0.34 with exact owner-approved age exceptions #721 (Expo~57.0.34), which fixes the Native Package Gates failure thatmainalso had. The merge changes no TypeScript and nopackages/uifiles; the lockfile still has no@radix-ui. Locally on ced4d3e: eslint, tsc (tsconfig.build.json) and vitest (2,850 pass) are green. CI on ced4d3e: all 19 checks pass, including Native Package Gates,required, Web Quality Gates, E2E, Visual Regression and Storybook Tests; GitHub reports the PR as mergeable and CLEAN.Regression tests added for behaviour I restored after the move:
onValueChangeagain when the selected item is pressed;aria-checked="mixed";detail.originalEvent;inertafter its close transition ends.Each of these tests fails without its fix.
Owner sign-off (2026-11-25)
0.1.0-beta.7: accepted.maintoo until fix(native): align expo to ~57.0.34 with exact owner-approved age exceptions #721; it passes on ced4d3e, so an admin merge is no longer needed.The items as they were put to the owner:
Bundle size. ui-sdk's shared popup runtime is heavier than Radix. The budgets in
scripts/size-budget.jsonmove to the measured sizes, in commitchore(ui): size budgets for the ui-sdk runtime.ui-sdk's dialog always bundles its mobile-sheet presentation (about 25 KB). There is one copy of ui-sdk in the bundle.
Beta pin.
0.1.0-beta.7is a pre-1.0 beta.NavigationMenu text antialiasing. Text in an open panel renders in greyscale instead of with subpixel antialiasing, because ui-sdk shows the panel in the top layer (see Evidence). Keeping ui-sdk's NavigationMenu, as this PR does, accepts that. The alternative is a hand-built in-place viewport, which keeps pixel parity but takes this component off ui-sdk.
Known behaviour differences
These are listed in
packages/ui/MIGRATION.md.overflow: hiddenon<html>and makes the rest of the pageinert.TooltipTrigger asChildchild must passonClickon. A closed tooltip stays in the page, hidden.aria-valuenow.readOnly: radios usearia-disabled.avoidCollisions,sticky,dir,skipDelayDuration, vaul options.Follow-ups (not in this PR)
@ui-sdk/tobannedImportsinpackages/ui-nativecheck-boundaries, next to the Radix ban.direction="vertical"has no effect on react-resizable-panels v4, which usesorientation. This is an existing bug.