From a8db5fcedd77204b32b3207e917ec418a8fa2de5 Mon Sep 17 00:00:00 2001 From: Colin Reilly Date: Thu, 23 Apr 2026 18:24:02 -0700 Subject: [PATCH] feat(apollo-vertex): migrate shell to shadcn SidebarProvider with sub-nav support --- apps/apollo-vertex/registry.json | 7 +- .../registry/shell/shell-company.tsx | 11 +- .../registry/shell/shell-layout.tsx | 54 ++- .../registry/shell/shell-nav-item.tsx | 89 ----- .../registry/shell/shell-sidebar.tsx | 324 +++++++++++++++--- apps/apollo-vertex/registry/shell/shell.tsx | 6 + 6 files changed, 327 insertions(+), 164 deletions(-) delete mode 100644 apps/apollo-vertex/registry/shell/shell-nav-item.tsx diff --git a/apps/apollo-vertex/registry.json b/apps/apollo-vertex/registry.json index 0ded5c26f..ecbe09444 100644 --- a/apps/apollo-vertex/registry.json +++ b/apps/apollo-vertex/registry.json @@ -984,7 +984,8 @@ "avatar", "dropdown-menu", "skeleton", - "sidebar" + "sidebar", + "collapsible" ], "files": [ { "path": "registry/shell/shell.tsx", "type": "registry:ui" }, @@ -1019,10 +1020,6 @@ "path": "registry/shell/shell-animations.ts", "type": "registry:ui" }, - { - "path": "registry/shell/shell-nav-item.tsx", - "type": "registry:ui" - }, { "path": "registry/shell/shell-minimal-company.tsx", "type": "registry:ui" diff --git a/apps/apollo-vertex/registry/shell/shell-company.tsx b/apps/apollo-vertex/registry/shell/shell-company.tsx index 7a75a92b5..c3508e90e 100644 --- a/apps/apollo-vertex/registry/shell/shell-company.tsx +++ b/apps/apollo-vertex/registry/shell/shell-company.tsx @@ -4,6 +4,7 @@ import { PanelLeft } from "lucide-react"; import { useState } from "react"; import { useTranslation } from "react-i18next"; import { Button } from "@/components/ui/button"; +import { useSidebar } from "@/components/ui/sidebar"; import { Tooltip, TooltipContent, @@ -24,8 +25,6 @@ interface CompanyProps { companyName: string; productName: string; companyLogo?: CompanyLogo; - isCollapsed: boolean; - toggleCollapse: () => void; sidebarHovered?: boolean; } @@ -105,11 +104,11 @@ export const Company = ({ companyName, productName, companyLogo, - isCollapsed, - toggleCollapse, sidebarHovered = false, }: CompanyProps) => { const { t } = useTranslation(); + const { state, toggleSidebar } = useSidebar(); + const isCollapsed = state === "collapsed"; const isCustomLogo = companyLogo?.isCustom ?? false; const logoBgClass = isCustomLogo @@ -135,7 +134,7 @@ export const Company = ({ ) : ( iconElement @@ -188,7 +187,7 @@ export const Company = ({