diff --git a/frontend/src/component/project/Project/ProjectOverview.tsx b/frontend/src/component/project/Project/ProjectOverview.tsx index df870baf4f09..0e555ae7789c 100644 --- a/frontend/src/component/project/Project/ProjectOverview.tsx +++ b/frontend/src/component/project/Project/ProjectOverview.tsx @@ -105,11 +105,18 @@ const useDelayedFeedbackPrompt = () => { 'newProjectOverview', 'manual', ); + const projectOverviewRefactorFeedback = useUiFlag( + 'projectOverviewRefactorFeedback', + ); const [seenFeedback, setSeenFeedback] = useState(false); useEffect(() => { const timer = setTimeout(() => { - if (!seenFeedback && !hasSubmittedFeedback) { + if ( + projectOverviewRefactorFeedback && + !seenFeedback && + !hasSubmittedFeedback + ) { openFeedback({ title: 'How easy was it to work with the project overview in Unleash?', positiveLabel: diff --git a/frontend/src/interfaces/uiConfig.ts b/frontend/src/interfaces/uiConfig.ts index fcf17c85377e..67ff31e68fd1 100644 --- a/frontend/src/interfaces/uiConfig.ts +++ b/frontend/src/interfaces/uiConfig.ts @@ -79,6 +79,7 @@ export type UiFlags = { collectTrafficDataUsage?: boolean; newContextFieldsUI?: boolean; variantDependencies?: boolean; + projectOverviewRefactorFeedback?: 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 22083d36eacf..db90dfaafe01 100644 --- a/src/lib/__snapshots__/create-config.test.ts.snap +++ b/src/lib/__snapshots__/create-config.test.ts.snap @@ -133,6 +133,7 @@ exports[`should create default config 1`] = ` "outdatedSdksBanner": false, "personalAccessTokensKillSwitch": false, "projectOverviewRefactor": false, + "projectOverviewRefactorFeedback": false, "queryMissingTokens": false, "responseTimeMetricsFix": false, "responseTimeWithAppNameKillSwitch": false, diff --git a/src/lib/types/experimental.ts b/src/lib/types/experimental.ts index d98fadd1e81e..f5c0a59ac602 100644 --- a/src/lib/types/experimental.ts +++ b/src/lib/types/experimental.ts @@ -56,7 +56,8 @@ export type IFlagKey = | 'projectOverviewRefactor' | 'variantDependencies' | 'newContextFieldsUI' - | 'bearerTokenMiddleware'; + | 'bearerTokenMiddleware' + | 'projectOverviewRefactorFeedback'; export type IFlags = Partial<{ [key in IFlagKey]: boolean | Variant }>; @@ -277,6 +278,10 @@ const flags: IFlags = { process.env.UNLEASH_EXPERIMENTAL_BEARER_TOKEN_MIDDLEWARE, false, ), + projectOverviewRefactorFeedback: parseEnvVarBoolean( + process.env.UNLEASH_EXPERIMENTAL_PROJECT_OVERVIEW_REFACTOR_FEEDBACK, + false, + ), }; export const defaultExperimentalOptions: IExperimentalOptions = { diff --git a/src/server-dev.ts b/src/server-dev.ts index dd9785b0cae4..40140e8e79a7 100644 --- a/src/server-dev.ts +++ b/src/server-dev.ts @@ -53,6 +53,7 @@ process.nextTick(async () => { projectOverviewRefactor: true, newContextFieldsUI: true, variantDependencies: true, + projectOverviewRefactorFeedback: true, }, }, authentication: {