Skip to content

test(parallax): pin #2052 sticky-layer-in-component regression#2530

Merged
joshuaellis merged 1 commit into
nextfrom
test/2052
Jun 9, 2026
Merged

test(parallax): pin #2052 sticky-layer-in-component regression#2530
joshuaellis merged 1 commit into
nextfrom
test/2052

Conversation

@joshuaellis

Copy link
Copy Markdown
Member

Summary

Pin the bug behind #2052 with a regression test so the contract is captured in the repo. A sticky ParallaxLayer wrapped in a component renders inside the scrolling content instead of as a sibling of it, so it scrolls away and vanishes between its start and end offsets — matching the long-running user reports on the issue.

Parallax decides DOM placement by reading child.props.sticky while walking children with React.Children.map. That walk traverses the static element tree and never renders components, so a wrapped layer's sticky prop is invisible to it. Fragments work because their children are static; a component's output is not.

The test is it.skip'd on purpose: it documents the correct placement contract and serves as the unskip target once a real fix lands. The fix is intentionally out of scope here — it requires moving the placement decision into the layer itself (e.g. createPortal into a sticky container), which is a rearchitecture with its own breakage surface (DOM structure, layer registration lifecycle, ref.current.content, SSR).

Notes

Add a skipped e2e test reproducing #2052: a sticky ParallaxLayer wrapped
in a component lands inside the scrolling content instead of as a sibling
of it, so it scrolls away between its start and end offsets.

Parallax splits DOM placement by reading child.props.sticky while walking
children with React.Children.map, which traverses the static element tree
and never renders components — so a wrapped layer's sticky prop is invisible.
The test documents the contract and is skipped until a real fix (moving the
placement decision into the layer, e.g. createPortal) lands.
@changeset-bot

changeset-bot Bot commented Jun 9, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: b0b4b26

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@joshuaellis joshuaellis merged commit 5c5972b into next Jun 9, 2026
21 checks passed
@joshuaellis joshuaellis deleted the test/2052 branch June 9, 2026 08:01
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