-
Notifications
You must be signed in to change notification settings - Fork 49k
[Fizz] Wrap revealCompletedBoundaries in a ViewTransitions aware version #33293
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
Changes from all commits
5425556
4bbbfe7
fd248c9
e8e9fc4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,12 @@ | ||
import {completeBoundary} from './ReactDOMFizzInstructionSetShared'; | ||
import { | ||
revealCompletedBoundaries, | ||
completeBoundary, | ||
} from './ReactDOMFizzInstructionSetShared'; | ||
|
||
// This is a string so Closure's advanced compilation mode doesn't mangle it. | ||
// eslint-disable-next-line dot-notation | ||
window['$RB'] = []; | ||
// eslint-disable-next-line dot-notation | ||
window['$RV'] = revealCompletedBoundaries; | ||
// eslint-disable-next-line dot-notation | ||
window['$RC'] = completeBoundary; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import {revealCompletedBoundariesWithViewTransitions} from './ReactDOMFizzInstructionSetShared'; | ||
|
||
// Upgrade the revealCompletedBoundaries instruction to support ViewTransitions. | ||
// This is a string so Closure's advanced compilation mode doesn't mangle it. | ||
// eslint-disable-next-line dot-notation | ||
window['$RV'] = revealCompletedBoundariesWithViewTransitions.bind( | ||
null, | ||
// eslint-disable-next-line dot-notation | ||
window['$RV'], | ||
); | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,13 +8,19 @@ import { | |
completeBoundaryWithStyles, | ||
completeSegment, | ||
listenToFormSubmissionsForReplaying, | ||
revealCompletedBoundaries, | ||
revealCompletedBoundariesWithViewTransitions, | ||
} from './ReactDOMFizzInstructionSetShared'; | ||
|
||
// This is a string so Closure's advanced compilation mode doesn't mangle it. | ||
// These will be renamed to local references by the external-runtime-plugin. | ||
window['$RM'] = new Map(); | ||
window['$RB'] = []; | ||
window['$RX'] = clientRenderBoundary; | ||
window['$RV'] = revealCompletedBoundariesWithViewTransitions.bind( | ||
null, | ||
revealCompletedBoundaries, | ||
); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Normally we’d want to make sure static functions like this gets inlined but since this function will be pass as first call into startViewTransition and reused in multiple places it needs to be a separate function anyway. |
||
window['$RC'] = completeBoundary; | ||
window['$RR'] = completeBoundaryWithStyles; | ||
window['$RS'] = completeSegment; | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could optimize this by special casing when it goes together with the complete boundary instruction but it’s not really much difference atm so not worth it.