Skip to content

Commit 861b149

Browse files
committed
Measure Updated ViewTransition Boundaries (#32653)
This does the same thing for that we did for in e3cbaff. If a boundary hasn't mutated and didn't change in size, we mark it for cancellation. Otherwise we add names to it. The different from the CommitViewTransition path is that the old names are added to the clones so this is the first time the new names. Now we also cancel any boundaries that were unchanged. So now the root no longer animates. We still have to clone them. There are other optimizations that can avoid cloning but once we've done all the layouts we can still cancel the running animation and let them just be the regular content if they didn't change. Just like the regular fire-and-forget path. This also fixes the measurement so that we measure clones by adjusting their position back into the viewport. This actually surfaces a bug in Safari that was already in #32612. It turns out that the old names aren't picked up for some reason and so in Safari they looked more like a cross-fade than what #32612 was supposed to fix. However, now that bug is even more apparent because they actually just disappear in Safari. I'm not sure what that bug is but it's unrelated to this PR so will fix that separately. DiffTrain build for [3c3696d](3c3696d)
1 parent cfa201d commit 861b149

23 files changed

+496
-496
lines changed

compiled-rn/VERSION_NATIVE_FB

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
19.1.0-native-fb-8243f3f0-20250317
1+
19.1.0-native-fb-3c3696d5-20250317

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-dev.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<f8ce8de0b084a8efc31accbdc12604ab>>
10+
* @generated SignedSource<<5df829012891bb06d31fc62185d215e9>>
1111
*/
1212

1313
"use strict";
@@ -404,5 +404,5 @@ __DEV__ &&
404404
exports.useFormStatus = function () {
405405
return resolveDispatcher().useHostTransitionStatus();
406406
};
407-
exports.version = "19.1.0-native-fb-8243f3f0-20250317";
407+
exports.version = "19.1.0-native-fb-3c3696d5-20250317";
408408
})();

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-prod.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<ac382a6115fdf1bd38887ad91578ee8a>>
10+
* @generated SignedSource<<857f12af8b30cba4eab8205f94c408bb>>
1111
*/
1212

