Skip to content

Commit c9ff56e

Browse files
authored
[DevTools] Disable Activity slices by default (#35685)
1 parent 3ce1316 commit c9ff56e

File tree

6 files changed

+7
-1
lines changed

6 files changed

+7
-1
lines changed

packages/react-devtools-shared/src/config/DevToolsFeatureFlags.core-fb.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* It should always be imported from "react-devtools-feature-flags".
1414
************************************************************************/
1515

16+
export const enableActivitySlices: boolean = false;
1617
export const enableLogger: boolean = true;
1718
export const enableStyleXFeatures: boolean = true;
1819
export const isInternalFacebookBuild: boolean = true;

packages/react-devtools-shared/src/config/DevToolsFeatureFlags.core-oss.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* It should always be imported from "react-devtools-feature-flags".
1414
************************************************************************/
1515

16+
export const enableActivitySlices: boolean = __DEV__;
1617
export const enableLogger: boolean = false;
1718
export const enableStyleXFeatures: boolean = false;
1819
export const isInternalFacebookBuild: boolean = false;

packages/react-devtools-shared/src/config/DevToolsFeatureFlags.default.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* It should always be imported from "react-devtools-feature-flags".
1414
************************************************************************/
1515

16+
export const enableActivitySlices: boolean = __DEV__;
1617
export const enableLogger: boolean = false;
1718
export const enableStyleXFeatures: boolean = false;
1819
export const isInternalFacebookBuild: boolean = false;

packages/react-devtools-shared/src/config/DevToolsFeatureFlags.extension-fb.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* It should always be imported from "react-devtools-feature-flags".
1414
************************************************************************/
1515

16+
export const enableActivitySlices: boolean = false;
1617
export const enableLogger: boolean = true;
1718
export const enableStyleXFeatures: boolean = true;
1819
export const isInternalFacebookBuild: boolean = true;

packages/react-devtools-shared/src/config/DevToolsFeatureFlags.extension-oss.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* It should always be imported from "react-devtools-feature-flags".
1414
************************************************************************/
1515

16+
export const enableActivitySlices: boolean = __DEV__;
1617
export const enableLogger: boolean = false;
1718
export const enableStyleXFeatures: boolean = false;
1819
export const isInternalFacebookBuild: boolean = false;

packages/react-devtools-shared/src/devtools/views/SuspenseTab/SuspenseTab.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import {
1616
Fragment,
1717
} from 'react';
1818

19+
import {enableActivitySlices} from 'react-devtools-feature-flags';
1920
import {
2021
localStorageGetItem,
2122
localStorageSetItem,
@@ -284,7 +285,7 @@ function SuspenseTab(_: {}) {
284285
const {activities} = useContext(TreeStateContext);
285286
// If there are no named Activity boundaries, we don't have any tree list and we should hide
286287
// both the panel and the button to toggle it.
287-
const activityListDisabled = activities.length === 0;
288+
const activityListDisabled = !enableActivitySlices || activities.length === 0;
288289

289290
const wrapperTreeRef = useRef<null | HTMLElement>(null);
290291
const resizeTreeRef = useRef<null | HTMLElement>(null);

0 commit comments

Comments
 (0)