diff --git a/frontend/src/component/feature/FeatureView/FeatureVariants/FeatureEnvironmentVariants/EnvironmentVariantsModal/VariantForm/VariantForm.tsx b/frontend/src/component/feature/FeatureView/FeatureVariants/FeatureEnvironmentVariants/EnvironmentVariantsModal/VariantForm/VariantForm.tsx index 13b5433c81..92a1318324 100644 --- a/frontend/src/component/feature/FeatureView/FeatureVariants/FeatureEnvironmentVariants/EnvironmentVariantsModal/VariantForm/VariantForm.tsx +++ b/frontend/src/component/feature/FeatureView/FeatureVariants/FeatureEnvironmentVariants/EnvironmentVariantsModal/VariantForm/VariantForm.tsx @@ -145,6 +145,7 @@ const payloadOptions = [ { key: 'string', label: 'string' }, { key: 'json', label: 'json' }, { key: 'csv', label: 'csv' }, + { key: 'number', label: 'number' }, ]; const EMPTY_PAYLOAD = { type: 'string', value: '' }; @@ -198,17 +199,6 @@ export const VariantForm = ({ const [errors, setErrors] = useState({}); - const variantTypeNumber = useUiFlag('variantTypeNumber'); - - useEffect(() => { - if ( - variantTypeNumber && - !payloadOptions.some((option) => option.key === 'number') - ) { - payloadOptions.push({ key: 'number', label: 'number' }); - } - }, [variantTypeNumber]); - const clearError = (field: ErrorField) => { setErrors((errors) => ({ ...errors, [field]: undefined })); }; @@ -300,7 +290,7 @@ export const VariantForm = ({ if (payload.type === 'json') { JSON.parse(payload.value); } - if (variantTypeNumber && payload.type === 'number') { + if (payload.type === 'number') { return !Number.isNaN(Number(payload.value)); } return true; diff --git a/frontend/src/interfaces/uiConfig.ts b/frontend/src/interfaces/uiConfig.ts index f27115dddc..ea518783e9 100644 --- a/frontend/src/interfaces/uiConfig.ts +++ b/frontend/src/interfaces/uiConfig.ts @@ -61,7 +61,6 @@ export type UiFlags = { customRootRolesKillSwitch?: boolean; strategyVariant?: boolean; doraMetrics?: boolean; - variantTypeNumber?: boolean; privateProjects?: boolean; dependentFeatures?: boolean; banners?: boolean; diff --git a/src/lib/__snapshots__/create-config.test.ts.snap b/src/lib/__snapshots__/create-config.test.ts.snap index f969200e89..56ed114f98 100644 --- a/src/lib/__snapshots__/create-config.test.ts.snap +++ b/src/lib/__snapshots__/create-config.test.ts.snap @@ -104,7 +104,6 @@ exports[`should create default config 1`] = ` "scheduledConfigurationChanges": false, "strictSchemaValidation": false, "useLastSeenRefactor": false, - "variantTypeNumber": false, }, "externalResolver": { "getVariant": [Function], diff --git a/src/lib/types/experimental.ts b/src/lib/types/experimental.ts index 27ca62c44d..48836df663 100644 --- a/src/lib/types/experimental.ts +++ b/src/lib/types/experimental.ts @@ -22,7 +22,6 @@ export type IFlagKey = | 'advancedPlayground' | 'filterInvalidClientMetrics' | 'customRootRolesKillSwitch' - | 'variantTypeNumber' | 'privateProjects' | 'dependentFeatures' | 'disableMetrics' @@ -111,10 +110,6 @@ const flags: IFlags = { process.env.UNLEASH_EXPERIMENTAL_DEPENDENT_FEATURES, false, ), - variantTypeNumber: parseEnvVarBoolean( - process.env.UNLEASH_EXPERIMENTAL_VARIANT_TYPE_NUMBER, - false, - ), privateProjects: parseEnvVarBoolean( process.env.UNLEASH_EXPERIMENTAL_PRIVATE_PROJECTS, false, diff --git a/src/server-dev.ts b/src/server-dev.ts index dd502c8586..1cb2bcbb6d 100644 --- a/src/server-dev.ts +++ b/src/server-dev.ts @@ -37,7 +37,6 @@ process.nextTick(async () => { embedProxyFrontend: true, anonymiseEventLog: false, responseTimeWithAppNameKillSwitch: false, - variantTypeNumber: true, privateProjects: true, dependentFeatures: true, useLastSeenRefactor: true,