refactor[devtools]: highlight an array of elements for native (#27734)

We are currently just pass the first element, which diverges from the
implementation for web. This is especially bad if you are inspecting
something like a list, where host fiber can represent multiple elements.

This part runs on the backend of React DevTools, so it should not affect
cases for React Native when frontend version can be more up-to-date than
backend's. I will double-check it before merging.

Once version of `react-devtools-core` is updated in React Native, this
should be supported, I will work on that later.

DiffTrain build for commit https://github.com/facebook/react/commit/fbc9b68d61aba17a5a1119caac22647d0897486a.
This commit is contained in:
hoxyq
2023-11-23 11:35:43 +00:00
parent 363a78f5eb
commit 8bf5ef92c9
7 changed files with 9 additions and 9 deletions
@@ -25474,7 +25474,7 @@ if (__DEV__) {
return root;
}
var ReactVersion = "18.3.0-canary-a3172e933-20231122";
var ReactVersion = "18.3.0-canary-fbc9b68d6-20231123";
// Might add PROFILE later.
@@ -9083,7 +9083,7 @@ var devToolsConfig$jscomp$inline_1033 = {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 0,
version: "18.3.0-canary-a3172e933-20231122",
version: "18.3.0-canary-fbc9b68d6-20231123",
rendererPackageName: "react-test-renderer"
};
var internals$jscomp$inline_1226 = {
@@ -9114,7 +9114,7 @@ var internals$jscomp$inline_1226 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-canary-a3172e933-20231122"
reconcilerVersion: "18.3.0-canary-fbc9b68d6-20231123"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1227 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -9509,7 +9509,7 @@ var devToolsConfig$jscomp$inline_1075 = {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 0,
version: "18.3.0-canary-a3172e933-20231122",
version: "18.3.0-canary-fbc9b68d6-20231123",
rendererPackageName: "react-test-renderer"
};
var internals$jscomp$inline_1267 = {
@@ -9540,7 +9540,7 @@ var internals$jscomp$inline_1267 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-canary-a3172e933-20231122"
reconcilerVersion: "18.3.0-canary-fbc9b68d6-20231123"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1268 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -24,7 +24,7 @@ if (__DEV__) {
) {
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
}
var ReactVersion = "18.3.0-canary-a3172e933-20231122";
var ReactVersion = "18.3.0-canary-fbc9b68d6-20231123";
// ATTENTION
// When adding new symbols to this file,
@@ -580,4 +580,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactCurrentDispatcher.current.useTransition();
};
exports.version = "18.3.0-canary-a3172e933-20231122";
exports.version = "18.3.0-canary-fbc9b68d6-20231123";
@@ -576,7 +576,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactCurrentDispatcher.current.useTransition();
};
exports.version = "18.3.0-canary-a3172e933-20231122";
exports.version = "18.3.0-canary-fbc9b68d6-20231123";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
@@ -1 +1 @@
a3172e933c7eb54aa02ec1d303453a96bc76181b
fbc9b68d61aba17a5a1119caac22647d0897486a