diff --git a/frontend/src/component/feature/StrategyTypes/FlexibleStrategy/FlexibleStrategy.tsx b/frontend/src/component/feature/StrategyTypes/FlexibleStrategy/FlexibleStrategy.tsx index 43659c5ce5..d4fead7c3f 100644 --- a/frontend/src/component/feature/StrategyTypes/FlexibleStrategy/FlexibleStrategy.tsx +++ b/frontend/src/component/feature/StrategyTypes/FlexibleStrategy/FlexibleStrategy.tsx @@ -17,6 +17,8 @@ import Loader from '../../../common/Loader/Loader'; import { useEffect, useMemo } from 'react'; import { useRequiredPathParam } from 'hooks/useRequiredPathParam'; import { useLocation } from 'react-router'; +import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender'; +import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig'; interface IFlexibleStrategyProps { parameters: IFeatureStrategyParameters; @@ -33,6 +35,7 @@ const FlexibleStrategy = ({ const projectId = useRequiredPathParam('projectId'); const { defaultStickiness, loading } = useDefaultProjectSettings(projectId); const { pathname } = useLocation(); + const { uiConfig } = useUiConfig(); const isDefaultStrategyEdit = pathname.includes('default-strategy'); const onUpdate = (field: string) => (newValue: string) => { @@ -123,6 +126,34 @@ const FlexibleStrategy = ({ onChange={e => onUpdate('groupId')(e.target.value)} data-testid={FLEXIBLE_STRATEGY_GROUP_ID} /> + +
+ + Variant + + + onUpdate('variant')(e.target.value) + } + /> + + } + /> ); diff --git a/frontend/src/interfaces/uiConfig.ts b/frontend/src/interfaces/uiConfig.ts index 40fab365fe..bf466e0074 100644 --- a/frontend/src/interfaces/uiConfig.ts +++ b/frontend/src/interfaces/uiConfig.ts @@ -53,6 +53,7 @@ export interface IFlags { advancedPlayground?: boolean; customRootRoles?: boolean; strategySplittedButton?: boolean; + strategyVariant?: boolean; newProjectLayout?: boolean; } diff --git a/src/lib/__snapshots__/create-config.test.ts.snap b/src/lib/__snapshots__/create-config.test.ts.snap index a9ee577166..691d0652b2 100644 --- a/src/lib/__snapshots__/create-config.test.ts.snap +++ b/src/lib/__snapshots__/create-config.test.ts.snap @@ -89,7 +89,6 @@ exports[`should create default config 1`] = ` }, }, "migrationLock": false, - "newProjectLayout": false, "personalAccessTokensKillSwitch": false, "proPlanAutoCharge": false, "responseTimeWithAppNameKillSwitch": false, @@ -122,7 +121,6 @@ exports[`should create default config 1`] = ` }, }, "migrationLock": false, - "newProjectLayout": false, "personalAccessTokensKillSwitch": false, "proPlanAutoCharge": false, "responseTimeWithAppNameKillSwitch": false, diff --git a/src/lib/types/experimental.ts b/src/lib/types/experimental.ts index 8238f3710c..d524204d2b 100644 --- a/src/lib/types/experimental.ts +++ b/src/lib/types/experimental.ts @@ -24,6 +24,7 @@ export type IFlagKey = | 'advancedPlayground' | 'customRootRoles' | 'strategySplittedButton' + | 'strategyVariant' | 'newProjectLayout'; export type IFlags = Partial<{ [key in IFlagKey]: boolean | Variant }>; @@ -109,10 +110,6 @@ const flags: IFlags = { process.env.UNLEASH_EXPERIMENTAL_CUSTOM_ROOT_ROLES, false, ), - newProjectLayout: parseEnvVarBoolean( - process.env.UNLEASH_EXPERIMENTAL_NEW_PROJECT_LAYOUT, - false, - ), }; export const defaultExperimentalOptions: IExperimentalOptions = { diff --git a/src/server-dev.ts b/src/server-dev.ts index a880dfa077..be0b2807e0 100644 --- a/src/server-dev.ts +++ b/src/server-dev.ts @@ -40,6 +40,7 @@ process.nextTick(async () => { segmentContextFieldUsage: true, advancedPlayground: true, strategySplittedButton: true, + strategyVariant: true, newProjectLayout: true, }, },