From 24e2c4030bfb1357476a79177e54bb08e84bff5f Mon Sep 17 00:00:00 2001 From: Jaanus Sellin Date: Wed, 31 Jul 2024 09:59:42 +0300 Subject: [PATCH] feat: new event search flag (#7699) Add `newEventSearch` flag --- frontend/src/interfaces/uiConfig.ts | 1 + src/lib/__snapshots__/create-config.test.ts.snap | 1 + src/lib/types/experimental.ts | 7 ++++++- src/server-dev.ts | 1 + 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/frontend/src/interfaces/uiConfig.ts b/frontend/src/interfaces/uiConfig.ts index 35a154216a..c2d2cf554c 100644 --- a/frontend/src/interfaces/uiConfig.ts +++ b/frontend/src/interfaces/uiConfig.ts @@ -95,6 +95,7 @@ export type UiFlags = { featureCollaborators?: boolean; integrationEvents?: boolean; improveCreateFlagFlow?: boolean; + newEventSearch?: 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 4dc64bfa8b..5613f00012 100644 --- a/src/lib/__snapshots__/create-config.test.ts.snap +++ b/src/lib/__snapshots__/create-config.test.ts.snap @@ -144,6 +144,7 @@ exports[`should create default config 1`] = ` }, "migrationLock": true, "navigationSidebar": true, + "newEventSearch": false, "originMiddleware": false, "outdatedSdksBanner": false, "parseProjectFromSession": false, diff --git a/src/lib/types/experimental.ts b/src/lib/types/experimental.ts index 4d09867b7b..0fca2fc2fe 100644 --- a/src/lib/types/experimental.ts +++ b/src/lib/types/experimental.ts @@ -71,7 +71,8 @@ export type IFlagKey = | 'integrationEvents' | 'featureCollaborators' | 'improveCreateFlagFlow' - | 'originMiddleware'; + | 'originMiddleware' + | 'newEventSearch'; export type IFlags = Partial<{ [key in IFlagKey]: boolean | Variant }>; @@ -344,6 +345,10 @@ const flags: IFlags = { process.env.UNLEASH_EXPERIMENTAL_ORIGIN_MIDDLEWARE, false, ), + newEventSearch: parseEnvVarBoolean( + process.env.UNLEASH_EXPERIMENTAL_NEW_EVENT_SEARCH, + false, + ), }; export const defaultExperimentalOptions: IExperimentalOptions = { diff --git a/src/server-dev.ts b/src/server-dev.ts index ba772be3d0..a7c5068698 100644 --- a/src/server-dev.ts +++ b/src/server-dev.ts @@ -61,6 +61,7 @@ process.nextTick(async () => { featureCollaborators: true, improveCreateFlagFlow: true, originMiddleware: true, + newEventSearch: true, }, }, authentication: {