Skip to content

Commit 8b08a61

Browse files
creilly11235claude
andcommitted
feat(apollo-vertex): migrate sidebar and shell to match MRS patterns
Align sidebar registry primitives and shell components with the vertical-medical-mrs implementation: absolute positioning, consistent collapsed width, duration-300 transitions, proper company component layout, and dynamic import for the sidebar example template. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent f8a98fc commit 8b08a61

22 files changed

Lines changed: 669 additions & 455 deletions

apps/apollo-vertex/app/shadcn-components/sidebar/page.mdx

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1+
import { SidebarExampleTemplate } from '@/templates/SidebarTemplateDynamic';
2+
import { PreviewFullScreen } from '@/app/components/preview-full-screen';
3+
14
# Sidebar
25

36
A composable, themeable and customizable sidebar component.
47

5-
<div className="p-4 border rounded-lg mt-4">
6-
<p className="text-sm text-muted-foreground">
7-
The Sidebar component is a complex layout component. See the usage example below for implementation details.
8-
</p>
9-
</div>
8+
<PreviewFullScreen title="Sidebar preview" height={500}>
9+
<SidebarExampleTemplate />
10+
</PreviewFullScreen>
1011

1112
## Installation
1213

@@ -42,19 +43,28 @@ import {
4243

4344
## Features
4445

45-
- **Collapsible** - Can collapse to icons only
46-
- **Composable** - Build your own sidebar structure
47-
- **Themeable** - Supports dark mode and custom themes
48-
- **Responsive** - Works well on mobile and desktop
49-
- **Keyboard accessible** - Full keyboard navigation support
46+
- **Collapsible** - Can collapse to icons only with `collapsible="icon"`
47+
- **Composable** - Build your own sidebar structure with provided primitives
48+
- **Themeable** - Supports dark mode and custom themes via CSS variables
49+
- **Responsive** - Renders as a sheet on mobile, fixed sidebar on desktop
50+
- **Keyboard accessible** - Toggle with `⌘B`, full keyboard navigation support
5051

5152
## Components
5253

5354
- `SidebarProvider` - Provides context for sidebar state
5455
- `Sidebar` - The main sidebar container
5556
- `SidebarHeader` - Header section of the sidebar
56-
- `SidebarContent` - Main content area
57+
- `SidebarContent` - Main scrollable content area
5758
- `SidebarFooter` - Footer section
5859
- `SidebarGroup` - Groups related items
60+
- `SidebarGroupLabel` - Label for a group
61+
- `SidebarGroupContent` - Content wrapper for a group
5962
- `SidebarMenu` - Navigation menu
63+
- `SidebarMenuButton` - Clickable menu button with tooltip support
6064
- `SidebarMenuItem` - Individual menu items
65+
- `SidebarMenuSub` - Sub-menu container for nested navigation
66+
- `SidebarMenuSubButton` - Sub-menu item button
67+
- `SidebarMenuSubItem` - Sub-menu item wrapper
68+
- `SidebarInset` - Main content area adjacent to the sidebar
69+
- `SidebarTrigger` - Button to toggle sidebar open/closed
70+
- `SidebarRail` - Narrow rail for hover-to-expand interaction

apps/apollo-vertex/app/vertex-components/shell/page.mdx

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ Use the `variant="minimal"` prop to render a horizontal header layout instead of
1919

2020
## Features
2121

22+
- **Collapsible Sidebar**: Icon-only collapsed mode with smooth CSS transitions, built on the shadcn sidebar primitives
23+
- **Sub-Navigation**: Collapsible menu items with nested sub-items that auto-expand when active
24+
- **Collapsed Menu Handling**: Clicking a collapsible item while collapsed expands the sidebar and opens the submenu
25+
- **Custom Logo**: Support for company logos with separate light/dark mode variants
2226
- **Optional OAuth2 Authentication**: Plug-and-play authorization code flow with PKCE
2327
- **Theme Toggle**: Built-in light/dark mode support
2428
- **Language Toggle**: Built-in language switcher for internationalization
@@ -40,7 +44,15 @@ import { ApolloShell } from '@/components/ui/shell';
4044

4145
const navItems = [
4246
{ path: '/dashboard', label: 'dashboard', icon: Home },
43-
{ path: '/settings', label: 'settings', icon: Settings },
47+
{
48+
path: '/settings',
49+
label: 'settings',
50+
icon: Settings,
51+
subItems: [
52+
{ path: '/settings', label: 'settings' },
53+
{ path: '/settings/appearance', label: 'appearance' },
54+
],
55+
},
4456
];
4557

4658
function App() {

apps/apollo-vertex/registry.json

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -930,23 +930,23 @@
930930
"description": "Provides UiPath authentication and renders children only when authenticated.",
931931
"dependencies": [
932932
"lucide-react",
933-
"framer-motion",
934933
"react-i18next",
935934
"i18next",
936935
"jwt-decode",
937936
"zod",
938937
"@tanstack/react-query",
939938
"@tanstack/react-router",
940939
"pkce-challenge",
941-
"sonner",
942-
"@mantine/hooks@^9.0.0"
940+
"sonner"
943941
],
944942
"registryDependencies": [
945943
"button",
946944
"tooltip",
947945
"avatar",
948946
"dropdown-menu",
949-
"spinner"
947+
"spinner",
948+
"sidebar",
949+
"collapsible"
950950
],
951951
"files": [
952952
{ "path": "registry/shell/shell.tsx", "type": "registry:ui" },
@@ -981,14 +981,6 @@
981981
{ "path": "lib/i18n.ts", "type": "registry:lib" },
982982
{ "path": "lib/auth.ts", "type": "registry:lib" },
983983
{ "path": "lib/react-i18next.d.ts", "type": "registry:lib" },
984-
{
985-
"path": "registry/shell/shell-animations.ts",
986-
"type": "registry:ui"
987-
},
988-
{
989-
"path": "registry/shell/shell-nav-item.tsx",
990-
"type": "registry:ui"
991-
},
992984
{
993985
"path": "registry/shell/shell-minimal-company.tsx",
994986
"type": "registry:ui"

apps/apollo-vertex/registry/shell/shell-animations.ts

Lines changed: 0 additions & 28 deletions
This file was deleted.

apps/apollo-vertex/registry/shell/shell-company-logo.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,24 @@ interface CompanyLogoIconProps {
88

99
export const CompanyLogoIcon = ({ companyLogo }: CompanyLogoIconProps) => {
1010
if (!companyLogo) {
11-
return <Box className="w-4 h-4 text-background" />;
11+
return <Box className="w-5 h-5 text-sidebar-foreground" />;
1212
}
1313

1414
return (
1515
<>
1616
<img
1717
src={companyLogo.url}
1818
alt={companyLogo.alt}
19-
className={cn("w-4 h-auto", companyLogo.darkUrl ? "dark:hidden" : "")}
19+
className={cn(
20+
"h-8 w-8 object-contain",
21+
companyLogo.darkUrl ? "dark:hidden" : "",
22+
)}
2023
/>
2124
{companyLogo.darkUrl && (
2225
<img
2326
src={companyLogo.darkUrl}
2427
alt={companyLogo.alt}
25-
className="w-4 h-auto hidden dark:block"
28+
className="h-8 w-8 object-contain hidden dark:block"
2629
/>
2730
)}
2831
</>

0 commit comments

Comments
 (0)