Skip to content

Commit

Permalink
feat: define react devtools experiment flag
Browse files Browse the repository at this point in the history
  • Loading branch information
hoxyq committed Mar 4, 2024
1 parent 9ceb0ad commit eba41f4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions front_end/core/root/Runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions front_end/entrypoints/rn_inspector/rn_inspector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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,
Expand Down

0 comments on commit eba41f4

Please sign in to comment.