Skip to content

Commit

Permalink
chore: create new flag to hide insights ui (#6638)
Browse files Browse the repository at this point in the history
Creates a new flag to control the executive dashboard ui

Closes #
[1-2208](https://linear.app/unleash/issue/1-2208/create-separate-ui-flag-decoupled-from-the-backend-flag)

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
  • Loading branch information
andreas-unleash committed Mar 20, 2024
1 parent 33ec7e1 commit 84707e2
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion frontend/src/component/menu/Header/Header.tsx
Expand Up @@ -176,7 +176,7 @@ const Header: VFC = () => {

const increaseUnleashWidth = useUiFlag('increaseUnleashWidth');
const celebatoryUnleash = useUiFlag('celebrateUnleash');
const insightsDashboard = useUiFlag('executiveDashboard');
const insightsDashboard = useUiFlag('executiveDashboardUI');

const routes = getRoutes();
const adminRoutes = useAdminRoutes();
Expand Down
Expand Up @@ -13,7 +13,7 @@ exports[`returns all baseRoutes 1`] = `
{
"component": [Function],
"enterprise": false,
"flag": "executiveDashboard",
"flag": "executiveDashboardUI",
"menu": {
"mobile": true,
},
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/component/menu/routes.ts
Expand Up @@ -67,7 +67,7 @@ export const routes: IRoute[] = [
component: ExecutiveDashboard,
type: 'protected',
menu: { mobile: true },
flag: 'executiveDashboard',
flag: 'executiveDashboardUI',
enterprise: false,
},

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/interfaces/uiConfig.ts
Expand Up @@ -71,7 +71,7 @@ export type UiFlags = {
newStrategyConfigurationFeedback?: boolean;
extendedUsageMetricsUI?: boolean;
adminTokenKillSwitch?: boolean;
executiveDashboard?: boolean;
executiveDashboardUI?: boolean;
feedbackComments?: Variant;
displayUpgradeEdgeBanner?: boolean;
showInactiveUsers?: boolean;
Expand Down
1 change: 1 addition & 0 deletions src/lib/__snapshots__/create-config.test.ts.snap
Expand Up @@ -94,6 +94,7 @@ exports[`should create default config 1`] = `
"enableLicenseChecker": false,
"encryptEmails": false,
"executiveDashboard": false,
"executiveDashboardUI": false,
"extendedUsageMetrics": false,
"extendedUsageMetricsUI": false,
"featureSearchFeedback": {
Expand Down
5 changes: 5 additions & 0 deletions src/lib/types/experimental.ts
Expand Up @@ -39,6 +39,7 @@ export type IFlagKey =
| 'extendedUsageMetricsUI'
| 'adminTokenKillSwitch'
| 'executiveDashboard'
| 'executiveDashboardUI'
| 'feedbackComments'
| 'createdByUserIdDataMigration'
| 'showInactiveUsers'
Expand Down Expand Up @@ -196,6 +197,10 @@ const flags: IFlags = {
process.env.UNLEASH_EXPERIMENTAL_EXECUTIVE_DASHBOARD,
false,
),
executiveDashboardUI: parseEnvVarBoolean(
process.env.UNLEASH_EXPERIMENTAL_EXECUTIVE_DASHBOARD_UI,
false,
),
sdkReporting: parseEnvVarBoolean(
process.env.UNLEASH_EXPERIMENTAL_SDK_REPORTING,
false,
Expand Down
1 change: 1 addition & 0 deletions src/server-dev.ts
Expand Up @@ -48,6 +48,7 @@ process.nextTick(async () => {
featureSearchFeedbackPosting: true,
extendedUsageMetricsUI: true,
executiveDashboard: true,
executiveDashboardUI: true,
userAccessUIEnabled: true,
sdkReporting: true,
outdatedSdksBanner: true,
Expand Down

0 comments on commit 84707e2

Please sign in to comment.