fix(resize-observer): preserve hydration ids for accessor targets - #1065
everton-dgn wants to merge 1 commit into
Conversation
✅ Deploy Preview for solid-primitives-v2 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
🦋 Changeset detectedLatest commit: 52673b2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
createElementSize(accessor)returned early during SSR while allocating a target effect on the client. In Solid 2, that effect consumes a hydration child identifier, so subsequent elements received different keys and hydration left server-rendered nodes unclaimed.Reserve the same effect identifier on the server without evaluating the target or accessing browser APIs. Preserve nullable dimensions and the browser observer lifecycle.
Add real SSR-to-client hydration coverage for accessor and direct-element targets, including server node identity and observer disposal, plus target replacement/removal and SSR safety tests. The shared hydration harness now exposes original nodes and disposes the hydrated root on cleanup.
Fixes #1060.
Validation:
Hydration uses real Solid SSR/hydrate with jsdom rather than a graphical browser. Existing shared-harness formatting and console-lint failures, and missing Babel declarations in a standalone strict harness typecheck, remain outside this patch. The package gates pass.