From ca16e934027f664189a54c410f42db8e209d5ec9 Mon Sep 17 00:00:00 2001 From: Harry Zumwalt Date: Mon, 3 Apr 2023 11:52:10 -0500 Subject: [PATCH 1/4] Pass icon to create method and remove emoji if edge. --- packages/react-devtools-extensions/src/main.js | 8 ++++---- packages/shared/ReactVersion.js | 17 +---------------- 2 files changed, 5 insertions(+), 20 deletions(-) diff --git a/packages/react-devtools-extensions/src/main.js b/packages/react-devtools-extensions/src/main.js index 95d36f1915e53..0f745f3baff81 100644 --- a/packages/react-devtools-extensions/src/main.js +++ b/packages/react-devtools-extensions/src/main.js @@ -472,8 +472,8 @@ function createPanelIfReactLoaded() { let needsToSyncElementSelection = false; chrome.devtools.panels.create( - IS_CHROME || IS_EDGE ? '⚛️ Components' : 'Components', - '', + IS_CHROME ? '⚛️ Components' : 'Components', + 'icons/production.svg', 'panel.html', extensionPanel => { extensionPanel.onShown.addListener(panel => { @@ -503,8 +503,8 @@ function createPanelIfReactLoaded() { ); chrome.devtools.panels.create( - IS_CHROME || IS_EDGE ? '⚛️ Profiler' : 'Profiler', - '', + IS_CHROME ? '⚛️ Profiler' : 'Profiler', + 'icons/production.svg', 'panel.html', extensionPanel => { extensionPanel.onShown.addListener(panel => { diff --git a/packages/shared/ReactVersion.js b/packages/shared/ReactVersion.js index d0a14cfff7806..9055167e29cc5 100644 --- a/packages/shared/ReactVersion.js +++ b/packages/shared/ReactVersion.js @@ -1,16 +1 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -// TODO: this is special because it gets imported during build. -// -// TODO: 18.0.0 has not been released to NPM; -// It exists as a placeholder so that DevTools can support work tag changes between releases. -// When we next publish a release, update the matching TODO in backend/renderer.js -// TODO: This module is used both by the release scripts and to expose a version -// at runtime. We should instead inject the version number as part of the build -// process, and use the ReactVersions.js module as the single source of truth. -export default '18.2.0'; +export default '18.3.0-PLACEHOLDER'; From d825429199096111c1e36119f913006d86f3f11f Mon Sep 17 00:00:00 2001 From: Harry Zumwalt Date: Thu, 6 Apr 2023 14:46:06 -0500 Subject: [PATCH 2/4] Re-add check for isEdge, and conditionally pass icon. --- packages/react-devtools-extensions/src/main.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/react-devtools-extensions/src/main.js b/packages/react-devtools-extensions/src/main.js index 0f745f3baff81..85562cbb88b54 100644 --- a/packages/react-devtools-extensions/src/main.js +++ b/packages/react-devtools-extensions/src/main.js @@ -472,8 +472,8 @@ function createPanelIfReactLoaded() { let needsToSyncElementSelection = false; chrome.devtools.panels.create( - IS_CHROME ? '⚛️ Components' : 'Components', - 'icons/production.svg', + IS_CHROME || IS_EDGE ? '⚛️ Components' : 'Components', + IS_EDGE ? 'icons/production.svg' : '', 'panel.html', extensionPanel => { extensionPanel.onShown.addListener(panel => { @@ -503,8 +503,8 @@ function createPanelIfReactLoaded() { ); chrome.devtools.panels.create( - IS_CHROME ? '⚛️ Profiler' : 'Profiler', - 'icons/production.svg', + IS_CHROME || IS_EDGE ? '⚛️ Profiler' : 'Profiler', + IS_EDGE ? 'icons/production.svg' : '', 'panel.html', extensionPanel => { extensionPanel.onShown.addListener(panel => { From 301394d1d3e7b82952f7d62006bc213f9750bd46 Mon Sep 17 00:00:00 2001 From: Harry Zumwalt Date: Thu, 6 Apr 2023 21:16:40 -0500 Subject: [PATCH 3/4] Revert ReactVersion.js --- packages/shared/ReactVersion.js | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/packages/shared/ReactVersion.js b/packages/shared/ReactVersion.js index 9055167e29cc5..bb90dec81ac20 100644 --- a/packages/shared/ReactVersion.js +++ b/packages/shared/ReactVersion.js @@ -1 +1,16 @@ -export default '18.3.0-PLACEHOLDER'; +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +// TODO: this is special because it gets imported during build. +// +// TODO: 18.0.0 has not been released to NPM; +// It exists as a placeholder so that DevTools can support work tag changes between releases. +// When we next publish a release, update the matching TODO in backend/renderer.js +// TODO: This module is used both by the release scripts and to expose a version +// at runtime. We should instead inject the version number as part of the build +// process, and use the ReactVersions.js module as the single source of truth. +export default '18.2.0'; \ No newline at end of file From 0c7d2ccbc8ab06fd3a20a195f740c3dd31bd40f7 Mon Sep 17 00:00:00 2001 From: Harry Zumwalt Date: Thu, 6 Apr 2023 21:18:28 -0500 Subject: [PATCH 4/4] New line at end of file. --- packages/shared/ReactVersion.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/shared/ReactVersion.js b/packages/shared/ReactVersion.js index bb90dec81ac20..d0a14cfff7806 100644 --- a/packages/shared/ReactVersion.js +++ b/packages/shared/ReactVersion.js @@ -13,4 +13,4 @@ // TODO: This module is used both by the release scripts and to expose a version // at runtime. We should instead inject the version number as part of the build // process, and use the ReactVersions.js module as the single source of truth. -export default '18.2.0'; \ No newline at end of file +export default '18.2.0';