Skip to content

Commit ad8d5c9

Browse files
committed
Add the suffix to cancelled view transition names (facebook#35485)
When a View Transition might not need to update we add it to a queue. If the parent are able to be reverted, we then cancel the already started view transitions. We do this by adding an animation that hides the "old" state and remove the view transition name from the old state. There was a bug where if you have more than one child in a `<ViewTransition>` we didn't add the right suffix to the name we added in the queue so it wasn't adding an animation that hides the old state. The effect was that it playing an exit animation instead of being cancelled. DiffTrain build for [4a3d993](facebook@4a3d993)
1 parent bc980cd commit ad8d5c9

34 files changed

+735
-587
lines changed

compiled/facebook-www/REVISION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
583e20033220bc17a590a25624f6251c6b101ff4
1+
4a3d993e52fd6bcadd9c3029c75df3c22684f69c
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
583e20033220bc17a590a25624f6251c6b101ff4
1+
4a3d993e52fd6bcadd9c3029c75df3c22684f69c

compiled/facebook-www/React-dev.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1499,7 +1499,7 @@ __DEV__ &&
14991499
exports.useTransition = function () {
15001500
return resolveDispatcher().useTransition();
15011501
};
1502-
exports.version = "19.3.0-www-classic-583e2003-20260113";
1502+
exports.version = "19.3.0-www-classic-4a3d993e-20260114";
15031503
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
15041504
"function" ===
15051505
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-dev.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1499,7 +1499,7 @@ __DEV__ &&
14991499
exports.useTransition = function () {
15001500
return resolveDispatcher().useTransition();
15011501
};
1502-
exports.version = "19.3.0-www-modern-583e2003-20260113";
1502+
exports.version = "19.3.0-www-modern-4a3d993e-20260114";
15031503
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
15041504
"function" ===
15051505
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-prod.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,4 +606,4 @@ exports.useSyncExternalStore = function (
606606
exports.useTransition = function () {
607607
return ReactSharedInternals.H.useTransition();
608608
};
609-
exports.version = "19.3.0-www-classic-583e2003-20260113";
609+
exports.version = "19.3.0-www-classic-4a3d993e-20260114";

compiled/facebook-www/React-prod.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,4 +606,4 @@ exports.useSyncExternalStore = function (
606606
exports.useTransition = function () {
607607
return ReactSharedInternals.H.useTransition();
608608
};
609-
exports.version = "19.3.0-www-modern-583e2003-20260113";
609+
exports.version = "19.3.0-www-modern-4a3d993e-20260114";

compiled/facebook-www/React-profiling.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@ exports.useSyncExternalStore = function (
610610
exports.useTransition = function () {
611611
return ReactSharedInternals.H.useTransition();
612612
};
613-
exports.version = "19.3.0-www-classic-583e2003-20260113";
613+
exports.version = "19.3.0-www-classic-4a3d993e-20260114";
614614
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
615615
"function" ===
616616
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-profiling.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@ exports.useSyncExternalStore = function (
610610
exports.useTransition = function () {
611611
return ReactSharedInternals.H.useTransition();
612612
};
613-
exports.version = "19.3.0-www-modern-583e2003-20260113";
613+
exports.version = "19.3.0-www-modern-4a3d993e-20260114";
614614
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
615615
"function" ===
616616
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/ReactART-dev.classic.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11887,7 +11887,9 @@ __DEV__ &&
1188711887
(viewTransitionCancelableChildren = []),
1188811888
viewTransitionCancelableChildren.push(
1188911889
instance,
11890-
oldName,
11890+
0 === viewTransitionHostInstanceIdx
11891+
? oldName
11892+
: oldName + "_" + viewTransitionHostInstanceIdx,
1189111893
child.memoizedProps
1189211894
));
1189311895
viewTransitionHostInstanceIdx++;
@@ -20468,10 +20470,10 @@ __DEV__ &&
2046820470
(function () {
2046920471
var internals = {
2047020472
bundleType: 1,
20471-
version: "19.3.0-www-classic-583e2003-20260113",
20473+
version: "19.3.0-www-classic-4a3d993e-20260114",
2047220474
rendererPackageName: "react-art",
2047320475
currentDispatcherRef: ReactSharedInternals,
20474-
reconcilerVersion: "19.3.0-www-classic-583e2003-20260113"
20476+
reconcilerVersion: "19.3.0-www-classic-4a3d993e-20260114"
2047520477
};
2047620478
internals.overrideHookState = overrideHookState;
2047720479
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -20506,7 +20508,7 @@ __DEV__ &&
2050620508
exports.Shape = Shape;
2050720509
exports.Surface = Surface;
2050820510
exports.Text = Text;
20509-
exports.version = "19.3.0-www-classic-583e2003-20260113";
20511+
exports.version = "19.3.0-www-classic-4a3d993e-20260114";
2051020512
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
2051120513
"function" ===
2051220514
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/ReactART-dev.modern.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11705,7 +11705,9 @@ __DEV__ &&
1170511705
(viewTransitionCancelableChildren = []),
1170611706
viewTransitionCancelableChildren.push(
1170711707
instance,
11708-
oldName,
11708+
0 === viewTransitionHostInstanceIdx
11709+
? oldName
11710+
: oldName + "_" + viewTransitionHostInstanceIdx,
1170911711
child.memoizedProps
1171011712
));
1171111713
viewTransitionHostInstanceIdx++;
@@ -20239,10 +20241,10 @@ __DEV__ &&
2023920241
(function () {
2024020242
var internals = {
2024120243
bundleType: 1,
20242-
version: "19.3.0-www-modern-583e2003-20260113",
20244+
version: "19.3.0-www-modern-4a3d993e-20260114",
2024320245
rendererPackageName: "react-art",
2024420246
currentDispatcherRef: ReactSharedInternals,
20245-
reconcilerVersion: "19.3.0-www-modern-583e2003-20260113"
20247+
reconcilerVersion: "19.3.0-www-modern-4a3d993e-20260114"
2024620248
};
2024720249
internals.overrideHookState = overrideHookState;
2024820250
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -20277,7 +20279,7 @@ __DEV__ &&
2027720279
exports.Shape = Shape;
2027820280
exports.Surface = Surface;
2027920281
exports.Text = Text;
20280-
exports.version = "19.3.0-www-modern-583e2003-20260113";
20282+
exports.version = "19.3.0-www-modern-4a3d993e-20260114";
2028120283
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
2028220284
"function" ===
2028320285
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

0 commit comments

Comments
 (0)