# Appearance Menu Restructure βœ… **Date:** November 27, 2025 **Status:** IN PROGRESS --- ## 🎯 GOALS 1. βœ… Add Appearance menu to both Sidebar and TopNav 2. βœ… Fix path conflict (was `/settings/customer-spa`, now `/appearance`) 3. βœ… Move CustomerSPA.tsx to Appearance folder 4. βœ… Create page-specific submenus structure 5. ⏳ Create placeholder pages for each submenu 6. ⏳ Update App.tsx routes --- ## πŸ“ NEW FOLDER STRUCTURE ``` admin-spa/src/routes/ β”œβ”€β”€ Appearance/ ← NEW FOLDER β”‚ β”œβ”€β”€ index.tsx ← Redirects to /appearance/themes β”‚ β”œβ”€β”€ Themes.tsx ← Moved from Settings/CustomerSPA.tsx β”‚ β”œβ”€β”€ Shop.tsx ← Shop page appearance β”‚ β”œβ”€β”€ Product.tsx ← Product page appearance β”‚ β”œβ”€β”€ Cart.tsx ← Cart page appearance β”‚ β”œβ”€β”€ Checkout.tsx ← Checkout page appearance β”‚ β”œβ”€β”€ ThankYou.tsx ← Thank you page appearance β”‚ └── Account.tsx ← My Account/Customer Portal appearance └── Settings/ β”œβ”€β”€ Store.tsx β”œβ”€β”€ Payments.tsx β”œβ”€β”€ Shipping.tsx β”œβ”€β”€ Tax.tsx β”œβ”€β”€ Customers.tsx β”œβ”€β”€ Notifications.tsx └── Developer.tsx ``` --- ## πŸ—ΊοΈ NAVIGATION STRUCTURE ### **Appearance Menu** - **Path:** `/appearance` - **Icon:** `palette` - **Submenus:** 1. **Themes** β†’ `/appearance/themes` (Main SPA activation & layout selection) 2. **Shop** β†’ `/appearance/shop` (Shop page customization) 3. **Product** β†’ `/appearance/product` (Product page customization) 4. **Cart** β†’ `/appearance/cart` (Cart page customization) 5. **Checkout** β†’ `/appearance/checkout` (Checkout page customization) 6. **Thank You** β†’ `/appearance/thankyou` (Order confirmation page) 7. **My Account** β†’ `/appearance/account` (Customer portal customization) --- ## βœ… CHANGES MADE ### **1. Backend - NavigationRegistry.php** ```php [ 'key' => 'appearance', 'label' => __('Appearance', 'woonoow'), 'path' => '/appearance', // Changed from /settings/customer-spa 'icon' => 'palette', 'children' => [ ['label' => __('Themes', 'woonoow'), 'mode' => 'spa', 'path' => '/appearance/themes'], ['label' => __('Shop', 'woonoow'), 'mode' => 'spa', 'path' => '/appearance/shop'], ['label' => __('Product', 'woonoow'), 'mode' => 'spa', 'path' => '/appearance/product'], ['label' => __('Cart', 'woonoow'), 'mode' => 'spa', 'path' => '/appearance/cart'], ['label' => __('Checkout', 'woonoow'), 'mode' => 'spa', 'path' => '/appearance/checkout'], ['label' => __('Thank You', 'woonoow'), 'mode' => 'spa', 'path' => '/appearance/thankyou'], ['label' => __('My Account', 'woonoow'), 'mode' => 'spa', 'path' => '/appearance/account'], ], ], ``` **Version bumped:** `1.0.3` ### **2. Frontend - App.tsx** **Added Palette icon:** ```tsx import { ..., Palette, ... } from 'lucide-react'; ``` **Updated Sidebar to use dynamic navigation:** ```tsx function Sidebar() { const iconMap: Record = { 'layout-dashboard': LayoutDashboard, 'receipt-text': ReceiptText, 'package': Package, 'tag': Tag, 'users': Users, 'palette': Palette, // ← NEW 'settings': SettingsIcon, }; const navTree = (window as any).WNW_NAV_TREE || []; return ( ); } ``` **Updated TopNav to use dynamic navigation:** ```tsx function TopNav({ fullscreen = false }: { fullscreen?: boolean }) { // Same icon mapping and navTree logic as Sidebar const navTree = (window as any).WNW_NAV_TREE || []; return (
{navTree.map((item: any) => { const IconComponent = iconMap[item.icon] || Package; return ; })}
); } ``` ### **3. File Moves** - βœ… Created `/admin-spa/src/routes/Appearance/` folder - βœ… Moved `Settings/CustomerSPA.tsx` β†’ `Appearance/Themes.tsx` - βœ… Created `Appearance/index.tsx` (redirects to themes) - βœ… Created `Appearance/Shop.tsx` (placeholder) --- ## ⏳ TODO ### **Create Remaining Placeholder Pages:** 1. `Appearance/Product.tsx` 2. `Appearance/Cart.tsx` 3. `Appearance/Checkout.tsx` 4. `Appearance/ThankYou.tsx` 5. `Appearance/Account.tsx` ### **Update App.tsx Routes:** ```tsx // Add imports import AppearanceIndex from '@/routes/Appearance'; import AppearanceThemes from '@/routes/Appearance/Themes'; import AppearanceShop from '@/routes/Appearance/Shop'; import AppearanceProduct from '@/routes/Appearance/Product'; import AppearanceCart from '@/routes/Appearance/Cart'; import AppearanceCheckout from '@/routes/Appearance/Checkout'; import AppearanceThankYou from '@/routes/Appearance/ThankYou'; import AppearanceAccount from '@/routes/Appearance/Account'; // Add routes } /> } /> } /> } /> } /> } /> } /> } /> ``` ### **Remove Old Route:** ```tsx // DELETE THIS: } /> ``` --- ## 🎨 DESIGN PHILOSOPHY Each Appearance submenu will allow customization of: 1. **Themes** - Overall SPA activation, layout selection (Classic/Modern/Boutique/Launch) 2. **Shop** - Product grid, filters, sorting, categories display 3. **Product** - Image gallery, description layout, reviews, related products 4. **Cart** - Cart table, coupon input, shipping calculator 5. **Checkout** - Form fields, payment methods, order summary 6. **Thank You** - Order confirmation message, next steps, upsells 7. **My Account** - Dashboard, orders, addresses, downloads --- ## πŸ” VERIFICATION After completing TODO: 1. βœ… Appearance shows in Sidebar (both fullscreen and normal) 2. βœ… Appearance shows in TopNav 3. βœ… Clicking Appearance goes to `/appearance` β†’ redirects to `/appearance/themes` 4. βœ… Settings menu is NOT active when on Appearance 5. βœ… All 7 submenus are accessible 6. βœ… No 404 errors --- **Last Updated:** November 27, 2025 **Version:** 1.0.3 **Status:** Awaiting route updates in App.tsx