Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ensure slotchange events are handled correctly in hydration #2850

Merged
merged 1 commit into from
Jun 27, 2024

Conversation

kyubisation
Copy link
Contributor

This PR slightly changes how we handled slotchange events during hydration. Previously we would stop slotchange events during hydration and re-dispatch them afterwards. However, it seems that during true page load with server side rendering, slotchange events are not dispatched at all. So we changed the logic to just generally suppress slotchange events during hydration and manually dispatch a slotchange event, for any slot having content assigned, after the hydration is finished.

@github-actions github-actions bot added the pr: peer review required A peer review is required for this pull request label Jun 27, 2024
Copy link
Contributor

@jeripeierSBB jeripeierSBB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Is there no way we could test this? It feels like a lot of changes but no tests for it

@github-actions github-actions bot added the pr: lead review approved Pull request has been approved by a lead review label Jun 27, 2024
@kyubisation kyubisation merged commit 06112a4 into main Jun 27, 2024
24 of 26 checks passed
@kyubisation kyubisation deleted the fix-hydration-slotchange branch June 27, 2024 12:53
@github-actions github-actions bot added pr: peer review required A peer review is required for this pull request and removed pr: peer review required A peer review is required for this pull request labels Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
diff-available pr: lead review approved Pull request has been approved by a lead review pr: peer review required A peer review is required for this pull request pr: visual review required preview-available
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants