From 0d1b4714dc0142ff98b016442f638930e410c69d Mon Sep 17 00:00:00 2001 From: Nicholai Date: Thu, 12 Feb 2026 15:16:03 -0700 Subject: [PATCH] fix(ui): sidebar layout and mobile improvements (#71) - Fix mobile state initialization bug that caused flickering (undefined -> false instead of !!undefined) - Increase mobile sidebar width from 18rem to 20rem with 85vw max - Add mobile-specific larger touch targets (44px min height) - Increase icon and text sizes on mobile for better usability - Fix collapsed sidebar button centering by reducing padding - Remove fragile manual translate offsets on lg buttons - Improve animation performance with will-change and ease-out - Hide collapsed text instead of translating off-screen Co-authored-by: Nicholai --- src/components/ui/sidebar.tsx | 37 +++++++++++++++++++++++------------ src/hooks/use-mobile.ts | 4 ++-- 2 files changed, 27 insertions(+), 14 deletions(-) diff --git a/src/components/ui/sidebar.tsx b/src/components/ui/sidebar.tsx index ce85d19..bd07838 100755 --- a/src/components/ui/sidebar.tsx +++ b/src/components/ui/sidebar.tsx @@ -28,7 +28,7 @@ import { const SIDEBAR_COOKIE_NAME = "sidebar_state" const SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7 const SIDEBAR_WIDTH = "11rem" -const SIDEBAR_WIDTH_MOBILE = "18rem" +const SIDEBAR_WIDTH_MOBILE = "20rem" const SIDEBAR_WIDTH_ICON = "3rem" const SIDEBAR_KEYBOARD_SHORTCUT = "b" @@ -186,7 +186,8 @@ function Sidebar({ @@ -213,7 +214,7 @@ function Sidebar({