Skip to content

Move app-sidebar to gitness #1383

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions apps/gitness/src/components-v2/app-shell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { memo, useCallback, useEffect, useMemo, useState } from 'react'
import { Outlet, useLocation, useNavigate, useParams } from 'react-router-dom'

import {
AppSidebar,
ManageNavigation,
MenuGroupType,
MenuGroupTypes,
Expand All @@ -23,6 +22,7 @@ import { useRepoImportEvents } from '../framework/hooks/useRepoImportEvent'
import { useSelectedSpaceId } from '../framework/hooks/useSelectedSpaceId'
import { useTranslationStore } from '../i18n/stores/i18n-store'
import { PathParams } from '../RouteDefinitions'
import { AppSidebar } from './app-sidebar'
import Breadcrumbs from './breadcrumbs/breadcrumbs'
import BreadcrumbsMFE from './breadcrumbs/breadcrumbs-mfe'
import { Toaster } from './toaster'
Expand Down Expand Up @@ -191,7 +191,6 @@ export const AppShell = () => {
pinnedMenuItems={pinnedMenu}
handleChangePinnedMenuItem={handleChangePinnedMenuItem}
handleRemoveRecentMenuItem={handleRemoveRecentMenuItem}
useTranslationStore={useTranslationStore}
/>

<Sidebar.Inset>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
import { useState } from 'react'

import { TypesUser } from '@harnessio/code-service-client'
import {
Icon,
LanguageCode,
LanguageDialog,
LanguageInterface,
languages,
NavbarItemType,
SearchProvider,
Sidebar,
SidebarItem,
SidebarSearch,
SidebarSearchLegacy,
ThemeDialog,
User,
useSidebar
} from '@/components'
import { ContentStyleType, useRouterContext, useTheme } from '@/context'
import { TypesUser } from '@/types'
import { TranslationStore } from '@/views'
import { cn } from '@utils/cn'

import { SidebarItem } from './sidebar-item'
import { SidebarSearchLegacy } from './sidebar-search-legacy'
import { SearchProvider } from './sidebar-search/search-context'
import { SidebarSearch } from './sidebar-search/sidebar-search'
import { User } from './sidebar-user'
import { NavbarItemType } from './types'
} from '@harnessio/ui/components'
import { ContentStyleType, useRouterContext, useTheme } from '@harnessio/ui/context'
import { cn } from '@harnessio/ui/utils'

import { useTranslationStore } from '../i18n/stores/i18n-store'

const HarnessLogo = ({ className }: { className?: string }) => {
const { Link } = useRouterContext()
Expand Down Expand Up @@ -51,13 +51,11 @@ interface SidebarProps {
handleLogOut: () => void
handleChangePinnedMenuItem: (item: NavbarItemType, pin: boolean) => void
handleRemoveRecentMenuItem: (item: NavbarItemType) => void
useTranslationStore: () => TranslationStore
showNewSearch?: boolean
hasToggle?: boolean
}

export const AppSidebar = ({
useTranslationStore,
handleChangePinnedMenuItem,
handleRemoveRecentMenuItem,
pinnedMenuItems,
Expand Down
16 changes: 8 additions & 8 deletions packages/ui/locales/en/component.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
{
"navbar": {
"more": "More",
"recent": "Recent",
"user-management": "User Management",
"settings": "Settings",
"sidebarToggle": {
"expand": "Expand",
"collapse": "Collapse"
},
"pin": "Pin",
"remove": "Remove",
"reorder": "Reorder",
Expand All @@ -16,9 +8,17 @@
"search": "Search",
"command-palette": "Command Palette",
"nothing-found": "Nothing found",
"settings": "Settings",
"appearence": "Appearance",
"language": "Language",
"logout": "Log out",
"more": "More",
"recent": "Recent",
"user-management": "User Management",
"sidebarToggle": {
"expand": "Expand",
"collapse": "Collapse"
},
"profile": "Profile",
"theme": "Theme",
"customNav": "Customize navigation",
Expand Down
16 changes: 8 additions & 8 deletions packages/ui/locales/fr/component.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
{
"navbar": {
"more": "Plus",
"recent": "Récent",
"user-management": "Gestion des utilisateurs",
"settings": "Paramètres",
"sidebarToggle": {
"expand": "Développer",
"collapse": "Réduire"
},
"pin": "Épingler",
"remove": "Supprimer",
"reorder": "Réorganiser",
Expand All @@ -16,9 +8,17 @@
"search": "Rechercher",
"command-palette": "Palette de commandes",
"nothing-found": "Rien trouvé",
"settings": "Paramètres",
"appearence": "Appearance",
"language": "Language",
"logout": "Se déconnecter",
"more": "Plus",
"recent": "Récent",
"user-management": "Gestion des utilisateurs",
"sidebarToggle": {
"expand": "Développer",
"collapse": "Réduire"
},
"profile": "Profile",
"theme": "Thème",
"customNav": "Personnaliser la navigation",
Expand Down
6 changes: 5 additions & 1 deletion packages/ui/src/components/app-sidebar/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
export * from './app-sidebar'
export * from './sidebar-search/command-palette'
export * from './sidebar-search/sidebar-search'
export * from './sidebar-search/search-context'
export * from './types'
export * from './sidebar-item'
export * from './sidebar-user'
export * from './sidebar-search-legacy'
Loading