From fbcda19a23da819889afdd7164b29c556fbcfc7a Mon Sep 17 00:00:00 2001 From: Ricky Date: Mon, 17 Mar 2025 12:14:19 -0400 Subject: [PATCH] [devtools] add filters for internal builds (#32646) We don't have an experimental-only build of devtools, but we can at least add these filters to the internal build. A better way would be to use feature detection, but I'm not sure how and this isn't a very heavily used feautre. --- .../views/Settings/ComponentsSettings.js | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/packages/react-devtools-shared/src/devtools/views/Settings/ComponentsSettings.js b/packages/react-devtools-shared/src/devtools/views/Settings/ComponentsSettings.js index e9e4f07616..4309b0e5fb 100644 --- a/packages/react-devtools-shared/src/devtools/views/Settings/ComponentsSettings.js +++ b/packages/react-devtools-shared/src/devtools/views/Settings/ComponentsSettings.js @@ -42,6 +42,8 @@ import { ElementTypeOtherOrUnknown, ElementTypeProfiler, ElementTypeSuspense, + ElementTypeActivity, + ElementTypeViewTransition, } from 'react-devtools-shared/src/frontend/types'; import {getDefaultOpenInEditorURL} from 'react-devtools-shared/src/utils'; @@ -56,6 +58,7 @@ import type { RegExpComponentFilter, EnvironmentNameComponentFilter, } from 'react-devtools-shared/src/frontend/types'; +import {isInternalFacebookBuild} from 'react-devtools-feature-flags'; const vscodeFilepath = 'vscode://file/{path}:{line}'; @@ -472,8 +475,9 @@ export default function ComponentsSettings({ ((parseInt(currentTarget.value, 10): any): ElementType), ) }> - {/* TODO: currently only experimental, only list this if it's available */} - {/**/} + {isInternalFacebookBuild && ( + + )} @@ -487,10 +491,11 @@ export default function ComponentsSettings({ - {/* TODO: currently only experimental, only list this if it's available */} - {/**/} + {isInternalFacebookBuild && ( + + )} )} {(componentFilter.type === ComponentFilterLocation ||