+
+ {hideSuspenseTab && (
+
+ The Suspense tab will be hidden when DevTools is opened in a new
+ tab, or when DevTools is reopened in the current tab.
+
+ )}
+
+
{showBackendVersion && (
diff --git a/packages/react-devtools-shared/src/devtools/views/Settings/ProfilerSettings.js b/packages/react-devtools-shared/src/devtools/views/Settings/ProfilerSettings.js
index 75bb97d902e2..90b257accddb 100644
--- a/packages/react-devtools-shared/src/devtools/views/Settings/ProfilerSettings.js
+++ b/packages/react-devtools-shared/src/devtools/views/Settings/ProfilerSettings.js
@@ -11,6 +11,7 @@ import * as React from 'react';
import {useCallback, useContext, useMemo, useRef} from 'react';
import {useSubscription} from '../hooks';
import {StoreContext} from '../context';
+import {SettingsContext} from './SettingsContext';
import {ProfilerContext} from 'react-devtools-shared/src/devtools/views/Profiler/ProfilerContext';
import styles from './SettingsShared.css';
@@ -23,6 +24,7 @@ export default function ProfilerSettings(_: {}): React.Node {
setIsCommitFilterEnabled,
setMinCommitDuration,
} = useContext(ProfilerContext);
+ const {hideProfilerTab, setHideProfilerTab} = useContext(SettingsContext);
const store = useContext(StoreContext);
const recordChangeDescriptionsSubscription = useMemo(
@@ -102,6 +104,25 @@ export default function ProfilerSettings(_: {}): React.Node {
(ms)
+
+
+ {hideProfilerTab && (
+
+ The Profiler tab will be hidden when DevTools is opened in a new
+ tab, or when DevTools is reopened in the current tab.
+
+ )}
+
);
}
diff --git a/packages/react-devtools-shared/src/devtools/views/Settings/SettingsContext.js b/packages/react-devtools-shared/src/devtools/views/Settings/SettingsContext.js
index c20249e89942..51fc1110543b 100644
--- a/packages/react-devtools-shared/src/devtools/views/Settings/SettingsContext.js
+++ b/packages/react-devtools-shared/src/devtools/views/Settings/SettingsContext.js
@@ -19,6 +19,8 @@ import {
} from 'react';
import {
LOCAL_STORAGE_BROWSER_THEME,
+ LOCAL_STORAGE_HIDE_PROFILER_TAB_KEY,
+ LOCAL_STORAGE_HIDE_SUSPENSE_TAB_KEY,
LOCAL_STORAGE_PARSE_HOOK_NAMES_KEY,
LOCAL_STORAGE_TRACE_UPDATES_ENABLED_KEY,
} from 'react-devtools-shared/src/constants';
@@ -53,6 +55,12 @@ type Context = {
traceUpdatesEnabled: boolean,
setTraceUpdatesEnabled: (value: boolean) => void,
+
+ hideProfilerTab: boolean,
+ setHideProfilerTab: (value: boolean) => void,
+
+ hideSuspenseTab: boolean,
+ setHideSuspenseTab: (value: boolean) => void,
};
const SettingsContext: ReactContext