Skip to content

Commit

Permalink
fix[react-devtools] remove native inspection button when it can't be …
Browse files Browse the repository at this point in the history
…used (#29779)

## Summary

There's no native inspection available in any of the React-Native
devtools:
* **React DevTools in Fusebox**
* **React DevTools standalone**

Besides, **React DevTools Inline** can't really open the devtools and
point to the native inspector because of lack of an API to do that.

Only **React DevTools extension** can actually do that.

That's why I've disabled it for the first 3 flavours of React DevTools
mentioned above.

## How did you test this change?
Still enabled on **React DevTools extension**
<img width="1355" alt="Screenshot 2024-06-06 at 16 09 21"
src="https://github.com/facebook/react/assets/5188459/a9b658a6-eafe-443c-9298-280bb9f4ed72">

Disabled on **React DevTools in Fusebox**
<img width="1670" alt="Screenshot 2024-06-06 at 16 04 28"
src="https://github.com/facebook/react/assets/5188459/a2ded76f-2aaf-47ce-b581-611494ca33bd">

Disabled on **React DevTools standalone**
<img width="1268" alt="Screenshot 2024-06-06 at 16 15 08"
src="https://github.com/facebook/react/assets/5188459/eb2f308d-32cb-43ea-921b-3503aa874d64">

Disabled on **React DevTools Inline**
<img width="1206" alt="Screenshot 2024-06-06 at 16 09 26"
src="https://github.com/facebook/react/assets/5188459/03da741a-66bf-4414-91f7-2f344c78a880">

DiffTrain build for commit 99da76f.
  • Loading branch information
vzaidman committed Jun 6, 2024
1 parent 59b1f85 commit 32d7ecf
Show file tree
Hide file tree
Showing 14 changed files with 36 additions and 36 deletions.
2 changes: 1 addition & 1 deletion compiled-rn/VERSION_NATIVE_FB
Original file line number Diff line number Diff line change
@@ -1 +1 @@
19.0.0-native-fb-704aeed022-20240605
19.0.0-native-fb-99da76f23a-20240606
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<d112a309d22f8a4dc055a4e175817978>>
* @generated SignedSource<<8ff0896135b7b18c20904b27e0db88a8>>
*/

'use strict';
Expand Down Expand Up @@ -23580,7 +23580,7 @@ identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, transition
return root;
}

var ReactVersion = '19.0.0-native-fb-704aeed022-20240605';
var ReactVersion = '19.0.0-native-fb-99da76f23a-20240606';

/*
* The `'' + value` pattern (used in perf-sensitive code) throws for Symbol
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<115011faaefd58115d16348c330f8f1b>>
* @generated SignedSource<<dfd7547611fb05ceb70414ceebfd0e64>>
*/

