[DevTools] Disable Activity slices by default (#35685)

This commit is contained in:
Sebastian "Sebbie" Silbermann
2026-02-04 10:56:33 +01:00
committed by GitHub
parent 3ce1316b05
commit c9ff56ec74
6 changed files with 7 additions and 1 deletions

View File

@@ -13,6 +13,7 @@
* It should always be imported from "react-devtools-feature-flags". * It should always be imported from "react-devtools-feature-flags".
************************************************************************/ ************************************************************************/
export const enableActivitySlices: boolean = false;
export const enableLogger: boolean = true; export const enableLogger: boolean = true;
export const enableStyleXFeatures: boolean = true; export const enableStyleXFeatures: boolean = true;
export const isInternalFacebookBuild: boolean = true; export const isInternalFacebookBuild: boolean = true;

View File

@@ -13,6 +13,7 @@
* It should always be imported from "react-devtools-feature-flags". * It should always be imported from "react-devtools-feature-flags".
************************************************************************/ ************************************************************************/
export const enableActivitySlices: boolean = __DEV__;
export const enableLogger: boolean = false; export const enableLogger: boolean = false;
export const enableStyleXFeatures: boolean = false; export const enableStyleXFeatures: boolean = false;
export const isInternalFacebookBuild: boolean = false; export const isInternalFacebookBuild: boolean = false;

View File

@@ -13,6 +13,7 @@
* It should always be imported from "react-devtools-feature-flags". * It should always be imported from "react-devtools-feature-flags".
************************************************************************/ ************************************************************************/
export const enableActivitySlices: boolean = __DEV__;
export const enableLogger: boolean = false; export const enableLogger: boolean = false;
export const enableStyleXFeatures: boolean = false; export const enableStyleXFeatures: boolean = false;
export const isInternalFacebookBuild: boolean = false; export const isInternalFacebookBuild: boolean = false;

View File

@@ -13,6 +13,7 @@
* It should always be imported from "react-devtools-feature-flags". * It should always be imported from "react-devtools-feature-flags".
************************************************************************/ ************************************************************************/
export const enableActivitySlices: boolean = false;
export const enableLogger: boolean = true; export const enableLogger: boolean = true;
export const enableStyleXFeatures: boolean = true; export const enableStyleXFeatures: boolean = true;
export const isInternalFacebookBuild: boolean = true; export const isInternalFacebookBuild: boolean = true;

View File

@@ -13,6 +13,7 @@
* It should always be imported from "react-devtools-feature-flags". * It should always be imported from "react-devtools-feature-flags".
************************************************************************/ ************************************************************************/
export const enableActivitySlices: boolean = __DEV__;
export const enableLogger: boolean = false; export const enableLogger: boolean = false;
export const enableStyleXFeatures: boolean = false; export const enableStyleXFeatures: boolean = false;
export const isInternalFacebookBuild: boolean = false; export const isInternalFacebookBuild: boolean = false;

View File

@@ -16,6 +16,7 @@ import {
Fragment, Fragment,
} from 'react'; } from 'react';
import {enableActivitySlices} from 'react-devtools-feature-flags';
import { import {
localStorageGetItem, localStorageGetItem,
localStorageSetItem, localStorageSetItem,
@@ -284,7 +285,7 @@ function SuspenseTab(_: {}) {
const {activities} = useContext(TreeStateContext); const {activities} = useContext(TreeStateContext);
// If there are no named Activity boundaries, we don't have any tree list and we should hide // If there are no named Activity boundaries, we don't have any tree list and we should hide
// both the panel and the button to toggle it. // both the panel and the button to toggle it.
const activityListDisabled = activities.length === 0; const activityListDisabled = !enableActivitySlices || activities.length === 0;
const wrapperTreeRef = useRef<null | HTMLElement>(null); const wrapperTreeRef = useRef<null | HTMLElement>(null);
const resizeTreeRef = useRef<null | HTMLElement>(null); const resizeTreeRef = useRef<null | HTMLElement>(null);