diff --git a/apps/gitness/src/pages-v2/project/settings-layout.tsx b/apps/gitness/src/pages-v2/project/settings-layout.tsx
index d79f730d1..82aa830a0 100644
--- a/apps/gitness/src/pages-v2/project/settings-layout.tsx
+++ b/apps/gitness/src/pages-v2/project/settings-layout.tsx
@@ -2,13 +2,10 @@ import { Outlet } from 'react-router-dom'
import { ProjectSettingsPage } from '@harnessio/ui/views'
-import Breadcrumbs from '../../components/breadcrumbs/breadcrumbs'
-
export const SettingsLayout = () => {
return (
<>
-
-
+
diff --git a/apps/gitness/src/pages-v2/repo/repo-layout.tsx b/apps/gitness/src/pages-v2/repo/repo-layout.tsx
index 3ed5e22f6..328b1671b 100644
--- a/apps/gitness/src/pages-v2/repo/repo-layout.tsx
+++ b/apps/gitness/src/pages-v2/repo/repo-layout.tsx
@@ -2,14 +2,12 @@ import { Outlet } from 'react-router-dom'
import { RepoSubheader } from '@harnessio/ui/components'
-import Breadcrumbs from '../../components/breadcrumbs/breadcrumbs'
import { useTranslationStore } from '../../i18n/stores/i18n-store'
const RepoLayout = () => {
return (
<>
-
-
+
diff --git a/apps/gitness/src/pages-v2/repo/repo-list.tsx b/apps/gitness/src/pages-v2/repo/repo-list.tsx
index fdbf61edd..b2d621501 100644
--- a/apps/gitness/src/pages-v2/repo/repo-list.tsx
+++ b/apps/gitness/src/pages-v2/repo/repo-list.tsx
@@ -5,7 +5,6 @@ import { parseAsInteger, useQueryState } from 'nuqs'
import { ListReposOkResponse, useListReposQuery } from '@harnessio/code-service-client'
import { SandboxRepoListPage } from '@harnessio/ui/views'
-import Breadcrumbs from '../../components/breadcrumbs/breadcrumbs'
import { useGetSpaceURLParam } from '../../framework/hooks/useGetSpaceParam'
import useSpaceSSE from '../../framework/hooks/useSpaceSSE'
import { useTranslationStore } from '../../i18n/stores/i18n-store'
@@ -75,7 +74,6 @@ export default function ReposListPage() {
return (
<>
-
) => string
+}
+
+// Create a new type by intersecting RouteObject with the custom handle
+type CustomRouteObject = RouteObject & {
+ handle?: CustomHandle
+}
+
+export const routes: CustomRouteObject[] = [
+ {
+ path: '/',
+ element: ,
+ handle: {
+ breadcrumb: () =>
+ },
+ children: [
+ {
+ index: true,
+ element:
+ },
+ {
+ path: ':spaceId/repos',
+ handle: {
+ breadcrumb: () => Repositories
+ },
+ children: [
+ { index: true, element: },
+ {
+ path: 'create',
+ element:
+ },
+ {
+ path: 'import',
+ element:
+ },
+ {
+ path: ':repoId',
+ element: ,
+ handle: {
+ breadcrumb: ({ repoId }: { repoId: string }) => {repoId}
+ },
+ children: [
+ {
+ index: true,
+ element:
+ },
+ {
+ path: 'summary',
+ element: ,
+ handle: {
+ breadcrumb: () => Summary
+ }
+ },
+ {
+ path: 'commits',
+ element: ,
+ handle: {
+ breadcrumb: () => Commits
+ }
+ },
+ {
+ path: 'branches',
+ element: ,
+ handle: {
+ breadcrumb: () => Branches
+ }
+ },
+ {
+ path: 'code',
+ element: (
+
+
+
+ ),
+ handle: {
+ breadcrumb: () => Files
+ },
+ children: [
+ {
+ index: true,
+ element:
+ },
+ {
+ path: '*',
+ element:
+ }
+ ]
+ },
+ {
+ path: 'pulls',
+ handle: {
+ breadcrumb: () => Pull Requests
+ },
+ children: [
+ { index: true, element: },
+ {
+ path: 'compare/:diffRefs*?',
+ element:
+ },
+ {
+ path: ':pullRequestId',
+ element: ,
+ handle: {
+ breadcrumb: ({ pullRequestId }: { pullRequestId: string }) => {pullRequestId}
+ },
+ children: [
+ {
+ index: true,
+ element:
+ },
+ {
+ path: 'conversation',
+ element: (
+
+
+
+ )
+ },
+ {
+ path: 'commits',
+ element: ,
+ handle: {
+ breadcrumb: () => Commits
+ }
+ },
+ {
+ path: 'changes',
+ element: (
+
+
+
+ ),
+ handle: {
+ breadcrumb: () => Changes
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ path: 'pipelines',
+ handle: {
+ breadcrumb: () => Pipelines
+ },
+ children: [
+ { index: true, element: },
+ {
+ path: ':pipelineId',
+ element: ,
+ handle: {
+ breadcrumb: ({ pipelineId }: { pipelineId: string }) => (
+
+ {pipelineId}
+ /
+ Executions
+
+ )
+ }
+ }
+ ]
+ },
+ {
+ path: 'settings',
+ element: ,
+ handle: {
+ breadcrumb: () => Settings
+ },
+ children: [
+ {
+ index: true,
+ element:
+ },
+ {
+ path: 'general',
+ element: ,
+ handle: {
+ breadcrumb: () => General
+ }
+ },
+ {
+ path: 'rules',
+ element: ,
+ handle: {
+ breadcrumb: () => Rules
+ }
+ },
+ {
+ path: 'rules/create',
+ element: ,
+ children: [
+ {
+ path: ':identifier',
+ element:
+ }
+ ]
+ },
+ {
+ path: 'webhooks',
+ element: ,
+ handle: {
+ breadcrumb: () => Webhooks
+ }
+ },
+ {
+ path: 'webhooks/create',
+ element: ,
+ children: [
+ {
+ path: ':webhookId',
+ element:
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ path: ':spaceId/settings',
+ element: ,
+ handle: {
+ breadcrumb: () => Settings
+ },
+ children: [
+ {
+ index: true,
+ element:
+ },
+ {
+ path: 'general',
+ element: <>General>,
+ handle: {
+ breadcrumb: () => General
+ }
+ },
+ {
+ path: 'members',
+ element: ,
+ handle: {
+ breadcrumb: () => Members
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ path: 'create',
+ element: ,
+ handle: {
+ breadcrumb: () => Create project
+ },
+ children: []
+ },
+ {
+ path: 'repos',
+ element: (
+
+ Repo
+
+ )
+ },
+ {
+ path: 'pipelines',
+ element: (
+
+ pipelines
+
+ )
+ },
+ {
+ path: 'executions',
+ element: (
+
+ executions
+
+ )
+ },
+ {
+ path: 'databases',
+ element: (
+
+ databases
+
+ )
+ },
+ {
+ path: 'signin',
+ element:
+ },
+ {
+ path: 'signup',
+ element:
+ },
+ {
+ path: 'settings',
+ element: ,
+ handle: {
+ breadcrumb: () => Settings
+ },
+ children: [
+ {
+ index: true,
+ element:
+ },
+ {
+ path: 'general',
+ element: ,
+ handle: {
+ breadcrumb: () => General
+ }
+ },
+ {
+ path: 'keys',
+ element: ,
+ handle: {
+ breadcrumb: () => Keys
+ }
+ }
+ ]
+ },
+ {
+ path: 'admin/default-settings',
+ element:
+ },
+ {
+ path: 'theme',
+ element:
+ },
+ {
+ path: 'logout',
+ element:
+ },
+ {
+ path: 'chaos',
+ element:
+ },
+ {
+ path: 'artifacts',
+ element:
+ },
+ {
+ path: 'secrets',
+ element:
+ },
+ {
+ path: 'connectors',
+ element:
+ },
+ {
+ path: 'continuous-delivery-gitops',
+ element:
+ },
+ {
+ path: 'continuous-integration',
+ element:
+ },
+ {
+ path: 'feature-flags',
+ element:
+ },
+ {
+ path: 'infrastructure-as-code',
+ element:
+ },
+ {
+ path: 'service-reliability',
+ element:
+ },
+ {
+ path: 'developer/portal',
+ element:
+ },
+ {
+ path: 'developer/environments',
+ element:
+ },
+ {
+ path: 'developer/insights',
+ element:
+ },
+ {
+ path: 'infrastructure',
+ element:
+ },
+ {
+ path: 'code-repository',
+ element:
+ },
+ {
+ path: 'supply-chain',
+ element:
+ },
+ {
+ path: 'security-tests',
+ element:
+ },
+ {
+ path: 'cloud-costs',
+ element:
+ },
+ {
+ path: 'incidents',
+ element:
+ },
+ {
+ path: 'dashboards',
+ element:
+ }
+]
diff --git a/apps/gitness/src/styles.css b/apps/gitness/src/styles.css
index 8ed79197f..521b57531 100644
--- a/apps/gitness/src/styles.css
+++ b/apps/gitness/src/styles.css
@@ -3,3 +3,11 @@
@import '@harnessio/canary/src/styles.css'; */
@import 'highlight.js/styles/atom-one-dark.css';
+
+:root {
+ --breadcrumbs-height: 55px;
+}
+
+.top-breadcrumbs {
+ top: var(--breadcrumbs-height);
+}
diff --git a/packages/ui/src/components/breadcrumb.tsx b/packages/ui/src/components/breadcrumb.tsx
index 68f88918f..22cada0b1 100644
--- a/packages/ui/src/components/breadcrumb.tsx
+++ b/packages/ui/src/components/breadcrumb.tsx
@@ -62,9 +62,9 @@ BreadcrumbPage.displayName = 'BreadcrumbPage'
type BreadcrumbSeparatorProps = ComponentProps<'li'>
const BreadcrumbSeparator = ({ children, className, ...props }: BreadcrumbSeparatorProps) => (
- svg]:size-3.5', className)} {...props}>
+ svg]:size-3.5', className)} {...props}>
{children ?? }
-
+
)
BreadcrumbSeparator.displayName = 'BreadcrumbSeparator'