refactor: Adopt Shopify-inspired settings structure

- Updated SETTINGS_TREE_PLAN.md with modern SaaS approach
- Renamed settings pages for clarity (Store Details, Shipping & Delivery, etc.)
- Card-based UI design instead of boring forms
- Progressive disclosure and smart defaults
- Updated navigation in both backend (NavigationRegistry.php) and frontend (tree.ts)
- Added comprehensive comparison table and design decisions
- 8 pages total, 40-53 hours estimated
This commit is contained in:
dwindown
2025-11-05 14:51:00 +07:00
parent 924baa8bdd
commit f8247faf22
3 changed files with 693 additions and 342 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -107,19 +107,20 @@ function getStaticFallbackTree(): MainNode[] {
// WooNooW Settings
{ label: 'WooNooW', mode: 'spa' as const, path: '/settings' },
// WooCommerce Settings (Most Used First)
{ label: 'General', mode: 'spa' as const, path: '/settings/general' },
// Core Settings (Shopify-inspired)
{ label: 'Store Details', mode: 'spa' as const, path: '/settings/store' },
{ label: 'Payments', mode: 'spa' as const, path: '/settings/payments' },
{ label: 'Shipping', mode: 'spa' as const, path: '/settings/shipping' },
{ label: 'Products', mode: 'spa' as const, path: '/settings/products' },
{ label: 'Tax', mode: 'spa' as const, path: '/settings/tax' },
{ label: 'Accounts & Privacy', mode: 'spa' as const, path: '/settings/accounts' },
{ label: 'Emails', mode: 'spa' as const, path: '/settings/emails' },
{ label: 'Shipping & Delivery', mode: 'spa' as const, path: '/settings/shipping' },
{ label: 'Taxes', mode: 'spa' as const, path: '/settings/taxes' },
{ label: 'Checkout', mode: 'spa' as const, path: '/settings/checkout' },
{ label: 'Customer Accounts', mode: 'spa' as const, path: '/settings/customers' },
{ label: 'Notifications', mode: 'spa' as const, path: '/settings/notifications' },
{ label: 'Brand & Appearance', mode: 'spa' as const, path: '/settings/brand' },
// Less Common (Bridge to WP Admin for now)
// Advanced (Bridge to WP Admin)
{ label: 'Advanced', mode: 'bridge' as const, href: `${admin}?page=wc-settings&tab=advanced` },
{ label: 'Integration', mode: 'bridge' as const, href: `${admin}?page=wc-settings&tab=integration` },
{ label: 'Status', mode: 'bridge' as const, href: `${admin}?page=wc-status` },
{ label: 'Integrations', mode: 'bridge' as const, href: `${admin}?page=wc-settings&tab=integration` },
{ label: 'System Status', mode: 'bridge' as const, href: `${admin}?page=wc-status` },
{ label: 'Extensions', mode: 'bridge' as const, href: `${admin}?page=wc-addons` },
],
},

View File

@@ -173,19 +173,20 @@ class NavigationRegistry {
// WooNooW Settings
['label' => __('WooNooW', 'woonoow'), 'mode' => 'spa', 'path' => '/settings'],
// WooCommerce Settings (Most Used First)
['label' => __('General', 'woonoow'), 'mode' => 'spa', 'path' => '/settings/general'],
// Core Settings (Shopify-inspired)
['label' => __('Store Details', 'woonoow'), 'mode' => 'spa', 'path' => '/settings/store'],
['label' => __('Payments', 'woonoow'), 'mode' => 'spa', 'path' => '/settings/payments'],
['label' => __('Shipping', 'woonoow'), 'mode' => 'spa', 'path' => '/settings/shipping'],
['label' => __('Products', 'woonoow'), 'mode' => 'spa', 'path' => '/settings/products'],
['label' => __('Tax', 'woonoow'), 'mode' => 'spa', 'path' => '/settings/tax'],
['label' => __('Accounts & Privacy', 'woonoow'), 'mode' => 'spa', 'path' => '/settings/accounts'],
['label' => __('Emails', 'woonoow'), 'mode' => 'spa', 'path' => '/settings/emails'],
['label' => __('Shipping & Delivery', 'woonoow'), 'mode' => 'spa', 'path' => '/settings/shipping'],
['label' => __('Taxes', 'woonoow'), 'mode' => 'spa', 'path' => '/settings/taxes'],
['label' => __('Checkout', 'woonoow'), 'mode' => 'spa', 'path' => '/settings/checkout'],
['label' => __('Customer Accounts', 'woonoow'), 'mode' => 'spa', 'path' => '/settings/customers'],
['label' => __('Notifications', 'woonoow'), 'mode' => 'spa', 'path' => '/settings/notifications'],
['label' => __('Brand & Appearance', 'woonoow'), 'mode' => 'spa', 'path' => '/settings/brand'],
// Less Common (Bridge to WP Admin for now)
// Advanced (Bridge to WP Admin)
['label' => __('Advanced', 'woonoow'), 'mode' => 'bridge', 'href' => $admin . '?page=wc-settings&tab=advanced'],
['label' => __('Integration', 'woonoow'), 'mode' => 'bridge', 'href' => $admin . '?page=wc-settings&tab=integration'],
['label' => __('Status', 'woonoow'), 'mode' => 'bridge', 'href' => $admin . '?page=wc-status'],
['label' => __('Integrations', 'woonoow'), 'mode' => 'bridge', 'href' => $admin . '?page=wc-settings&tab=integration'],
['label' => __('System Status', 'woonoow'), 'mode' => 'bridge', 'href' => $admin . '?page=wc-status'],
['label' => __('Extensions', 'woonoow'), 'mode' => 'bridge', 'href' => $admin . '?page=wc-addons'],
];
}