Skip to content

docs: note html structure breaking change #12991

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

Merged
merged 1 commit into from
Sep 19, 2024
Merged

Conversation

dummdidumm
Copy link
Member

No description provided.

Copy link

changeset-bot bot commented Aug 23, 2024

⚠️ No Changeset found

Latest commit: fc576ba

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

@Rich-Harris
Copy link
Member

I still think we ought to consider this a bug. Fixing it is tricky but surely not impossible

@dummdidumm
Copy link
Member Author

The change is still breaking in other cases, we can switch the example if you want

@dummdidumm
Copy link
Member Author

Attempted to fix the tbody case statically previously, but more involved cases were very hard to fix.
But I just thought of another idea: Special-Case runtime function for descending into tr elements, which checks if the node is a tbody and in that case descent once more. Maybe that could work?

@trueadm
Copy link
Contributor

trueadm commented Sep 17, 2024

I wouldn't consider this a bug, but given that Svelte 4 would patch mismatches from SSR HTML (such as the table case), and we no longer do that in Svelte 5, we need to just document this. We already capture most cases via SSR, but that doesn't take into account that Svelte 4 allowed the SSR to be different from the client. We only allow that in Svelte 5 in certain cases (like if blocks), so it will definitely be a migration note unless we want to support all types of mismatch like Svelte 4 did.

@Rich-Harris
Copy link
Member

It's not just about hydration. It's about the fact that this works and this doesn't. It's an ugly breaking change and — since it's valid HTML — definitely a bug

@Rich-Harris
Copy link
Member

Per #12628 (comment), I've changed my view of this. I think the compiler errors/warnings could be more informative, but that's a separate chunk of work

@Rich-Harris Rich-Harris merged commit e4926d7 into main Sep 19, 2024
9 checks passed
@Rich-Harris Rich-Harris deleted the structure-breaking-docs branch September 19, 2024 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants