feat: PWA & mobile UI/UX improvements — 12 enhancements across 3 tiers#54
Conversation
Tier 1 (Critical): - Mobile bottom navigation bar (5-tab persistent bar replaces sidebar drawer) - PWA install prompt (smart banner with beforeinstallprompt detection) - Offline status indicator (toast on connectivity drop/restore) - Responsive layout fixes (mobile-first padding, 2-col grid on mobile) Tier 2 (Polish): - Pull-to-refresh gesture (touch-based with spring animation) - Loading skeleton components (CardSkeleton, TableSkeleton, DashboardSkeleton, etc) - Page transition animations (subtle fade/slide between routes) - Dark mode toggle in header (uses existing ThemeProvider, now switchable) Tier 3 (Premium): - Touch-optimized 44px minimum hit targets on mobile (Apple HIG) - Enhanced header with breadcrumb trail (group > page) - Floating action button (quick actions: File Claim, Get Quote, Emergency) - Haptic feedback on mobile interactions (navigator.vibrate) Additional: - PWA manifest: share_target, launch_handler, 2 new shortcuts - CSS: safe-area insets, custom scrollbars, overscroll containment - Viewport: viewport-fit=cover for notched devices - Dark mode support added to Dashboard page Co-Authored-By: Patrick Munis <pmunis@gmail.com>
Original prompt from Patrick
|
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Test Results — PR #54: PWA & Mobile UI/UX Improvements12/12 tests passed — all features correctly compiled into the production bundle. EscalationVisual rendering was not testable — the app requires a tRPC backend to render (React crashes with Test Results (12/12 PASSED)
What Was NOT Tested (Missing Backend)
Methodology
|
Summary
Platform PWA and mobile UI/UX was rated 4/10 — functional on desktop but missing critical mobile patterns. This PR adds 12 improvements across 3 tiers that bring the mobile experience up to parity with native apps.
Tier 1: Critical Mobile Experience
MobileBottomNav— Persistent 5-tab bar (Home, Policies, Claims, Payments, More) replaces sidebar drawer on mobile. "More" opens the full sidebar. Includesaria-currentand active state pill animation.PWAInstallPrompt— Smart banner triggered bybeforeinstallpromptevent with 7-day dismiss cooldown via localStorage. Shows 3s after event fires to avoid interrupting initial load.OfflineIndicator— Fixed banner onnavigator.onLinechange. Red bar when offline, green "Back online" toast that auto-dismisses after 3s.grid-cols-2on mobile (was single column), card paddingp-3 sm:p-6, heading sizestext-2xl sm:text-3xl lg:text-4xl. Main content area:p-3 sm:p-4 md:p-6.Tier 2: Polish
PullToRefresh— Touch gesture handler with 80px threshold, 0.5x dampening, spring animation.navigator.vibrate(15)on trigger.PageSkeleton— Shimmer-based skeletons:CardSkeleton,TableSkeleton,DashboardSkeleton,ListSkeleton,FormSkeleton. Usesanimate-pulseonbg-muteddivs.@keyframes page-enteron<main>:opacity: 0.85 → 1,translateY(4px) → 0over 200ms.ThemeTogglecomponent in header (Moon/Sun icons). Enabled by addingswitchableprop to existing<ThemeProvider>. Preference persisted to localStorage.Tier 3: Premium
@media (max-width: 767px)rule setsmin-height: 44px; min-width: 44pxon all buttons/links/inputs (Apple HIG).{group} > {page}viaactiveMenuGrouplookup. Mobile shows page name only.FloatingActionButton— Fixed position above bottom nav. Expands to 3 quick actions (File Claim, Get Quote, Emergency SOS) with staggered slide-in animation.navigator.vibrate(10)on bottom nav, FAB, and pull-to-refresh interactions.PWA manifest additions
share_targetfor receiving shared content into Claimslaunch_handler.client_mode: "navigate-existing"for single-instance behaviorviewport-fit: coverfor notched devicesCSS additions
-webkit-tap-highlight-color: transparentfor native feeloverscroll-behavior-y: containto prevent pull-to-refresh browser default.safe-area-top,.safe-area-bottom)Build verified — Vite build passes, all 7 features confirmed in compiled bundle via grep.
Link to Devin session: https://app.devin.ai/sessions/0475192a778b45cea30202f85ad52b63