"use strict";
Expand Down Expand Up @@ -9336,7 +9336,7 @@ var devToolsConfig$jscomp$inline_1048 = {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 0,
version: "19.0.0-native-fb-704aeed022-20240605",
version: "19.0.0-native-fb-99da76f23a-20240606",
rendererPackageName: "react-test-renderer"
};
var internals$jscomp$inline_1235 = {
Expand Down Expand Up @@ -9367,7 +9367,7 @@ var internals$jscomp$inline_1235 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-native-fb-704aeed022-20240605"
reconcilerVersion: "19.0.0-native-fb-99da76f23a-20240606"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1236 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<1c7492b335b3cd1b33f7371893e59b44>>
* @generated SignedSource<<85ef7c6c3e299bddaa219dd6a7ddb485>>
*/

"use strict";
Expand Down Expand Up @@ -9958,7 +9958,7 @@ var devToolsConfig$jscomp$inline_1131 = {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 0,
version: "19.0.0-native-fb-704aeed022-20240605",
version: "19.0.0-native-fb-99da76f23a-20240606",
rendererPackageName: "react-test-renderer"
};
(function (internals) {
Expand Down Expand Up @@ -10002,7 +10002,7 @@ var devToolsConfig$jscomp$inline_1131 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-native-fb-704aeed022-20240605"
reconcilerVersion: "19.0.0-native-fb-99da76f23a-20240606"
});
exports._Scheduler = Scheduler;
exports.act = act;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<9992a07147563b590431e5a2612eef2f>>
* @generated SignedSource<<049d661e8333442e2c93b0310afe90c8>>
*/

'use strict';
Expand All @@ -24,7 +24,7 @@ if (
}
var dynamicFlagsUntyped = require('ReactNativeInternalFeatureFlags');

var ReactVersion = '19.0.0-native-fb-704aeed022-20240605';
var ReactVersion = '19.0.0-native-fb-99da76f23a-20240606';

// Re-export dynamic flags from the internal module.
var dynamicFlags = dynamicFlagsUntyped; // We destructure each value before re-exporting to avoid a dynamic look-up on
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<e3ef3b33335bb569b7a4d4e3de157648>>
* @generated SignedSource<<7ecaa5f36e67e1c798758af01a9ca63a>>
*/

"use strict";
Expand Down Expand Up @@ -604,4 +604,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-native-fb-704aeed022-20240605";
exports.version = "19.0.0-native-fb-99da76f23a-20240606";
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<61df2a3442301186080662e07ae6861c>>
* @generated SignedSource<<d789297d22614ff6eb7e163ab91204f4>>
*/

"use strict";
Expand Down Expand Up @@ -608,7 +608,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-native-fb-704aeed022-20240605";
exports.version = "19.0.0-native-fb-99da76f23a-20240606";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
704aeed022f4277cd5604bf6d76199a6cfe4707f
99da76f23ac85d279457470f8fb19a9b2f173ed0
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<4ac9313a3ba768bd6e6f00dec2ba7f4c>>
* @generated SignedSource<<961245cc1a85b2c3470d0ad37e4b4278>>
*/

'use strict';
Expand Down Expand Up @@ -26316,7 +26316,7 @@ identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, transition
return root;
}

var ReactVersion = '19.0.0-rc-704aeed022-20240605';
var ReactVersion = '19.0.0-rc-99da76f23a-20240606';

/*
* The `'' + value` pattern (used in perf-sensitive code) throws for Symbol
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<c4d2ac334f3ed7878016aa395f9d04ca>>
* @generated SignedSource<<a362d8aac3277fadd6d410e4444f33bf>>
*/

