From 5da7b18cb9532092e6fc59435c999d8ea648435b Mon Sep 17 00:00:00 2001 From: Thierry Date: Thu, 4 Jun 2026 19:25:36 +0200 Subject: [PATCH] =?UTF-8?q?fix(ui):=20THI-346=20=E2=80=94=20drop=20the=204?= =?UTF-8?q?40px=20cap=20on=20the=20avatar=20dropdown=20max-h?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit THI-341's anti-clip fix used max-h-[min(440px,calc(100dvh-200px))]. For a super_admin the menu is ~454px (header + 8 items at py-3), just above the 440px cap → a redundant scrollbar appeared on EVERY viewport and doubled the sidebar modules scrollbar (visual bug reported by @thierry). Drop the fixed 440px cap → max-h-[calc(100dvh-200px)] alone: the dropdown takes its natural height and only scrolls when it genuinely can't fit (short screens), preserving the anti-clip safety net. Voie A (super_admin, 8 items): no scroll at 1280×800 / 768×1024 / 390×844, safety scroll without clipping at 1280×600. auth.test 16/16 unchanged. Co-Authored-By: Claude Opus 4.8 --- src/app/components/auth/UserMenu.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/components/auth/UserMenu.tsx b/src/app/components/auth/UserMenu.tsx index edbc9e0..729db98 100644 --- a/src/app/components/auth/UserMenu.tsx +++ b/src/app/components/auth/UserMenu.tsx @@ -227,7 +227,7 @@ export function UserMenu({ syncStatus, variant = 'card', extraActions, secondary role="menu" aria-orientation="vertical" aria-label={`Menu utilisateur ${displayName}`} - className="absolute right-0 top-full mt-2 z-50 w-60 bg-[var(--github-border-secondary)] border border-[var(--github-border-primary)] rounded-xl shadow-2xl overflow-y-auto max-h-[min(440px,calc(100dvh-200px))]" + className="absolute right-0 top-full mt-2 z-50 w-60 bg-[var(--github-border-secondary)] border border-[var(--github-border-primary)] rounded-xl shadow-2xl overflow-y-auto max-h-[calc(100dvh-200px)]" > {dropdownHeader} {menuItems} @@ -278,7 +278,7 @@ export function UserMenu({ syncStatus, variant = 'card', extraActions, secondary role="menu" aria-orientation="vertical" aria-label={`Menu utilisateur ${displayName}`} - className="absolute bottom-full left-0 right-0 mb-2 z-50 bg-[var(--github-border-secondary)] border border-[var(--github-border-primary)] rounded-xl shadow-2xl overflow-y-auto max-h-[min(440px,calc(100dvh-200px))]" + className="absolute bottom-full left-0 right-0 mb-2 z-50 bg-[var(--github-border-secondary)] border border-[var(--github-border-primary)] rounded-xl shadow-2xl overflow-y-auto max-h-[calc(100dvh-200px)]" > {dropdownHeader} {menuItems}