Skip to content

Migrate to Solid 2 and Kobalte alpha.5 - #141

Merged
riccardoperra merged 47 commits into
mainfrom
feat/upgrade-solid2-kobalte
Nov 28, 2026
Merged

riccardoperra merged 47 commits into
mainfrom
feat/upgrade-solid2-kobalte

Conversation

@riccardoperra

@riccardoperra riccardoperra commented Nov 20, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Upgrade the kit, example apps, docs demos, and Storybook to Solid 2.0.3 and Kobalte 2.0.0-alpha.5. Update the Vite compiler, package exports, and migration guide.
  • Preserve server-rendered overlay nodes during hydration. Cover nested Escape handling, focus return, and outside-pointer dismissal. Restore slider keyboard and drag input and keep closed accordion panels unmounted.
  • Keep the ProseMirror Inspector's Solid 1 runtime isolated in its example. The docs shell still uses React and Fumadocs to host the Solid 2 demos.
  • Let Escape close a dialog from a focused tab. Preserve Accordion panel labels when the trigger ID is explicitly undefined.
  • Keep nested Select and Popover content accessible in modal dialogs. Close one layer per Escape press across server-rendered and client-opened overlays.

Verification

  • pnpm build, pnpm typecheck, and pnpm test passed. The run covered 638 kit browser tests, 33 SSR tests, 41 hydration tests, and 196 Storybook tests.
  • The API snapshot, docs lint, and docs export coverage checks passed.
  • Fresh installs of the packed packages passed the SSR, hydration, and CSS-only checks. In Chromium, Firefox, and WebKit, Escape closed each hydrated layer in order and returned focus to the nested trigger. The packed check now runs on relevant pull requests. The production examples and the docs Switch demo passed smoke checks.

Kobalte alpha.5 still emits development diagnostics. Storybook's standalone tsc reports story annotation and unused-type errors.

Solid 2 migration guide · Kobalte alpha.5 release

@changeset-bot

changeset-bot Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: d60985d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@codeui/kit Minor
@codeui/styles Minor
@codeui/storybook-playground Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Docs preview deployed to Cloudflare Pages.

Built from d60985d.

@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

CodeUI package preview

Built from d60985d.

npm install https://pkg.pr.new/riccardoperra/codeui/@codeui/kit@d60985d30b0b1fe4ad0535cf58ff68d1d4336661

The kit installs matching previews of @codeui/styles and @codeui/inkstone.

…separator

fix(dropdown-menu): reset separator borders and tighten spacing
riccardoperra and others added 6 commits November 24, 2026 23:10
HoverCard reuses the Popover surface and the kit Pop motion. The
resizable handle is an 8px hit area with a 1px line that changes colour
on hover, drag and keyboard focus, in both orientations. data-active and
data-dragging join the adapter attributes because Kobalte sets them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Kobalte sizes panels as percentages of the root, so a handle that takes
8px of the row pushes the last panel 8px past the root. The hit area now
overlaps both panels with negative margins and the line sits on the
boundary.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codeui/kit/hover-card exports HoverCard, HoverCardTrigger and
HoverCardContent. Kobalte alpha.5's HoverCard root creates its pointer
listener inside an effect callback, which Solid 2 rejects when the card
opens, so the card is built on Kobalte's Popover with the hover-card
timers and safe area. It opens after 500ms on hover or focus, closes
150ms after the pointer leaves, closes on Escape, and does not animate
when opened from the keyboard.

@codeui/kit/resizable exports Resizable, ResizablePanel and
ResizableHandle over Kobalte's resizable. The kit works around three
alpha.5 gaps: the root renders its children twice, a pixel initialSize
divides by a root size that still reads 0, and a panel without
initialSize takes 0.5 instead of the space left over.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
hovercard-open proves focus and hover open, Escape and leaving close,
and the Popover surface. resizable-keyboard proves the arrow keys move
the handle and Home and End stop at minSize and maxSize. Both pass in
dark and light.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Inkstone does not animate anything the keyboard causes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
riccardoperra and others added 3 commits November 28, 2026 09:34
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
userEvent.hover moves the shared browser pointer. On CI, test files run
side by side in frames of one page, and the parked pointer reopened the
tooltip in tooltip-keyboard after Escape.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
feat(kit): calmer tooltip defaults and TooltipProvider
riccardoperra and others added 4 commits November 28, 2026 13:06
Hover cards on a page share one surface. Moving the pointer to another
trigger while a card is open, or within 400ms of it closing, slides the
card to the new trigger and resizes it to the new content in 200ms
instead of closing one card and popping another. Keyboard moves swap in
place; reduced motion keeps only the content fade.

HoverCardGroup gives a set of triggers their own surface, and
shared={false} gives one card its own. The input tracker also records
pointerover, so an overlay opened from pointerenter sees that pointer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… beside them

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A hover card inside another card's content gets a surface of its own.
The outer card stays open while the pointer is on the inner card and
until it closes; a press on the inner card no longer dismisses it, and
Escape closes the inner card first.

An `a` trigger gets a dotted underline in the hint tone that takes the
text colour on hover and while open, so hover-card links read as such
in running text. Button and row triggers keep their own look.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
feat(kit): share one hover card and move it between triggers
riccardoperra and others added 2 commits November 28, 2026 13:48
Since the shared card, HoverCardContent put attributes and event
handlers on a display: contents wrapper around the children. A
pointerleave handler fired as soon as the pointer moved from the
content onto the card's padding, and a mousedown handler missed the
padding.

The active card's attributes and handlers now go on the card itself,
applied when it takes the card and removed when another card does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fix(kit): put HoverCardContent attributes and handlers on the card
riccardoperra and others added 6 commits November 28, 2026 16:43
Port of #152 (05d9889) to the Solid 2 / Kobalte 2 branch.

When `content` is `undefined`, `null`, `false` or `""`, Tooltip now passes
`disabled` to the Kobalte root and skips the portal. Hover and focus leave
it closed, and Kobalte only sets `aria-describedby` while open, so the
trigger never points at a missing bubble. The trigger, its children and
`slotClasses.trigger` render unchanged.

The conflict in Tooltip.tsx was resolved for Solid 2 (`omit` instead of
`splitProps`, reading `props.*`). The verify-codeui journey waits 1 s after
hover and focus, since this branch's default `openDelay` is 700 ms.

Adds an "Empty content" story, a verify-codeui journey and unit tests.

(cherry picked from commit 05d9889)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…solid2

fix(tooltip): don't open an empty bubble when content is missing (Solid 2)
With open={false}, the first hover marked the card open internally, so the
next hover, focus or click showed the shared surface with nothing in it.
show() now reads the wanted state, and a card without HoverCardContent
does not open.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…losed

fix(hover-card): don't open an empty card (Solid 2)
@riccardoperra
riccardoperra merged commit 0474773 into main Nov 28, 2026
6 checks passed
@riccardoperra
riccardoperra deleted the feat/upgrade-solid2-kobalte branch November 28, 2026 23:28

This branch was successfully deployed

1 active deployment
docs-preview — d60985d3 Deployed Nov 28, 2026 by riccardoperra via Deploy to Cloudflare Pages #174
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.

1 participant