1313
"use strict";
@@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) {
203203
exports.useFormStatus = function () {
204204
return ReactSharedInternals.H.useHostTransitionStatus();
205205
};
206-
exports.version = "19.1.0-native-fb-8243f3f0-20250317";
206+
exports.version = "19.1.0-native-fb-3c3696d5-20250317";

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-profiling.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<ac382a6115fdf1bd38887ad91578ee8a>>
10+
* @generated SignedSource<<857f12af8b30cba4eab8205f94c408bb>>
1111
*/
1212

1313
"use strict";
@@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) {
203203
exports.useFormStatus = function () {
204204
return ReactSharedInternals.H.useHostTransitionStatus();
205205
};
206-
exports.version = "19.1.0-native-fb-8243f3f0-20250317";
206+
exports.version = "19.1.0-native-fb-3c3696d5-20250317";

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-dev.js

Lines changed: 167 additions & 167 deletions
Large diffs are not rendered by default.

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-prod.js

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<a4ac7bf972b44a1ff467f78bff589a27>>
10+
* @generated SignedSource<<2ae583ea4606466f23da3890f85d5f5f>>
1111
*/
1212

1313
/*
@@ -12548,20 +12548,20 @@ function debounceScrollEnd(targetInst, nativeEvent, nativeEventTarget) {
1254812548
(nativeEventTarget[internalScrollTimer] = targetInst));
1254912549
}
1255012550
for (
12551-
var i$jscomp$inline_1584 = 0;
12552-
i$jscomp$inline_1584 < simpleEventPluginEvents.length;
12553-
i$jscomp$inline_1584++
12551+
var i$jscomp$inline_1585 = 0;
12552+
i$jscomp$inline_1585 < simpleEventPluginEvents.length;
12553+
i$jscomp$inline_1585++
1255412554
) {
12555-
var eventName$jscomp$inline_1585 =
12556-
simpleEventPluginEvents[i$jscomp$inline_1584],
12557-
domEventName$jscomp$inline_1586 =
12558-
eventName$jscomp$inline_1585.toLowerCase(),
12559-
capitalizedEvent$jscomp$inline_1587 =
12560-
eventName$jscomp$inline_1585[0].toUpperCase() +
12561-
eventName$jscomp$inline_1585.slice(1);
12555+
var eventName$jscomp$inline_1586 =
12556+
simpleEventPluginEvents[i$jscomp$inline_1585],
12557+
domEventName$jscomp$inline_1587 =
12558+
eventName$jscomp$inline_1586.toLowerCase(),
12559+
capitalizedEvent$jscomp$inline_1588 =
12560+
eventName$jscomp$inline_1586[0].toUpperCase() +
12561+
eventName$jscomp$inline_1586.slice(1);
1256212562
registerSimpleEvent(
12563-
domEventName$jscomp$inline_1586,
12564-
"on" + capitalizedEvent$jscomp$inline_1587
12563+
domEventName$jscomp$inline_1587,
12564+
"on" + capitalizedEvent$jscomp$inline_1588
1256512565
);
1256612566
}
1256712567
registerSimpleEvent(ANIMATION_END, "onAnimationEnd");
@@ -16151,16 +16151,16 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
1615116151
0 === i && attemptExplicitHydrationTarget(target);
1615216152
}
1615316153
};
16154-
var isomorphicReactPackageVersion$jscomp$inline_1833 = React.version;
16154+
var isomorphicReactPackageVersion$jscomp$inline_1839 = React.version;
1615516155
if (
16156-
"19.1.0-native-fb-8243f3f0-20250317" !==
16157-
isomorphicReactPackageVersion$jscomp$inline_1833
16156+
"19.1.0-native-fb-3c3696d5-20250317" !==
16157+
isomorphicReactPackageVersion$jscomp$inline_1839
1615816158
)
1615916159
throw Error(
1616016160
formatProdErrorMessage(
1616116161
527,
16162-
isomorphicReactPackageVersion$jscomp$inline_1833,
16163-
"19.1.0-native-fb-8243f3f0-20250317"
16162+
isomorphicReactPackageVersion$jscomp$inline_1839,
16163+
"19.1.0-native-fb-3c3696d5-20250317"
1616416164
)
1616516165
);
1616616166
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -16180,24 +16180,24 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
1618016180
null === componentOrElement ? null : componentOrElement.stateNode;
1618116181
return componentOrElement;
1618216182
};
16183-
var internals$jscomp$inline_2295 = {
16183+
var internals$jscomp$inline_2301 = {
1618416184
bundleType: 0,
16185-
version: "19.1.0-native-fb-8243f3f0-20250317",
16185+
version: "19.1.0-native-fb-3c3696d5-20250317",
1618616186
rendererPackageName: "react-dom",
1618716187
currentDispatcherRef: ReactSharedInternals,
16188-
reconcilerVersion: "19.1.0-native-fb-8243f3f0-20250317"
16188+
reconcilerVersion: "19.1.0-native-fb-3c3696d5-20250317"
1618916189
};
1619016190
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
16191-
var hook$jscomp$inline_2296 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
16191+
var hook$jscomp$inline_2302 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
1619216192
if (
16193-
!hook$jscomp$inline_2296.isDisabled &&
16194-
hook$jscomp$inline_2296.supportsFiber
16193+
!hook$jscomp$inline_2302.isDisabled &&
16194+
hook$jscomp$inline_2302.supportsFiber
1619516195
)
1619616196
try {
16197-
(rendererID = hook$jscomp$inline_2296.inject(
16198-
internals$jscomp$inline_2295
16197+
(rendererID = hook$jscomp$inline_2302.inject(
16198+
internals$jscomp$inline_2301
1619916199
)),
16200-
(injectedHook = hook$jscomp$inline_2296);
16200+
(injectedHook = hook$jscomp$inline_2302);
1620116201
} catch (err) {}
1620216202
}
1620316203
exports.createRoot = function (container, options) {
@@ -16289,4 +16289,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
1628916289
listenToAllSupportedEvents(container);
1629016290
return new ReactDOMHydrationRoot(initialChildren);
1629116291
};
16292-
exports.version = "19.1.0-native-fb-8243f3f0-20250317";
16292+
exports.version = "19.1.0-native-fb-3c3696d5-20250317";

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-profiling.js

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<0336eadfdd6ca2ff219e76b1b7f7fc45>>
10+
* @generated SignedSource<<fee812323d93ff85c16ea133bdc3d5ec>>
1111
*/
1212

1313
/*
@@ -13190,20 +13190,20 @@ function debounceScrollEnd(targetInst, nativeEvent, nativeEventTarget) {
1319013190
(nativeEventTarget[internalScrollTimer] = targetInst));
1319113191
}
1319213192
for (
13193-
var i$jscomp$inline_1677 = 0;
13194-
i$jscomp$inline_1677 < simpleEventPluginEvents.length;
13195-
i$jscomp$inline_1677++
13193+
var i$jscomp$inline_1678 = 0;
13194+
i$jscomp$inline_1678 < simpleEventPluginEvents.length;
13195+
i$jscomp$inline_1678++
1319613196
) {
13197-
var eventName$jscomp$inline_1678 =
13198-
simpleEventPluginEvents[i$jscomp$inline_1677],
13199-
domEventName$jscomp$inline_1679 =
13200-
eventName$jscomp$inline_1678.toLowerCase(),
13201-
capitalizedEvent$jscomp$inline_1680 =
13202-
eventName$jscomp$inline_1678[0].toUpperCase() +
13203-
eventName$jscomp$inline_1678.slice(1);
13197+
var eventName$jscomp$inline_1679 =
13198+
simpleEventPluginEvents[i$jscomp$inline_1678],
13199+
domEventName$jscomp$inline_1680 =
13200+
eventName$jscomp$inline_1679.toLowerCase(),
13201+
capitalizedEvent$jscomp$inline_1681 =
13202+
eventName$jscomp$inline_1679[0].toUpperCase() +
13203+
eventName$jscomp$inline_1679.slice(1);
1320413204
registerSimpleEvent(
13205-
domEventName$jscomp$inline_1679,
13206-
"on" + capitalizedEvent$jscomp$inline_1680
13205+
domEventName$jscomp$inline_1680,
13206+
"on" + capitalizedEvent$jscomp$inline_1681
1320713207
);
1320813208
}
1320913209
registerSimpleEvent(ANIMATION_END, "onAnimationEnd");
@@ -16801,16 +16801,16 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
1680116801
0 === i && attemptExplicitHydrationTarget(target);
1680216802
}
1680316803
};
16804-
var isomorphicReactPackageVersion$jscomp$inline_1928 = React.version;
16804+
var isomorphicReactPackageVersion$jscomp$inline_1934 = React.version;
1680516805
if (
16806-
"19.1.0-native-fb-8243f3f0-20250317" !==
16807-
isomorphicReactPackageVersion$jscomp$inline_1928
16806+
"19.1.0-native-fb-3c3696d5-20250317" !==
16807+
isomorphicReactPackageVersion$jscomp$inline_1934
1680816808
)
1680916809
throw Error(
1681016810
formatProdErrorMessage(
1681116811
527,
16812-
isomorphicReactPackageVersion$jscomp$inline_1928,
16813-
"19.1.0-native-fb-8243f3f0-20250317"
16812+
isomorphicReactPackageVersion$jscomp$inline_1934,
16813+
"19.1.0-native-fb-3c3696d5-20250317"
1681416814
)
1681516815
);
1681616816
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -16830,12 +16830,12 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
1683016830
null === componentOrElement ? null : componentOrElement.stateNode;
1683116831
return componentOrElement;
1683216832
};
16833-
var internals$jscomp$inline_1935 = {
16833+
var internals$jscomp$inline_1941 = {
1683416834
bundleType: 0,
16835-
version: "19.1.0-native-fb-8243f3f0-20250317",
16835+
version: "19.1.0-native-fb-3c3696d5-20250317",
1683616836
rendererPackageName: "react-dom",
1683716837
currentDispatcherRef: ReactSharedInternals,
16838-
reconcilerVersion: "19.1.0-native-fb-8243f3f0-20250317",
16838+
reconcilerVersion: "19.1.0-native-fb-3c3696d5-20250317",
1683916839
getLaneLabelMap: function () {
1684016840
for (
1684116841
var map = new Map(), lane = 1, index$295 = 0;
@@ -16853,16 +16853,16 @@ var internals$jscomp$inline_1935 = {
1685316853
}
1685416854
};
1685516855
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
16856-
var hook$jscomp$inline_2355 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
16856+
var hook$jscomp$inline_2361 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
1685716857
if (
16858-
!hook$jscomp$inline_2355.isDisabled &&
16859-
hook$jscomp$inline_2355.supportsFiber
16858+
!hook$jscomp$inline_2361.isDisabled &&
16859+
hook$jscomp$inline_2361.supportsFiber
1686016860
)
1686116861
try {
16862-
(rendererID = hook$jscomp$inline_2355.inject(
16863-
internals$jscomp$inline_1935
16862+
(rendererID = hook$jscomp$inline_2361.inject(
16863+
internals$jscomp$inline_1941
1686416864
)),
16865-
(injectedHook = hook$jscomp$inline_2355);
16865+
(injectedHook = hook$jscomp$inline_2361);
1686616866
} catch (err) {}
1686716867
}
1686816868
exports.createRoot = function (container, options) {
@@ -16954,4 +16954,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
1695416954
listenToAllSupportedEvents(container);
1695516955
return new ReactDOMHydrationRoot(initialChildren);
1695616956
};
16957-
exports.version = "19.1.0-native-fb-8243f3f0-20250317";
16957+
exports.version = "19.1.0-native-fb-3c3696d5-20250317";

0 commit comments

Comments
 (0)