From eba41f48c62b3c1acb427c6649758465b507b668 Mon Sep 17 00:00:00 2001 From: Ruslan Lesiutin Date: Mon, 4 Mar 2024 13:37:24 +0000 Subject: [PATCH] feat: define react devtools experiment flag --- front_end/core/root/Runtime.ts | 1 + front_end/entrypoints/rn_inspector/rn_inspector.ts | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/front_end/core/root/Runtime.ts b/front_end/core/root/Runtime.ts index ab37521d381..867313644e1 100644 --- a/front_end/core/root/Runtime.ts +++ b/front_end/core/root/Runtime.ts @@ -314,6 +314,7 @@ export enum ExperimentName { HIGHLIGHT_ERRORS_ELEMENTS_PANEL = 'highlightErrorsElementsPanel', SET_ALL_BREAKPOINTS_EAGERLY = 'setAllBreakpointsEagerly', REACT_NATIVE_SPECIFIC_UI = 'reactNativeSpecificUI', + ENABLE_REACT_DEVTOOLS_PANEL = 'enableReactDevToolsPanel', } // TODO(crbug.com/1167717): Make this a const enum again diff --git a/front_end/entrypoints/rn_inspector/rn_inspector.ts b/front_end/entrypoints/rn_inspector/rn_inspector.ts index 40aafeab513..e771163ca00 100644 --- a/front_end/entrypoints/rn_inspector/rn_inspector.ts +++ b/front_end/entrypoints/rn_inspector/rn_inspector.ts @@ -13,6 +13,7 @@ import '../../panels/mobile_throttling/mobile_throttling-meta.js'; import '../../panels/network/network-meta.js'; import '../../panels/js_profiler/js_profiler-meta.js'; import '../../panels/rn_welcome/rn_welcome-meta.js'; +import '../../panels/react_devtools/react_devtools-meta.js'; import * as Root from '../../core/root/root.js'; import * as Main from '../main/main.js'; @@ -31,6 +32,12 @@ Root.Runtime.experiments.register( /* unstable */ false, ); +Root.Runtime.experiments.register( + Root.Runtime.ExperimentName.ENABLE_REACT_DEVTOOLS_PANEL, + 'Enable React DevTools panel', + /* unstable */ true, +); + Root.Runtime.experiments.enableExperimentsByDefault([ Root.Runtime.ExperimentName.JS_PROFILER_TEMP_ENABLE, Root.Runtime.ExperimentName.REACT_NATIVE_SPECIFIC_UI,