From 5f86d6d4fae777e7d05e9d2e8d3dae642e9c7f0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Sun, 17 May 2026 14:21:25 +0200 Subject: [PATCH] ui(dropdown): keep menu items single-line + widen container to w-60 Add whitespace-nowrap to the DropdownMenuItem primitive so every dropdown row stays on a single line app-wide, and bump the sidebar 3-dot overflow menu from w-56 to w-60. The Benachrichtigungs-Center label (23 chars) plus its Bell icon and the default text-sm cap sat right at the 14-rem ceiling and wrapped at the hyphen on sub-pixel rounding. --- src/components/layout/sidebar-nav.tsx | 2 +- src/components/ui/dropdown-menu.tsx | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/components/layout/sidebar-nav.tsx b/src/components/layout/sidebar-nav.tsx index 8a4249bc0..0d5a530a7 100644 --- a/src/components/layout/sidebar-nav.tsx +++ b/src/components/layout/sidebar-nav.tsx @@ -117,7 +117,7 @@ function SidebarUserSection({ collapsed }: { collapsed: boolean }) {
diff --git a/src/components/ui/dropdown-menu.tsx b/src/components/ui/dropdown-menu.tsx index a1761ebdf..17293a6f7 100644 --- a/src/components/ui/dropdown-menu.tsx +++ b/src/components/ui/dropdown-menu.tsx @@ -74,7 +74,13 @@ function DropdownMenuItem({ data-inset={inset} data-variant={variant} className={cn( - "focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex min-h-11 cursor-default items-center gap-2 rounded-sm px-2 py-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", + // v1.4.37 W4a item 2 — `whitespace-nowrap` keeps every + // dropdown row on a single line (the sidebar 3-dot menu's + // "Benachrichtigungs-Center" otherwise wrapped at the + // hyphen on sub-pixel rounding inside the legacy w-56 + // container). Applies app-wide so the top-bar w-48 menus + // get the same protection. + "focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex min-h-11 cursor-default items-center gap-2 rounded-sm px-2 py-2 text-sm whitespace-nowrap outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className, )} {...props}