From 44521c1c740ef1b00e396eeb9fc89450d84d6a0a Mon Sep 17 00:00:00 2001 From: Mateusz Kwasniewski Date: Thu, 25 Apr 2024 11:07:16 +0200 Subject: [PATCH] chore: remove variant dependencies flag (#6896) --- .../feature/Dependencies/AddDependencyDialogue.test.tsx | 3 --- .../feature/Dependencies/AddDependencyDialogue.tsx | 6 +----- .../FeatureOverviewSidePanelDetails.test.tsx | 3 --- frontend/src/interfaces/uiConfig.ts | 1 - src/lib/__snapshots__/create-config.test.ts.snap | 1 - src/lib/types/experimental.ts | 5 ----- src/server-dev.ts | 1 - 7 files changed, 1 insertion(+), 19 deletions(-) diff --git a/frontend/src/component/feature/Dependencies/AddDependencyDialogue.test.tsx b/frontend/src/component/feature/Dependencies/AddDependencyDialogue.test.tsx index 64f04fc9d0..80d26129d8 100644 --- a/frontend/src/component/feature/Dependencies/AddDependencyDialogue.test.tsx +++ b/frontend/src/component/feature/Dependencies/AddDependencyDialogue.test.tsx @@ -14,9 +14,6 @@ const setupApi = () => { versionInfo: { current: { oss: 'irrelevant', enterprise: 'some value' }, }, - flags: { - variantDependencies: true, - }, }); testServerRoute( diff --git a/frontend/src/component/feature/Dependencies/AddDependencyDialogue.tsx b/frontend/src/component/feature/Dependencies/AddDependencyDialogue.tsx index 7d2a24c342..2f726d6c27 100644 --- a/frontend/src/component/feature/Dependencies/AddDependencyDialogue.tsx +++ b/frontend/src/component/feature/Dependencies/AddDependencyDialogue.tsx @@ -4,7 +4,6 @@ import { Dialogue } from 'component/common/Dialogue/Dialogue'; import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender'; import { useChangeRequestsEnabled } from 'hooks/useChangeRequestsEnabled'; import { DependenciesUpgradeAlert } from './DependenciesUpgradeAlert'; -import { useUiFlag } from 'hooks/useUiFlag'; import type { IDependency } from '../../../interfaces/featureToggle'; import { ParentVariantOptions } from './ParentVariantOptions'; import { type ParentValue, REMOVE_DEPENDENCY_OPTION } from './constants'; @@ -64,12 +63,9 @@ export const AddDependencyDialogue = ({ const { isChangeRequestConfiguredInAnyEnv } = useChangeRequestsEnabled(project); - const variantDependenciesEnabled = useUiFlag('variantDependencies'); - const showStatus = - parent !== REMOVE_DEPENDENCY_OPTION.key && variantDependenciesEnabled; + const showStatus = parent !== REMOVE_DEPENDENCY_OPTION.key; const showVariants = parent !== REMOVE_DEPENDENCY_OPTION.key && - variantDependenciesEnabled && parentValue.status === 'enabled_with_variants'; const selectStatus = (value: string) => { diff --git a/frontend/src/component/feature/FeatureView/FeatureOverview/FeatureOverviewSidePanel/FeatureOverviewSidePanelDetails/FeatureOverviewSidePanelDetails.test.tsx b/frontend/src/component/feature/FeatureView/FeatureOverview/FeatureOverviewSidePanel/FeatureOverviewSidePanelDetails/FeatureOverviewSidePanelDetails.test.tsx index 69e50c3fa7..bf92921f8d 100644 --- a/frontend/src/component/feature/FeatureView/FeatureOverview/FeatureOverviewSidePanel/FeatureOverviewSidePanelDetails/FeatureOverviewSidePanelDetails.test.tsx +++ b/frontend/src/component/feature/FeatureView/FeatureOverview/FeatureOverviewSidePanel/FeatureOverviewSidePanelDetails/FeatureOverviewSidePanelDetails.test.tsx @@ -13,9 +13,6 @@ const setupApi = () => { versionInfo: { current: { oss: 'irrelevant', enterprise: 'some value' }, }, - flags: { - variantDependencies: true, - }, }); testServerRoute(server, '/api/admin/projects/default/features/feature', {}); testServerRoute( diff --git a/frontend/src/interfaces/uiConfig.ts b/frontend/src/interfaces/uiConfig.ts index c63f4422af..1f540efe04 100644 --- a/frontend/src/interfaces/uiConfig.ts +++ b/frontend/src/interfaces/uiConfig.ts @@ -78,7 +78,6 @@ export type UiFlags = { projectOverviewRefactor?: string; displayTrafficDataUsage?: boolean; disableShowContextFieldSelectionValues?: boolean; - variantDependencies?: boolean; projectOverviewRefactorFeedback?: boolean; featureLifecycle?: boolean; scimApi?: boolean; diff --git a/src/lib/__snapshots__/create-config.test.ts.snap b/src/lib/__snapshots__/create-config.test.ts.snap index bbac2a4c4f..36b3cf5d2a 100644 --- a/src/lib/__snapshots__/create-config.test.ts.snap +++ b/src/lib/__snapshots__/create-config.test.ts.snap @@ -149,7 +149,6 @@ exports[`should create default config 1`] = ` "strictSchemaValidation": false, "useMemoizedActiveTokens": false, "userAccessUIEnabled": false, - "variantDependencies": false, }, "externalResolver": { "getVariant": [Function], diff --git a/src/lib/types/experimental.ts b/src/lib/types/experimental.ts index e88c4d919d..37f86ccd89 100644 --- a/src/lib/types/experimental.ts +++ b/src/lib/types/experimental.ts @@ -52,7 +52,6 @@ export type IFlagKey = | 'scimApi' | 'displayEdgeBanner' | 'projectOverviewRefactor' - | 'variantDependencies' | 'disableShowContextFieldSelectionValues' | 'bearerTokenMiddleware' | 'projectOverviewRefactorFeedback' @@ -262,10 +261,6 @@ const flags: IFlags = { .UNLEASH_EXPERIMENTAL_DISABLE_SHOW_CONTEXT_FIELD_SELECTION_VALUES, false, ), - variantDependencies: parseEnvVarBoolean( - process.env.UNLEASH_EXPERIMENTAL_VARIANT_DEPENDENCIES, - false, - ), bearerTokenMiddleware: parseEnvVarBoolean( process.env.UNLEASH_EXPERIMENTAL_BEARER_TOKEN_MIDDLEWARE, false, diff --git a/src/server-dev.ts b/src/server-dev.ts index 1f32df962d..7f08f3efe1 100644 --- a/src/server-dev.ts +++ b/src/server-dev.ts @@ -49,7 +49,6 @@ process.nextTick(async () => { outdatedSdksBanner: true, projectOverviewRefactor: true, disableShowContextFieldSelectionValues: false, - variantDependencies: true, projectOverviewRefactorFeedback: true, featureLifecycle: true, projectListFilterMyProjects: true,