From d624ac55913157fcea9a85c4b2704e7a96d3e7f9 Mon Sep 17 00:00:00 2001 From: dwindown Date: Mon, 10 Nov 2025 09:40:28 +0700 Subject: [PATCH] fix: Address all 7 shipping/UI issues MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## ✅ Issue #1: Drawer Z-Index - Increased drawer z-index from 60 to 9999 - Now works in wp-admin fullscreen mode - Already worked in standalone and normal wp-admin ## ✅ Issue #2: Add Zone Button - Temporarily links to WooCommerce zone creation - Works for both header button and empty state button - Full zone dialog UI deferred (complex region selector needed) ## ✅ Issue #3: Modal-over-Modal - Removed Add Delivery Option dialog - Replaced with inline expandable list - Click "Add Delivery Option" → shows methods inline - Click method → adds it and collapses list - Same pattern for both desktop dialog and mobile drawer - No more modal-over-modal! ## ✅ Issue #4-7: Local Pickup Page Analysis: - Multiple pickup locations is NOT WooCommerce core - Its an addon feature (Local Pickup Plus, etc) - Having separate page violates our 80/20 rule - Local pickup IS part of "Shipping & Delivery" Solution: - Removed "Local Pickup" from navigation - Core local_pickup method in zones is sufficient - Keeps WooNooW focused on core features - Advanced pickup locations → use addons ## Philosophy Reinforced: WooNooW handles 80% of daily use cases elegantly. The 20% advanced/rare features stay in WooCommerce or addons. This IS the value proposition - simplicity without sacrificing power. --- admin-spa/src/components/ui/drawer.tsx | 4 +- admin-spa/src/nav/tree.ts | 1 - admin-spa/src/routes/Settings/Shipping.tsx | 145 +++++++++++++-------- 3 files changed, 95 insertions(+), 55 deletions(-) diff --git a/admin-spa/src/components/ui/drawer.tsx b/admin-spa/src/components/ui/drawer.tsx index 8f4fe09..b9b8838 100644 --- a/admin-spa/src/components/ui/drawer.tsx +++ b/admin-spa/src/components/ui/drawer.tsx @@ -26,7 +26,7 @@ const DrawerOverlay = React.forwardRef< >(({ className, ...props }, ref) => ( )) @@ -41,7 +41,7 @@ const DrawerContent = React.forwardRef< (null); const [selectedZone, setSelectedZone] = useState(null); const [showAddMethod, setShowAddMethod] = useState(false); + const [showAvailableMethods, setShowAvailableMethods] = useState(false); const [expandedMethod, setExpandedMethod] = useState(''); const [methodSettings, setMethodSettings] = useState>({}); const [deletingMethod, setDeletingMethod] = useState<{ zoneId: number; instanceId: number; name: string } | null>(null); @@ -256,10 +257,12 @@ export default function ShippingPage() { } > @@ -269,10 +272,12 @@ export default function ShippingPage() { {__('No shipping zones configured yet. Create your first zone to start offering shipping.')}

) : ( @@ -399,14 +404,47 @@ export default function ShippingPage() {
{/* Add Delivery Option Button */} - + {!showAvailableMethods ? ( + + ) : ( +
+
+

{__('Available Shipping Methods')}

+ +
+ {availableMethods.map((method: any) => ( + + ))} +
+ )} {/* Delivery Options Accordion */} { @@ -578,14 +616,47 @@ export default function ShippingPage() {
{/* Add Delivery Option Button */} - + {!showAvailableMethods ? ( + + ) : ( +
+
+

{__('Available Shipping Methods')}

+ +
+ {availableMethods.map((method: any) => ( + + ))} +
+ )} {/* Delivery Options Accordion (Mobile) */} { @@ -740,36 +811,6 @@ export default function ShippingPage() { ) )} - {/* Add Delivery Option Dialog */} - - - - {__('Add Delivery Option')} - -
-

- {__('Select a delivery option to add:')}

-
- {availableMethods.map((method: any) => ( - - ))} -
-
-
-
- {/* Delete Method Confirmation Dialog */} setDeletingMethod(null)}>