Skip to content

Commit a855864

Browse files
committed
[DevTools] Synchronize Scroll Position Between Suspense Tab and Main Document (facebook#34641)
It's annoying to have to try to find where it lines up with no hints. This way when you hover over something it should be on screen. The strategy I went with is that it scrolls to a percentage along the scrollable axis but the two might not be exactly the same. Partially because they have different aspect ratios but also because suspended boundaries can shrink the document while the suspense tab needs to still be able to show the boundaries that are currently invisible. DiffTrain build for [3a0ab8a](facebook@3a0ab8a)
1 parent 80bca03 commit a855864

25 files changed

+7093
-55301
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.3.0-native-fb-408b38ef-20251023
1+
19.3.0-native-fb-3a0ab8a7-20251029

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

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

1313
"use strict";
@@ -126,10 +126,20 @@ __DEV__ &&
126126
throw Error("Target container is not a DOM element.");
127127
return createPortal$1(children, container, null, key);
128128
};
129-
exports.flushSync = function () {
130-
throw Error(
131-
"Expected this build of React to not support legacy mode but it does. This is a bug in React."
132-
);
129+
exports.flushSync = function (fn) {
130+
var previousTransition = ReactSharedInternals.T,
131+
previousUpdatePriority = Internals.p;
132+
try {
133+
if (((ReactSharedInternals.T = null), (Internals.p = 2), fn))
134+
return fn();
135+
} finally {
136+
(ReactSharedInternals.T = previousTransition),
137+
(Internals.p = previousUpdatePriority),
138+
Internals.d.f() &&
139+
console.error(
140+
"flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task."
141+
);
142+
}
133143
};
134144
exports.preconnect = function (href, options) {
135145
"string" === typeof href && href
@@ -404,5 +414,5 @@ __DEV__ &&
404414
exports.useFormStatus = function () {
405415
return resolveDispatcher().useHostTransitionStatus();
406416
};
407-
exports.version = "19.3.0-native-fb-408b38ef-20251023";
417+
exports.version = "19.3.0-native-fb-3a0ab8a7-20251029";
408418
})();

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

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<c2fa393bfca5ed623ddafb57633dea03>>
10+
* @generated SignedSource<<a640364eab7add93b41d4111387f9d1c>>
1111
*/
1212

1313
"use strict";
@@ -78,10 +78,16 @@ exports.createPortal = function (children, container) {
7878
throw Error(formatProdErrorMessage(299));
7979
return createPortal$1(children, container, null, key);
8080
};
81-
exports.flushSync = function () {
82-
throw Error(
83-
"Expected this build of React to not support legacy mode but it does. This is a bug in React."
84-
);
81+
exports.flushSync = function (fn) {
82+
var previousTransition = ReactSharedInternals.T,
83+
previousUpdatePriority = Internals.p;
84+
try {
85+
if (((ReactSharedInternals.T = null), (Internals.p = 2), fn)) return fn();
86+
} finally {
87+
(ReactSharedInternals.T = previousTransition),
88+
(Internals.p = previousUpdatePriority),
89+
Internals.d.f();
90+
}
8591
};
8692
exports.preconnect = function (href, options) {
8793
"string" === typeof href &&
@@ -203,4 +209,4 @@ exports.useFormState = function (action, initialState, permalink) {
203209
exports.useFormStatus = function () {
204210
return ReactSharedInternals.H.useHostTransitionStatus();
205211
};
206-
exports.version = "19.3.0-native-fb-408b38ef-20251023";
212+
exports.version = "19.3.0-native-fb-3a0ab8a7-20251029";

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

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<c2fa393bfca5ed623ddafb57633dea03>>
10+
* @generated SignedSource<<a640364eab7add93b41d4111387f9d1c>>
1111
*/
1212

1313
"use strict";
@@ -78,10 +78,16 @@ exports.createPortal = function (children, container) {
7878
throw Error(formatProdErrorMessage(299));
7979
return createPortal$1(children, container, null, key);
8080
};
81-
exports.flushSync = function () {
82-
throw Error(
83-
"Expected this build of React to not support legacy mode but it does. This is a bug in React."
84-
);
81+
exports.flushSync = function (fn) {
82+
var previousTransition = ReactSharedInternals.T,
83+
previousUpdatePriority = Internals.p;
84+
try {
85+
if (((ReactSharedInternals.T = null), (Internals.p = 2), fn)) return fn();
86+
} finally {
87+
(ReactSharedInternals.T = previousTransition),
88+
(Internals.p = previousUpdatePriority),
89+
Internals.d.f();
90+
}
8591
};
8692
exports.preconnect = function (href, options) {
8793
"string" === typeof href &&
@@ -203,4 +209,4 @@ exports.useFormState = function (action, initialState, permalink) {
203209
exports.useFormStatus = function () {
204210
return ReactSharedInternals.H.useHostTransitionStatus();
205211
};
206-
exports.version = "19.3.0-native-fb-408b38ef-20251023";
212+
exports.version = "19.3.0-native-fb-3a0ab8a7-20251029";

0 commit comments

Comments
 (0)