Provide icon to edge devtools. (#26543)

<!--
  Thanks for submitting a pull request!
We appreciate you spending the time to work on these changes. Please
provide enough information so that others can review your pull request.
The three fields below are mandatory.

Before submitting a pull request, please make sure the following is
done:

1. Fork [the repository](https://github.com/facebook/react) and create
your branch from `main`.
  2. Run `yarn` in the repository root.
3. If you've fixed a bug or added code that should be tested, add tests!
4. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch
TestName` is helpful in development.
5. Run `yarn test --prod` to test in the production environment. It
supports the same options as `yarn test`.
6. If you need a debugger, run `yarn test --debug --watch TestName`,
open `chrome://inspect`, and press "Inspect".
7. Format your code with
[prettier](https://github.com/prettier/prettier) (`yarn prettier`).
8. Make sure your code lints (`yarn lint`). Tip: `yarn linc` to only
check changed files.
  9. Run the [Flow](https://flowtype.org/) type checks (`yarn flow`).
  10. If you haven't already, complete the CLA.

Learn more about contributing:
https://reactjs.org/docs/how-to-contribute.html
-->

## Summary
Addresses #26352.

This PR explicitly passes an icon to `chrome.devtools.panels.create()`,
so that edge devtools will display the icon when in [Focus
Mode](https://learn.microsoft.com/en-us/microsoft-edge/devtools-guide-chromium/experimental-features/focus-mode).

<!--
Explain the **motivation** for making this change. What existing problem
does the pull request solve?
-->

## How did you test this change?
Passing test suite (`yarn test` & `yarn test --prod`) 
Passing lint (`yarn linc`) 
Passing type checks (`yarn flow`) 

**Visual Testing**

Before Changes             | After Changes
:-------------------------:|:-------------------------:

![](https://user-images.githubusercontent.com/15645169/229591145-fe99df06-e2e3-4f21-ae31-f770d584ca6c.png)
|
![](https://user-images.githubusercontent.com/15645169/229591594-26c6cbaf-f345-4367-b234-8f3c8ab3ccb1.png)
<!--
Demonstrate the code is solid. Example: The exact commands you ran and
their output, screenshots / videos if the pull request changes the user
interface.
How exactly did you verify that your PR solves the issue you wanted to
solve?
  If you leave this empty, your PR will very likely be closed.
-->

DiffTrain build for commit https://github.com/facebook/react/commit/5426af3d50ff706f3ebeb4764f838e0a3812bf9a.
This commit is contained in:
mondaychen
2023-04-11 18:46:59 +00:00
parent 5f760fba30
commit e200362bbd
13 changed files with 19 additions and 19 deletions
@@ -23752,7 +23752,7 @@ function createFiberRoot(
return root;
}
var ReactVersion = "18.3.0-next-f9de24a26-20230411";
var ReactVersion = "18.3.0-next-5426af3d5-20230411";
// Might add PROFILE later.
@@ -8610,7 +8610,7 @@ var devToolsConfig$jscomp$inline_1021 = {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 0,
version: "18.3.0-next-f9de24a26-20230411",
version: "18.3.0-next-5426af3d5-20230411",
rendererPackageName: "react-test-renderer"
};
var internals$jscomp$inline_1204 = {
@@ -8641,7 +8641,7 @@ var internals$jscomp$inline_1204 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-f9de24a26-20230411"
reconcilerVersion: "18.3.0-next-5426af3d5-20230411"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1205 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -9036,7 +9036,7 @@ var devToolsConfig$jscomp$inline_1063 = {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 0,
version: "18.3.0-next-f9de24a26-20230411",
version: "18.3.0-next-5426af3d5-20230411",
rendererPackageName: "react-test-renderer"
};
var internals$jscomp$inline_1245 = {
@@ -9067,7 +9067,7 @@ var internals$jscomp$inline_1245 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-f9de24a26-20230411"
reconcilerVersion: "18.3.0-next-5426af3d5-20230411"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1246 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -27,7 +27,7 @@ if (
}
"use strict";
var ReactVersion = "18.3.0-next-f9de24a26-20230411";
var ReactVersion = "18.3.0-next-5426af3d5-20230411";
// ATTENTION
// When adding new symbols to this file,
@@ -639,4 +639,4 @@ exports.useSyncExternalStore = function (
);
};
exports.useTransition = useTransition;
exports.version = "18.3.0-next-f9de24a26-20230411";
exports.version = "18.3.0-next-5426af3d5-20230411";
@@ -642,7 +642,7 @@ exports.useSyncExternalStore = function (
);
};
exports.useTransition = useTransition;
exports.version = "18.3.0-next-f9de24a26-20230411";
exports.version = "18.3.0-next-5426af3d5-20230411";
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
if (
@@ -1 +1 @@
f9de24a26af23ce63b6f0474670870c86e1a631c
5426af3d50ff706f3ebeb4764f838e0a3812bf9a
@@ -27059,7 +27059,7 @@ function createFiberRoot(
return root;
}
var ReactVersion = "18.3.0-next-f9de24a26-20230411";
var ReactVersion = "18.3.0-next-5426af3d5-20230411";
function createPortal$1(
children,
@@ -9479,7 +9479,7 @@ var roots = new Map(),
devToolsConfig$jscomp$inline_1045 = {
findFiberByHostInstance: getInstanceFromNode,
bundleType: 0,
version: "18.3.0-next-f9de24a26-20230411",
version: "18.3.0-next-5426af3d5-20230411",
rendererPackageName: "react-native-renderer",
rendererConfig: {
getInspectorDataForViewTag: function () {
@@ -9521,7 +9521,7 @@ var internals$jscomp$inline_1274 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-f9de24a26-20230411"
reconcilerVersion: "18.3.0-next-5426af3d5-20230411"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1275 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -10188,7 +10188,7 @@ var roots = new Map(),
devToolsConfig$jscomp$inline_1123 = {
findFiberByHostInstance: getInstanceFromNode,
bundleType: 0,
version: "18.3.0-next-f9de24a26-20230411",
version: "18.3.0-next-5426af3d5-20230411",
rendererPackageName: "react-native-renderer",
rendererConfig: {
getInspectorDataForViewTag: function () {
@@ -10243,7 +10243,7 @@ var roots = new Map(),
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-f9de24a26-20230411"
reconcilerVersion: "18.3.0-next-5426af3d5-20230411"
});
exports.createPortal = function (children, containerTag) {
return createPortal$1(
@@ -27572,7 +27572,7 @@ function createFiberRoot(
return root;
}
var ReactVersion = "18.3.0-next-f9de24a26-20230411";
var ReactVersion = "18.3.0-next-5426af3d5-20230411";
function createPortal$1(
children,
@@ -9738,7 +9738,7 @@ var roots = new Map(),
devToolsConfig$jscomp$inline_1100 = {
findFiberByHostInstance: getInstanceFromTag,
bundleType: 0,
version: "18.3.0-next-f9de24a26-20230411",
version: "18.3.0-next-5426af3d5-20230411",
rendererPackageName: "react-native-renderer",
rendererConfig: {
getInspectorDataForViewTag: function () {
@@ -9780,7 +9780,7 @@ var internals$jscomp$inline_1343 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-f9de24a26-20230411"
reconcilerVersion: "18.3.0-next-5426af3d5-20230411"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1344 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -10447,7 +10447,7 @@ var roots = new Map(),
devToolsConfig$jscomp$inline_1178 = {
findFiberByHostInstance: getInstanceFromTag,
bundleType: 0,
version: "18.3.0-next-f9de24a26-20230411",
version: "18.3.0-next-5426af3d5-20230411",
rendererPackageName: "react-native-renderer",
rendererConfig: {
getInspectorDataForViewTag: function () {
@@ -10502,7 +10502,7 @@ var roots = new Map(),
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-f9de24a26-20230411"
reconcilerVersion: "18.3.0-next-5426af3d5-20230411"
});
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = {
computeComponentStackForErrorReporting: function (reactTag) {