"use strict";
Expand Down Expand Up @@ -10591,7 +10591,7 @@ var roots = new Map(),
devToolsConfig$jscomp$inline_1125 = {
findFiberByHostInstance: getInstanceFromNode,
bundleType: 0,
version: "19.0.0-rc-704aeed022-20240605",
version: "19.0.0-rc-99da76f23a-20240606",
rendererPackageName: "react-native-renderer",
rendererConfig: {
getInspectorDataForInstance: getInspectorDataForInstance,
Expand Down Expand Up @@ -10634,7 +10634,7 @@ var internals$jscomp$inline_1351 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-rc-704aeed022-20240605"
reconcilerVersion: "19.0.0-rc-99da76f23a-20240606"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1352 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<362f6feb64e85c616d0c79fc23434de1>>
* @generated SignedSource<<4e94ac0a2adddffaf123f37aad23b6c1>>
*/

"use strict";
Expand Down Expand Up @@ -11297,7 +11297,7 @@ var roots = new Map(),
devToolsConfig$jscomp$inline_1206 = {
findFiberByHostInstance: getInstanceFromNode,
bundleType: 0,
version: "19.0.0-rc-704aeed022-20240605",
version: "19.0.0-rc-99da76f23a-20240606",
rendererPackageName: "react-native-renderer",
rendererConfig: {
getInspectorDataForInstance: getInspectorDataForInstance,
Expand Down Expand Up @@ -11353,7 +11353,7 @@ var roots = new Map(),
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-rc-704aeed022-20240605"
reconcilerVersion: "19.0.0-rc-99da76f23a-20240606"
});
exports.createPortal = function (children, containerTag) {
return createPortal$1(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<36871355887c707a5517eb44a01a2206>>
* @generated SignedSource<<d1587f949b13da755b03e380d2d73e55>>
*/

'use strict';
Expand Down Expand Up @@ -26671,7 +26671,7 @@ identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, transition
return root;
}

var ReactVersion = '19.0.0-rc-704aeed022-20240605';
var ReactVersion = '19.0.0-rc-99da76f23a-20240606';

/*
* The `'' + value` pattern (used in perf-sensitive code) throws for Symbol
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<0a242b7dd2d895da557ece96fc0da4e9>>
* @generated SignedSource<<a0d46d7052e7fca848e4e7a7783e0915>>
*/

"use strict";
Expand Down Expand Up @@ -10734,11 +10734,11 @@ function traverseOwnerTreeUp(hierarchy, instance) {
traverseOwnerTreeUp(hierarchy, instance);
}
var isomorphicReactPackageVersion = React.version;
if ("19.0.0-rc-704aeed022-20240605" !== isomorphicReactPackageVersion)
if ("19.0.0-rc-99da76f23a-20240606" !== isomorphicReactPackageVersion)
throw Error(
'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n - react: ' +
(isomorphicReactPackageVersion +
"\n - react-native-renderer: 19.0.0-rc-704aeed022-20240605\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-native-renderer: 19.0.0-rc-99da76f23a-20240606\nLearn more: https://react.dev/warnings/version-mismatch")
);
if (
"function" !==
Expand Down Expand Up @@ -10788,7 +10788,7 @@ var roots = new Map(),
devToolsConfig$jscomp$inline_1193 = {
findFiberByHostInstance: getInstanceFromTag,
bundleType: 0,
version: "19.0.0-rc-704aeed022-20240605",
version: "19.0.0-rc-99da76f23a-20240606",
rendererPackageName: "react-native-renderer",
rendererConfig: {
getInspectorDataForInstance: getInspectorDataForInstance,
Expand Down Expand Up @@ -10831,7 +10831,7 @@ var internals$jscomp$inline_1440 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-rc-704aeed022-20240605"
reconcilerVersion: "19.0.0-rc-99da76f23a-20240606"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1441 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<7c2c802af35a63aadda960cebafa254b>>
* @generated SignedSource<<27e9662bdf0f1ffa6b921fa2abad124c>>
*/

"use strict";
Expand Down Expand Up @@ -11441,11 +11441,11 @@ function traverseOwnerTreeUp(hierarchy, instance) {
traverseOwnerTreeUp(hierarchy, instance);
}
var isomorphicReactPackageVersion = React.version;
if ("19.0.0-rc-704aeed022-20240605" !== isomorphicReactPackageVersion)
if ("19.0.0-rc-99da76f23a-20240606" !== isomorphicReactPackageVersion)
throw Error(
'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n - react: ' +
(isomorphicReactPackageVersion +
"\n - react-native-renderer: 19.0.0-rc-704aeed022-20240605\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-native-renderer: 19.0.0-rc-99da76f23a-20240606\nLearn more: https://react.dev/warnings/version-mismatch")
);
if (
"function" !==
Expand Down Expand Up @@ -11495,7 +11495,7 @@ var roots = new Map(),
devToolsConfig$jscomp$inline_1274 = {
findFiberByHostInstance: getInstanceFromTag,
bundleType: 0,
version: "19.0.0-rc-704aeed022-20240605",
version: "19.0.0-rc-99da76f23a-20240606",
rendererPackageName: "react-native-renderer",
rendererConfig: {
getInspectorDataForInstance: getInspectorDataForInstance,
Expand Down Expand Up @@ -11551,7 +11551,7 @@ var roots = new Map(),
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-rc-704aeed022-20240605"
reconcilerVersion: "19.0.0-rc-99da76f23a-20240606"
});
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = {
computeComponentStackForErrorReporting: function (reactTag) {
Expand Down

0 comments on commit 32d7ecf

Please sign in to comment.