From 6c05d8daab1b76c9ceae2ce74e6b3b790005dcf9 Mon Sep 17 00:00:00 2001 From: johndoe6345789 Date: Sat, 17 Jan 2026 17:51:12 +0000 Subject: [PATCH] Generated by Spark: Would be nice if sidebar pushed content to right --- src/App.tsx | 158 +++++++++++--------- src/components/organisms/AppHeader.tsx | 9 +- src/components/organisms/NavigationMenu.tsx | 29 ++-- 3 files changed, 100 insertions(+), 96 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 813e006..2c4451a 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -8,6 +8,7 @@ import { BrowserRouter, useLocation } from 'react-router-dom' console.log('[APP_ROUTER] ✅ React Router imported') import { AppHeader } from '@/components/organisms' +import { NavigationMenu } from '@/components/organisms/NavigationMenu' console.log('[APP_ROUTER] ✅ Header components imported') import { LoadingFallback } from '@/components/molecules' @@ -33,6 +34,9 @@ console.log('[APP_ROUTER] ✅ Component registry imported') import { RouterProvider } from '@/router' console.log('[APP_ROUTER] ✅ Router provider imported') +import { SidebarProvider, SidebarInset, Sidebar, SidebarContent, SidebarHeader } from '@/components/ui/sidebar' +console.log('[APP_ROUTER] ✅ Sidebar provider imported') + const { GlobalSearch, KeyboardShortcutsDialog, PreviewDialog } = DialogRegistry const { PWAInstallPrompt, PWAUpdatePrompt, PWAStatusBar } = PWARegistry console.log('[APP_ROUTER] ✅ Dialog and PWA components registered') @@ -186,87 +190,99 @@ function AppLayout() { console.log('[APP_ROUTER] 🎨 Rendering AppLayout UI') return ( -
+ }> - { - console.log('[APP_ROUTER] 🔍 Search opened') - setSearchOpen(true) - }} - onShowShortcuts={() => { - console.log('[APP_ROUTER] ⌨️ Shortcuts dialog opened') - setShortcutsOpen(true) - }} - onGenerateAI={() => { - console.log('[APP_ROUTER] 🤖 AI generation requested') - toast.info('AI generation coming soon') - }} - onExport={() => { - console.log('[APP_ROUTER] 📤 Export requested') - toast.info('Export coming soon') - }} - onPreview={() => { - console.log('[APP_ROUTER] 👁️ Preview opened') - setPreviewOpen(true) - }} - onShowErrors={() => { - console.log('[APP_ROUTER] ⚠️ Navigating to errors page') - navigateToPage('errors') - }} /> -
- -
+ + +
+ { + console.log('[APP_ROUTER] 🔍 Search opened') + setSearchOpen(true) + }} + onShowShortcuts={() => { + console.log('[APP_ROUTER] ⌨️ Shortcuts dialog opened') + setShortcutsOpen(true) + }} + onGenerateAI={() => { + console.log('[APP_ROUTER] 🤖 AI generation requested') + toast.info('AI generation coming soon') + }} + onExport={() => { + console.log('[APP_ROUTER] 📤 Export requested') + toast.info('Export coming soon') + }} + onPreview={() => { + console.log('[APP_ROUTER] 👁️ Preview opened') + setPreviewOpen(true) + }} + onShowErrors={() => { + console.log('[APP_ROUTER] ⚠️ Navigating to errors page') + navigateToPage('errors') + }} + /> +
+ +
+
+
-
+ ) } diff --git a/src/components/organisms/AppHeader.tsx b/src/components/organisms/AppHeader.tsx index 5155465..5e36bb1 100644 --- a/src/components/organisms/AppHeader.tsx +++ b/src/components/organisms/AppHeader.tsx @@ -1,5 +1,5 @@ import { AppBranding, Breadcrumb, SaveIndicator } from '@/components/molecules' -import { NavigationMenu } from '@/components/organisms/NavigationMenu' +import { SidebarTrigger } from '@/components/ui/sidebar' import { ToolbarActions } from '@/components/organisms/ToolbarActions' import { ProjectManager } from '@/components/ProjectManager' import { FeatureToggles, Project } from '@/types/project' @@ -42,12 +42,7 @@ export function AppHeader({
- + diff --git a/src/components/organisms/NavigationMenu.tsx b/src/components/organisms/NavigationMenu.tsx index 7e0c4cd..9189025 100644 --- a/src/components/organisms/NavigationMenu.tsx +++ b/src/components/organisms/NavigationMenu.tsx @@ -1,9 +1,9 @@ import { useState } from 'react' import { Button } from '@/components/ui/button' -import { Sheet, SheetContent, SheetHeader, SheetTitle, SheetTrigger } from '@/components/ui/sheet' +import { Sidebar, SidebarContent, SidebarHeader } from '@/components/ui/sidebar' import { ScrollArea } from '@/components/ui/scroll-area' import { Collapsible, CollapsibleContent } from '@/components/ui/collapsible' -import { List, CaretDoubleDown, CaretDoubleUp } from '@phosphor-icons/react' +import { CaretDoubleDown, CaretDoubleUp } from '@phosphor-icons/react' import { NavigationItem, NavigationGroupHeader } from '@/components/molecules' import { navigationGroups, NavigationItemData } from '@/lib/navigation-config' import { FeatureToggles } from '@/types/project' @@ -22,7 +22,6 @@ export function NavigationMenu({ featureToggles, errorCount = 0, }: NavigationMenuProps) { - const [open, setOpen] = useState(false) const [expandedGroups, setExpandedGroups] = useState>( new Set(['overview', 'development', 'automation', 'design', 'backend', 'testing', 'tools']) ) @@ -31,7 +30,6 @@ export function NavigationMenu({ const handleItemClick = (value: string) => { onTabChange(value) - setOpen(false) } const handleItemHover = (value: string) => { @@ -84,16 +82,9 @@ export function NavigationMenu({ } return ( - - - - - - - Navigation - + + +

Navigation

- -
+ + + +
{navigationGroups.map((group) => { const visibleItemsCount = getVisibleItemsCount(group.id) if (visibleItemsCount === 0) return null @@ -161,7 +154,7 @@ export function NavigationMenu({ })}
- - +
+ ) }