From 2d4a546a8f304cf1f0aca85f7a3d15caab93b4dd Mon Sep 17 00:00:00 2001 From: lorentz Date: Sun, 3 May 2026 11:18:52 -0400 Subject: [PATCH] fix(nav): replace NavigationMenu submenus with DropdownMenu The Radix NavigationMenu uses a single shared viewport centered under the full nav list. Opening a right-side submenu (Analyzer, Admin) positioned the dropdown panel far to the left, so moving the mouse to reach it crossed other triggers and closed it mid-way. Switch all items-with-children to DropdownMenu, which positions each panel directly under its own trigger. Keeps the same visual style (navigationMenuTriggerStyle, ChevronDown, item layout with icon + description) and active-state highlighting. Co-Authored-By: Claude Opus 4.7 (1M context) --- components/navigation/app-navigation.tsx | 107 ++++++++++++----------- 1 file changed, 56 insertions(+), 51 deletions(-) diff --git a/components/navigation/app-navigation.tsx b/components/navigation/app-navigation.tsx index a4a6b59..9c5c7df 100644 --- a/components/navigation/app-navigation.tsx +++ b/components/navigation/app-navigation.tsx @@ -17,16 +17,21 @@ import { Brain, Search, AlertTriangle, + ChevronDown, } from 'lucide-react'; import { NavigationMenu, - NavigationMenuContent, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, - NavigationMenuTrigger, navigationMenuTriggerStyle, } from '@/components/ui/navigation-menu'; +import { + DropdownMenu, + DropdownMenuContent, + DropdownMenuItem, + DropdownMenuTrigger, +} from '@/components/ui/dropdown-menu'; import { Button } from '@/components/ui/button'; import { ThemeToggle } from '@/components/theme-toggle'; import { StatusIndicator } from '@/components/navigation/status-indicator'; @@ -242,57 +247,57 @@ export function AppNavigation() { return ( {item.children ? ( - <> - - {item.icon && } - {item.title} - - -
    - {item.children.map((child) => { - const active = isActive(child.href); - return ( -
  • - - + + + + + {item.children.map((child) => { + const active = isActive(child.href); + return ( + + + {child.icon && ( + - {child.icon && ( - - )} -
    -
    - {child.title} -
    - {child.description && ( -

    - {child.description} -

    - )} -
    - -
    -
  • - ); - })} -
-
- + /> + )} +
+
+ {child.title} +
+ {child.description && ( +

+ {child.description} +

+ )} +
+ + + ); + })} + + ) : (