From d9646edcfc77e763af2ae4c251eeafb724ee4104 Mon Sep 17 00:00:00 2001 From: David Leek Date: Fri, 18 Oct 2024 08:23:52 +0200 Subject: [PATCH] feat: release plans nav menu item and icon suggestion (#8469) --- .../MainLayout/NavigationSidebar/IconRenderer.tsx | 2 ++ .../__tests__/__snapshots__/routes.test.tsx.snap | 14 ++++++++++++++ frontend/src/component/menu/routes.ts | 10 ++++++++++ .../src/component/releases/ReleaseManagement.tsx | 3 +++ frontend/src/interfaces/uiConfig.ts | 1 + src/server-dev.ts | 2 +- 6 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 frontend/src/component/releases/ReleaseManagement.tsx diff --git a/frontend/src/component/layout/MainLayout/NavigationSidebar/IconRenderer.tsx b/frontend/src/component/layout/MainLayout/NavigationSidebar/IconRenderer.tsx index d50dad6bb4..fc9953b61c 100644 --- a/frontend/src/component/layout/MainLayout/NavigationSidebar/IconRenderer.tsx +++ b/frontend/src/component/layout/MainLayout/NavigationSidebar/IconRenderer.tsx @@ -27,6 +27,7 @@ import BillingIcon from '@mui/icons-material/CreditCardOutlined'; import EventLogIcon from '@mui/icons-material/EventNoteOutlined'; import GitHubIcon from '@mui/icons-material/GitHub'; import LibraryBooksIcon from '@mui/icons-material/LibraryBooks'; +import LaunchIcon from '@mui/icons-material/Launch'; import type { FC } from 'react'; // TODO: move to routes @@ -56,6 +57,7 @@ const icons: Record = { '/admin/cors': CorsIcon, '/admin/billing': BillingIcon, '/history': EventLogIcon, + '/releases-management': LaunchIcon, GitHub: GitHubIcon, Documentation: LibraryBooksIcon, }; diff --git a/frontend/src/component/menu/__tests__/__snapshots__/routes.test.tsx.snap b/frontend/src/component/menu/__tests__/__snapshots__/routes.test.tsx.snap index c536b1a46d..3652622dc2 100644 --- a/frontend/src/component/menu/__tests__/__snapshots__/routes.test.tsx.snap +++ b/frontend/src/component/menu/__tests__/__snapshots__/routes.test.tsx.snap @@ -230,6 +230,20 @@ exports[`returns all baseRoutes 1`] = ` "title": "Strategy types", "type": "protected", }, + { + "component": [Function], + "enterprise": true, + "flag": "releasePlans", + "menu": { + "advanced": true, + "mode": [ + "enterprise", + ], + }, + "path": "/releases-management", + "title": "Release management", + "type": "protected", + }, { "component": [Function], "menu": {}, diff --git a/frontend/src/component/menu/routes.ts b/frontend/src/component/menu/routes.ts index 9428131149..07090d77c1 100644 --- a/frontend/src/component/menu/routes.ts +++ b/frontend/src/component/menu/routes.ts @@ -48,6 +48,7 @@ import { Application } from 'component/application/Application'; import { Signals } from 'component/signals/Signals'; import { LazyCreateProject } from '../project/Project/CreateProject/LazyCreateProject'; import { PersonalDashboard } from '../personalDashboard/PersonalDashboard'; +import { ReleaseManagement } from 'component/releases/ReleaseManagement'; export const routes: IRoute[] = [ // Splash @@ -246,6 +247,15 @@ export const routes: IRoute[] = [ type: 'protected', menu: { mobile: true, advanced: true }, }, + { + path: '/releases-management', + title: 'Release management', + component: ReleaseManagement, + type: 'protected', + menu: { advanced: true, mode: ['enterprise'] }, + flag: 'releasePlans', + enterprise: true, + }, { path: '/environments/create', title: 'Environments', diff --git a/frontend/src/component/releases/ReleaseManagement.tsx b/frontend/src/component/releases/ReleaseManagement.tsx new file mode 100644 index 0000000000..929eedca37 --- /dev/null +++ b/frontend/src/component/releases/ReleaseManagement.tsx @@ -0,0 +1,3 @@ +export const ReleaseManagement = () => { + return null; +}; diff --git a/frontend/src/interfaces/uiConfig.ts b/frontend/src/interfaces/uiConfig.ts index a627e8895e..ca6c80965b 100644 --- a/frontend/src/interfaces/uiConfig.ts +++ b/frontend/src/interfaces/uiConfig.ts @@ -92,6 +92,7 @@ export type UiFlags = { personalDashboardUI?: boolean; purchaseAdditionalEnvironments?: boolean; unleashAI?: boolean; + releasePlans?: boolean; }; export interface IVersionInfo { diff --git a/src/server-dev.ts b/src/server-dev.ts index bd52ea379c..29a0e83fda 100644 --- a/src/server-dev.ts +++ b/src/server-dev.ts @@ -57,7 +57,7 @@ process.nextTick(async () => { unleashAI: true, webhookDomainLogging: true, addonUsageMetrics: true, - releasePlans: true, + releasePlans: false, }, }, authentication: {