Enable moveBefore in experimental releases#32549
Merged
sebmarkbage merged 1 commit intofacebook:mainfrom Mar 10, 2025
Merged
Conversation
|
Comparing: f9d78089c6ec8dce3a11cdf135d6d27b7a8dc1c5...f449938053adfd7b232e782f795c95164568b0dd Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: (No significant changes) |
sophiebits
approved these changes
Mar 10, 2025
github-actions bot
pushed a commit
that referenced
this pull request
Mar 10, 2025
Enabling feature detection of early DOM features in a framework is reckless. I'm not judging other frameworks (but also a little bit). Because if you do something like `if (moveBefore) moveBefore(a, b) else insertBefore(a, b)` like we do and then the implementation has to change there are still too many websites out there that it becomes impossible to change it. It would break the web. It would instead have to change to a different name. That's what happened with `contains` -> `includes`. Counter to popular belief it didn't have anything to do with patching prototypes. Therefore, ideally frameworks shouldn't start rely on it until there's two implementations so that there's time for feedback. That's why we didn't immediately enable this even in experimental. However, at this point there's probably enough feature detection and it has shipped long enough in Chrome that it's unlikely to be able to change at this point. We can enable it now. For now just in `@experimental` to see if we can flush out issues with it before bringing it to stable. DiffTrain build for [696950a](696950a)
huozhi
pushed a commit
to vercel/next.js
that referenced
this pull request
Mar 11, 2025
[diff facebook/react@029e8bd6...0ca3deeb](facebook/react@029e8bd...0ca3dee) <details> <summary>React upstream changes</summary> - facebook/react#32569 - facebook/react#32567 - facebook/react#32549 - facebook/react#32545 - facebook/react#32566 - facebook/react#32551 - facebook/react#32550 - facebook/react#32528 - facebook/react#32359 - facebook/react#32536 - facebook/react#32539 </details>
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.
Enabling feature detection of early DOM features in a framework is reckless. I'm not judging other frameworks (but also a little bit). Because if you do something like
if (moveBefore) moveBefore(a, b) else insertBefore(a, b)like we do and then the implementation has to change there are still too many websites out there that it becomes impossible to change it. It would break the web. It would instead have to change to a different name. That's what happened withcontains->includes. Counter to popular belief it didn't have anything to do with patching prototypes. Therefore, ideally frameworks shouldn't start rely on it until there's two implementations so that there's time for feedback.That's why we didn't immediately enable this even in experimental. However, at this point there's probably enough feature detection and it has shipped long enough in Chrome that it's unlikely to be able to change at this point.
We can enable it now. For now just in
@experimentalto see if we can flush out issues with it before bringing it to stable.