From 57cb8db2fa7caac4f4a07c94c76c299f174b9bbe Mon Sep 17 00:00:00 2001 From: dwindown Date: Thu, 6 Nov 2025 22:28:30 +0700 Subject: [PATCH] fix: Clean up mobile layout and FAB styling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed 4 critical mobile UX issues: 1. ✅ Fixed pt-16 Logic Problem: pt-16 applied even when header was hidden Solution: Only add pt-16 when NOT in fullscreen mode Before:
After:
Result: No wasted space when header is hidden 2. ✅ Applied Fullscreen Logic to WP-Admin Fullscreen Problem: Header only hidden in standalone, not wp-admin fullscreen Solution: Hide header on mobile for BOTH modes Before: if (isStandalone && window.innerWidth < 768) return null; After: if (fullscreen && window.innerWidth < 768) return null; Result: Consistent behavior across all fullscreen modes 3. ✅ Non-Fullscreen Layout Status: Already correct, no changes needed Layout: WP Admin Bar → Top Nav → Submenu → Page Header → Content 4. ✅ Redesigned FAB Problems: - Position too high (bottom-72px) - Using Button component (unnecessary) - Rounded rectangle (should be circle) - Wrong shadow intensity Solutions: - Changed to bottom-20 (80px from bottom, above nav) - Direct button element (lighter, faster) - rounded-full (perfect circle) - Better shadow: shadow-lg → shadow-2xl on hover - Added active:scale-95 for tactile feedback - Increased z-index to z-50 Before:
) : ( -
+
{!isMorePage && (isDashboardRoute ? ( ) : ( diff --git a/admin-spa/src/components/FAB.tsx b/admin-spa/src/components/FAB.tsx index 3b0a6c0..9f3822a 100644 --- a/admin-spa/src/components/FAB.tsx +++ b/admin-spa/src/components/FAB.tsx @@ -1,7 +1,6 @@ import React from 'react'; import { Plus } from 'lucide-react'; import { useFAB } from '@/contexts/FABContext'; -import { Button } from '@/components/ui/button'; export function FAB() { const { config } = useFAB(); @@ -11,13 +10,12 @@ export function FAB() { } return ( - + ); }