From d49ec15cc733ca3fc82f3fdcb43630a53d5a3b0d Mon Sep 17 00:00:00 2001 From: mariomitte Date: Sun, 2 Aug 2026 23:17:38 +0200 Subject: [PATCH] Mobile UX: navbar dropdown, compact KPI, table scrolling, remove test toast 1. Navbar mobile dropdown - Fixed potential clipping: added z-50 and top-full to dropdown panel - Added overflow-visible to nav wrapper so dropdown is not cut off - Wider panel (min-w-52), larger tap targets (py-2.5 per link) - Active route indicated by colored dot + bold text - Trigger button now shows hamburger icon + page name 2. KPI cards (section-dashboard) - grid-cols-2 on mobile (was single column), sm:3, xl:5 - Reduced padding px-3 py-2.5 (was p-4) and font text-xl (was text-2xl) - flex-col gap-0.5 layout for tighter vertical rhythm 3. Test Toast removed - Deleted ToastTrigger.jsx component entirely - Removed import and conditional render from Layout.astro - Removed unused isDev variable from Layout.astro 4. AnimatedDataTable improvements - Replaced plain-text loading placeholder with animated skeleton rows (pulse animation with variable-width grey bars per column) - Added horizontal scroll fade indicators: left/right gradient overlays appear automatically via ResizeObserver + scroll event listener - scroll-smooth touch scrolling on mobile (WebkitOverflowScrolling, scrollbarWidth) - Added scope=col on th elements and aria-label / aria-busy props - Slightly snappier spring config (tension 260, friction 28) - leave animation reduced to 4px shift (was 8px) for less jarring removal Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- frontend/src/components/Navbar.jsx | 14 +- frontend/src/components/ToastTrigger.jsx | 13 -- .../dashboard/FleetDashboardShell.jsx | 52 +++---- .../src/components/ui/AnimatedDataTable.jsx | 147 ++++++++++++------ frontend/src/layouts/Layout.astro | 3 - 5 files changed, 133 insertions(+), 96 deletions(-) delete mode 100644 frontend/src/components/ToastTrigger.jsx diff --git a/frontend/src/components/Navbar.jsx b/frontend/src/components/Navbar.jsx index e412f28..e505e71 100644 --- a/frontend/src/components/Navbar.jsx +++ b/frontend/src/components/Navbar.jsx @@ -92,7 +92,7 @@ export default function Navbar({ minimal = false }) { const currentItem = ITEMS[activeIndex]; return ( -