From b26fb8992d227a95ab12e441c2305a4d08800f47 Mon Sep 17 00:00:00 2001 From: "gitar-bot[bot]" <159877585+gitar-bot[bot]@users.noreply.github.com> Date: Fri, 30 Aug 2024 12:32:51 +0200 Subject: [PATCH] [Gitar] Cleaning up stale flag: killInsightsUI with value false (#8002) Co-authored-by: Gitar Co-authored-by: Tymoteusz Czech <2625371+Tymek@users.noreply.github.com> --- .../NavigationSidebar/NavigationList.tsx | 4 +--- .../src/component/menu/Header/OldHeader.tsx | 21 +------------------ .../__snapshots__/routes.test.tsx.snap | 1 - frontend/src/component/menu/routes.ts | 1 - frontend/src/interfaces/uiConfig.ts | 1 - .../__snapshots__/create-config.test.ts.snap | 1 - src/lib/types/experimental.ts | 5 ----- src/server-dev.ts | 1 - 8 files changed, 2 insertions(+), 33 deletions(-) diff --git a/frontend/src/component/layout/MainLayout/NavigationSidebar/NavigationList.tsx b/frontend/src/component/layout/MainLayout/NavigationSidebar/NavigationList.tsx index 69a767fd6a..a9dea5745f 100644 --- a/frontend/src/component/layout/MainLayout/NavigationSidebar/NavigationList.tsx +++ b/frontend/src/component/layout/MainLayout/NavigationSidebar/NavigationList.tsx @@ -20,7 +20,6 @@ import AccordionDetails from '@mui/material/AccordionDetails'; import AccordionSummary from '@mui/material/AccordionSummary'; import ExpandMoreIcon from '@mui/icons-material/ExpandMore'; import FlagIcon from '@mui/icons-material/OutlinedFlag'; -import { useUiFlag } from 'hooks/useUiFlag'; import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender'; import useProjectOverview from 'hooks/api/getters/useProjectOverview/useProjectOverview'; import { ProjectIcon } from 'component/common/ProjectIcon/ProjectIcon'; @@ -156,7 +155,6 @@ export const PrimaryNavigationList: FC<{ activeItem?: string; }> = ({ mode, onClick, activeItem }) => { const DynamicListItem = mode === 'mini' ? MiniListItem : FullListItem; - const killInsightsDashboard = useUiFlag('killInsightsUI'); const { isOss } = useUiConfig(); return ( @@ -186,7 +184,7 @@ export const PrimaryNavigationList: FC<{ ({ backgroundColor: theme.palette.background.paper, @@ -117,23 +116,6 @@ const styledIconProps = (theme: Theme) => ({ const StyledLink = styled(Link)(({ theme }) => focusable(theme)); -const StyledText = styled('div')(({ theme }) => ({ - display: 'flex', - alignItems: 'center', - gap: theme.spacing(1), -})); - -const StyledLinkWithBetaBadge = ({ - title, - to, -}: { title: string; to: string }) => ( - - - {title} Beta - - -); - const StyledIconButton = styled(IconButton)<{ component?: 'a' | 'button'; href?: string; @@ -164,7 +146,6 @@ const OldHeader: VFC = () => { const onAdminClose = () => setAdminRef(null); const onConfigureClose = () => setConfigRef(null); const celebatoryUnleash = useUiFlag('celebrateUnleash'); - const killInsightsDashboard = useUiFlag('killInsightsUI'); const routes = getRoutes(); const adminRoutes = useAdminRoutes(); @@ -242,7 +223,7 @@ const OldHeader: VFC = () => { Search Playground Insights } diff --git a/frontend/src/component/menu/__tests__/__snapshots__/routes.test.tsx.snap b/frontend/src/component/menu/__tests__/__snapshots__/routes.test.tsx.snap index e347aed92c..e2f37b7f97 100644 --- a/frontend/src/component/menu/__tests__/__snapshots__/routes.test.tsx.snap +++ b/frontend/src/component/menu/__tests__/__snapshots__/routes.test.tsx.snap @@ -129,7 +129,6 @@ exports[`returns all baseRoutes 1`] = ` "menu": { "mobile": true, }, - "notFlag": "killInsightsUI", "path": "/insights", "title": "Insights", "type": "protected", diff --git a/frontend/src/component/menu/routes.ts b/frontend/src/component/menu/routes.ts index 425a87a539..c3ef2dc840 100644 --- a/frontend/src/component/menu/routes.ts +++ b/frontend/src/component/menu/routes.ts @@ -151,7 +151,6 @@ export const routes: IRoute[] = [ component: Insights, type: 'protected', menu: { mobile: true }, - notFlag: 'killInsightsUI', enterprise: true, }, diff --git a/frontend/src/interfaces/uiConfig.ts b/frontend/src/interfaces/uiConfig.ts index d4a6167e6d..cc0d7b1cad 100644 --- a/frontend/src/interfaces/uiConfig.ts +++ b/frontend/src/interfaces/uiConfig.ts @@ -72,7 +72,6 @@ export type UiFlags = { featureSearchFeedback?: Variant; enableLicense?: boolean; adminTokenKillSwitch?: boolean; - killInsightsUI?: boolean; feedbackComments?: Variant; displayUpgradeEdgeBanner?: boolean; showInactiveUsers?: boolean; diff --git a/src/lib/__snapshots__/create-config.test.ts.snap b/src/lib/__snapshots__/create-config.test.ts.snap index ed07befc77..bea5edc43e 100644 --- a/src/lib/__snapshots__/create-config.test.ts.snap +++ b/src/lib/__snapshots__/create-config.test.ts.snap @@ -120,7 +120,6 @@ exports[`should create default config 1`] = ` }, "filterInvalidClientMetrics": false, "googleAuthEnabled": false, - "killInsightsUI": false, "killScheduledChangeRequestCache": false, "maintenanceMode": false, "manyStrategiesPagination": false, diff --git a/src/lib/types/experimental.ts b/src/lib/types/experimental.ts index 906c6cd082..037d84ba6d 100644 --- a/src/lib/types/experimental.ts +++ b/src/lib/types/experimental.ts @@ -34,7 +34,6 @@ export type IFlagKey = | 'edgeBulkMetrics' | 'extendedUsageMetrics' | 'adminTokenKillSwitch' - | 'killInsightsUI' | 'feedbackComments' | 'showInactiveUsers' | 'killScheduledChangeRequestCache' @@ -182,10 +181,6 @@ const flags: IFlags = { process.env.UNLEASH_EXPERIMENTAL_ADMIN_TOKEN_KILL_SWITCH, false, ), - killInsightsUI: parseEnvVarBoolean( - process.env.UNLEASH_EXPERIMENTAL_KILL_INSIGHTS_UI, - false, - ), outdatedSdksBanner: parseEnvVarBoolean( process.env.UNLEASH_EXPERIMENTAL_OUTDATED_SDKS_BANNER, false, diff --git a/src/server-dev.ts b/src/server-dev.ts index 7f4f0c1ffa..11fefe8b6e 100644 --- a/src/server-dev.ts +++ b/src/server-dev.ts @@ -43,7 +43,6 @@ process.nextTick(async () => { stripHeadersOnAPI: true, celebrateUnleash: true, featureSearchFeedbackPosting: true, - killInsightsUI: false, userAccessUIEnabled: true, outdatedSdksBanner: true, disableShowContextFieldSelectionValues: false,