diff --git a/packages/app-next/app-config.yaml b/packages/app-next/app-config.yaml index da233b0188..5665324be6 100644 --- a/packages/app-next/app-config.yaml +++ b/packages/app-next/app-config.yaml @@ -26,6 +26,13 @@ app: # - apis.plugin.graphiql.browse.gitlab: true # - graphiql-endpoint:graphiql/gitlab: true + - nav-item:search: false + - nav-item:user-settings: false + - nav-item:catalog + - nav-item:api-docs + - nav-item:scaffolder + - nav-item:app-visualizer + # Pages - page:catalog/entity: config: diff --git a/packages/app-next/src/App.tsx b/packages/app-next/src/App.tsx index 43cc63d1a4..1eeedfa9be 100644 --- a/packages/app-next/src/App.tsx +++ b/packages/app-next/src/App.tsx @@ -44,6 +44,7 @@ import { convertLegacyPlugin } from '@backstage/core-compat-api'; import { convertLegacyPageExtension } from '@backstage/core-compat-api'; import { convertLegacyEntityContentExtension } from '@backstage/plugin-catalog-react/alpha'; import { pluginInfoResolver } from './pluginInfoResolver'; +import { appModuleNav } from './modules/appModuleNav'; /* @@ -130,6 +131,7 @@ const app = createApp({ appVisualizerPlugin, kubernetesPlugin, notFoundErrorPageModule, + appModuleNav, customHomePageModule, ...collectedLegacyPlugins, ], diff --git a/packages/app-next/src/modules/appModuleNav.tsx b/packages/app-next/src/modules/appModuleNav.tsx new file mode 100644 index 0000000000..aa7d92bd1b --- /dev/null +++ b/packages/app-next/src/modules/appModuleNav.tsx @@ -0,0 +1,142 @@ +/* + * Copyright 2025 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { compatWrapper } from '@backstage/core-compat-api'; +import { + Link, + Sidebar, + sidebarConfig, + SidebarDivider, + SidebarGroup, + SidebarItem, + SidebarScrollWrapper, + SidebarSpace, + useSidebarOpenState, +} from '@backstage/core-components'; +import SearchIcon from '@material-ui/icons/Search'; +import MenuIcon from '@material-ui/icons/Menu'; +import BuildIcon from '@material-ui/icons/Build'; +import { + createFrontendModule, + NavContentBlueprint, +} from '@backstage/frontend-plugin-api'; +import { SidebarSearchModal } from '@backstage/plugin-search'; +import { NotificationsSidebarItem } from '@backstage/plugin-notifications'; +import { + Settings, + UserSettingsSignInAvatar, +} from '@backstage/plugin-user-settings'; +import { makeStyles } from '@material-ui/core/styles'; + +const useSidebarLogoStyles = makeStyles({ + root: { + width: sidebarConfig.drawerWidthClosed, + height: 3 * sidebarConfig.logoHeight, + display: 'flex', + flexFlow: 'row nowrap', + alignItems: 'center', + marginBottom: -14, + }, + link: { + width: sidebarConfig.drawerWidthClosed, + marginLeft: 24, + }, +}); + +const SidebarLogo = () => { + const classes = useSidebarLogoStyles(); + const { isOpen } = useSidebarOpenState(); + + return ( +