From 8561ba8df71bdb53811a51f6bf98453b13820d9d Mon Sep 17 00:00:00 2001 From: andreas-unleash Date: Mon, 16 Oct 2023 14:08:21 +0300 Subject: [PATCH] feat: add playground imrpovements flag (#5045) Adds the playgroundImprovements flag Close # [1-1508](https://linear.app/unleash/issue/1-1508/add-playgroundimprovements-feature-flag) --------- Signed-off-by: andreas-unleash --- frontend/src/interfaces/uiConfig.ts | 1 + src/lib/__snapshots__/create-config.test.ts.snap | 2 ++ src/lib/types/experimental.ts | 7 ++++++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/frontend/src/interfaces/uiConfig.ts b/frontend/src/interfaces/uiConfig.ts index 6ad1b72456..e227653e3d 100644 --- a/frontend/src/interfaces/uiConfig.ts +++ b/frontend/src/interfaces/uiConfig.ts @@ -71,6 +71,7 @@ export type UiFlags = { dependentFeatures?: boolean; internalMessageBanners?: boolean; disableEnvsOnRevive?: boolean; + playgroundImprovements?: boolean; }; export interface IVersionInfo { diff --git a/src/lib/__snapshots__/create-config.test.ts.snap b/src/lib/__snapshots__/create-config.test.ts.snap index 1712c56be1..7376e61a39 100644 --- a/src/lib/__snapshots__/create-config.test.ts.snap +++ b/src/lib/__snapshots__/create-config.test.ts.snap @@ -108,6 +108,7 @@ exports[`should create default config 1`] = ` "multipleRoles": false, "newInviteLink": false, "personalAccessTokensKillSwitch": false, + "playgroundImprovements": false, "privateProjects": false, "proPlanAutoCharge": false, "responseTimeWithAppNameKillSwitch": false, @@ -153,6 +154,7 @@ exports[`should create default config 1`] = ` "multipleRoles": false, "newInviteLink": false, "personalAccessTokensKillSwitch": false, + "playgroundImprovements": false, "privateProjects": false, "proPlanAutoCharge": false, "responseTimeWithAppNameKillSwitch": false, diff --git a/src/lib/types/experimental.ts b/src/lib/types/experimental.ts index d058f1a3a6..2d1b6ecf5a 100644 --- a/src/lib/types/experimental.ts +++ b/src/lib/types/experimental.ts @@ -38,7 +38,8 @@ export type IFlagKey = | 'internalMessageBanners' | 'internalMessageBanner' | 'separateAdminClientApi' - | 'disableEnvsOnRevive'; + | 'disableEnvsOnRevive' + | 'playgroundImprovements'; export type IFlags = Partial<{ [key in IFlagKey]: boolean | Variant }>; @@ -178,6 +179,10 @@ const flags: IFlags = { process.env.UNLEASH_EXPERIMENTAL_DISABLE_ENVS_ON_REVIVE, false, ), + playgroundImprovements: parseEnvVarBoolean( + process.env.UNLEASH_EXPERIMENTAL_PLAYGROUND_IMPROVEMENTS, + false, + ), }; export const defaultExperimentalOptions: IExperimentalOptions = {