Skip to content

Commit 0060ae6

Browse files
committed
Implement Navigation API backed default indicator for DOM renderer (#33162)
Stacked on #33160. By default, if `onDefaultTransitionIndicator` is not overridden, this will trigger a fake Navigation event using the Navigation API. This is intercepted to create an on-going navigation until we complete the Transition. Basically each default Transition is simulated as a Navigation. This triggers the native browser loading state (in Chrome at least). So now by default the browser spinner spins during a Transition if no other loading state is provided. Firefox and Safari hasn't shipped Navigation API yet and even in the flag Safari has, it doesn't actually trigger the native loading state. To ensures that you can still use other Navigations concurrently, we don't start our fake Navigation if there's one on-going already. Similarly if our fake Navigation gets interrupted by another. We wait for on-going ones to finish and then start a new fake one if we're supposed to be still pending. There might be other routers on the page that might listen to intercept Navigation Events. Typically you'd expect them not to trigger a refetch when navigating to the same state. However, if they want to detect this we provide the `"react-transition"` string in the `info` field for this purpose. DiffTrain build for [5944042](5944042)
1 parent 3c958c0 commit 0060ae6

34 files changed

+554
-96
lines changed

compiled/facebook-www/REVISION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
62d3f36ea79fc0a10b514d4bbcc4ba3f21b3206e
1+
59440424d05360cca32ca6f46ae33661f70d43e2
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
62d3f36ea79fc0a10b514d4bbcc4ba3f21b3206e
1+
59440424d05360cca32ca6f46ae33661f70d43e2

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1537,7 +1537,7 @@ __DEV__ &&
15371537
exports.useTransition = function () {
15381538
return resolveDispatcher().useTransition();
15391539
};
1540-
exports.version = "19.2.0-www-classic-62d3f36e-20250513";
1540+
exports.version = "19.2.0-www-classic-59440424-20250513";
15411541
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
15421542
"function" ===
15431543
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
@@ -1537,7 +1537,7 @@ __DEV__ &&
15371537
exports.useTransition = function () {
15381538
return resolveDispatcher().useTransition();
15391539
};
1540-
exports.version = "19.2.0-www-modern-62d3f36e-20250513";
1540+
exports.version = "19.2.0-www-modern-59440424-20250513";
15411541
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
15421542
"function" ===
15431543
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
@@ -635,4 +635,4 @@ exports.useSyncExternalStore = function (
635635
exports.useTransition = function () {
636636
return ReactSharedInternals.H.useTransition();
637637
};
638-
exports.version = "19.2.0-www-classic-62d3f36e-20250513";
638+
exports.version = "19.2.0-www-classic-59440424-20250513";

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,4 +635,4 @@ exports.useSyncExternalStore = function (
635635
exports.useTransition = function () {
636636
return ReactSharedInternals.H.useTransition();
637637
};
638-
exports.version = "19.2.0-www-modern-62d3f36e-20250513";
638+
exports.version = "19.2.0-www-modern-59440424-20250513";

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ exports.useSyncExternalStore = function (
639639
exports.useTransition = function () {
640640
return ReactSharedInternals.H.useTransition();
641641
};
642-
exports.version = "19.2.0-www-classic-62d3f36e-20250513";
642+
exports.version = "19.2.0-www-classic-59440424-20250513";
643643
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
644644
"function" ===
645645
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
@@ -639,7 +639,7 @@ exports.useSyncExternalStore = function (
639639
exports.useTransition = function () {
640640
return ReactSharedInternals.H.useTransition();
641641
};
642-
exports.version = "19.2.0-www-modern-62d3f36e-20250513";
642+
exports.version = "19.2.0-www-modern-59440424-20250513";
643643
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
644644
"function" ===
645645
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19069,10 +19069,10 @@ __DEV__ &&
1906919069
(function () {
1907019070
var internals = {
1907119071
bundleType: 1,
19072-
version: "19.2.0-www-classic-62d3f36e-20250513",
19072+
version: "19.2.0-www-classic-59440424-20250513",
1907319073
rendererPackageName: "react-art",
1907419074
currentDispatcherRef: ReactSharedInternals,
19075-
reconcilerVersion: "19.2.0-www-classic-62d3f36e-20250513"
19075+
reconcilerVersion: "19.2.0-www-classic-59440424-20250513"
1907619076
};
1907719077
internals.overrideHookState = overrideHookState;
1907819078
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -19106,7 +19106,7 @@ __DEV__ &&
1910619106
exports.Shape = Shape;
1910719107
exports.Surface = Surface;
1910819108
exports.Text = Text;
19109-
exports.version = "19.2.0-www-classic-62d3f36e-20250513";
19109+
exports.version = "19.2.0-www-classic-59440424-20250513";
1911019110
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
1911119111
"function" ===
1911219112
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18841,10 +18841,10 @@ __DEV__ &&
1884118841
(function () {
1884218842
var internals = {
1884318843
bundleType: 1,
18844-
version: "19.2.0-www-modern-62d3f36e-20250513",
18844+
version: "19.2.0-www-modern-59440424-20250513",
1884518845
rendererPackageName: "react-art",
1884618846
currentDispatcherRef: ReactSharedInternals,
18847-
reconcilerVersion: "19.2.0-www-modern-62d3f36e-20250513"
18847+
reconcilerVersion: "19.2.0-www-modern-59440424-20250513"
1884818848
};
1884918849
internals.overrideHookState = overrideHookState;
1885018850
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -18878,7 +18878,7 @@ __DEV__ &&
1887818878
exports.Shape = Shape;
1887918879
exports.Surface = Surface;
1888018880
exports.Text = Text;
18881-
exports.version = "19.2.0-www-modern-62d3f36e-20250513";
18881+
exports.version = "19.2.0-www-modern-59440424-20250513";
1888218882
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
1888318883
"function" ===
1888418884
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

0 commit comments

Comments
 (0)