Repository navigation
fix(vue): prevent void-element hydration mismatches in UI 0.0.2 - #168
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
elonehoo
marked this pull request as ready for review
November 5, 2026 07:04
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.
Summary
asChild, dynamic component selection, custom components, SVG and non-void children; add 27 focused regressions.Validation
Release
^0.0.1does not include0.0.2; consumers must explicitly update. See release notes.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Note
Medium Risk
The fix touches the shared Vue factory used by many primitives; incorrect void detection could drop slot content, though tests and boundaries limit scope to native void tags.
Overview
UI 0.0.2 fixes Vue SSR hydration mismatches by stopping the polymorphic
uifactory from forwarding default slot children to native HTML void elements (input,hr, etc.). Empty forwarded slots previously became client-side fragments that SSR omitted, triggering children-mismatch warnings and invalid DOM under many components (hidden inputs, separators, and similar).The change is scoped to string native void tags;
asChild, dynamic tags, custom components named likeinput, and non-void elements keep existing slot behavior. A large new factory test suite covers hydration, all void tags, and reactive edge cases.All four public packages and the monorepo are bumped to 0.0.2 (React/Solid/Svelte are version-only); core stays ^0.0.3. Release and upgrade docs stress that
^0.0.1does not pick up 0.0.2 and link newdocs/releases/0.0.2.md, plus Vue README guidance on SSR/hydration.Reviewed by Cursor Bugbot for commit 7d0c8f0. Bugbot is set up for automated code reviews on this repo. Configure here.