Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: define react devtools experiment flag #6

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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';
Copy link

@EdmondChuiHW EdmondChuiHW Mar 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this file isn't ready yet and the import statement wasn't intended for this PR. It's crashing the RN Inspector landing page so it's remove the line until the file is ready (or add an empty stub file for now)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, you are right, somehow slipped in this PR, will fix that


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
Loading