From 3ab2faf22f72eef214adc6fde6764992bd527323 Mon Sep 17 00:00:00 2001 From: John Coffey Date: Mon, 16 Nov 2026 08:45:14 -0700 Subject: [PATCH] Account menu: scroll on a short screen, and spell out "Stay signed in" Dropdown menus clipped anything past the bottom of the screen, so on a phone held sideways, or with several accounts, the account menu's last items, "Stay signed in on this device" and Logout, couldn't be reached. Menus and submenus now stop at the room Radix measures beside the trigger and scroll past it. The explanation for "Stay signed in" was only a tooltip, which a phone never shows; it's now a line of text under the item. Fixes #216 --- src/components/layout/TopBar.tsx | 18 ++++++++++++------ src/components/ui/dropdown-menu.tsx | 9 ++++++--- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/src/components/layout/TopBar.tsx b/src/components/layout/TopBar.tsx index 45f95d6..5ee260c 100644 --- a/src/components/layout/TopBar.tsx +++ b/src/components/layout/TopBar.tsx @@ -269,18 +269,24 @@ function AccountMenu() { // #197: closing the installed app or the browser keeps the sign-in. role="menuitemcheckbox" aria-checked={stay} - title={t( - 'staySignedIn.hint', - 'Stay signed in when the app or browser closes. Leave this off on a shared computer.', - )} + className="items-start" onSelect={(e) => { e.preventDefault(); setStaySignedIn(!stay); setStay(!stay); }} > - - {t('staySignedIn.label', 'Stay signed in on this device')} + + {/* The explanation is written out, not a tooltip: a phone never shows a tooltip (#216). */} + + {t('staySignedIn.label', 'Stay signed in on this device')} + + {t( + 'staySignedIn.hint', + 'Stay signed in when the app or browser closes. Leave this off on a shared computer.', + )} + + signOut(navigate)}> diff --git a/src/components/ui/dropdown-menu.tsx b/src/components/ui/dropdown-menu.tsx index bba58f8..545956f 100644 --- a/src/components/ui/dropdown-menu.tsx +++ b/src/components/ui/dropdown-menu.tsx @@ -14,8 +14,11 @@ import { ChevronRight, Circle } from 'lucide-react'; import { cn } from '@/lib/utils'; // The panel and the item rows, shared by the menu and its submenus. +// inbuxa: never taller than the room Radix measured beside the trigger, and +// scrolling past that, or the last items of a long menu (the account menu's +// "Stay signed in" and Logout) are cut off on a phone held sideways (#216). const panel = [ - 'z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground', + 'z-50 min-w-[8rem] overflow-x-hidden overflow-y-auto rounded-md border bg-popover p-1 text-popover-foreground', 'data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95', 'data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2', ]; @@ -40,7 +43,7 @@ function DropdownMenuContent({ @@ -151,7 +154,7 @@ function DropdownMenuSubContent({ return ( ); -- 2.54.0