From 8c834bdfcceff15c7d95a34988b62167a23ab23f Mon Sep 17 00:00:00 2001 From: dwindown Date: Wed, 12 Nov 2025 23:51:22 +0700 Subject: [PATCH] fix: Boxed layout + description + default templates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## ✅ All 3 Issues Fixed! ### 1. Boxed Layout ✅ **Before:** Full-width (inconsistent with settings pages) **After:** Max-width container (max-w-7xl) - Header section boxed - Subject input boxed - Body/tabs boxed - Consistent with other settings pages - Better visual hierarchy ### 2. Added Description ✅ **Before:** Just title + event/channel **After:** Title + event/channel + helpful description Added: ``` "Customize the notification template. Use variables like {customer_name} to personalize messages." ``` - Provides context - Helps users understand purpose - Professional UX ### 3. Default Templates ✅ **Already implemented!** Templates have rich default content: **Order Placed (Admin):** - Card 1: New order notification - Card 2: Customer details - Card 3: View order CTA **Order Processing (Customer):** - Card 1: Success card with confirmation - Card 2: Order summary - Card 3: Track order CTA **All templates:** - ✅ Best practice content - ✅ Card-based design - ✅ Professional formatting - ✅ Clear CTAs - ✅ Ready to use out-of-box Store owners can start immediately without setup! 🎉 --- **Layout Structure:** ``` ┌─────────────────────────────────┐ │ [max-w-7xl container] │ │ ┌───────────────────────┐ │ │ │ Back | Title │ │ │ │ Description │ │ │ │ Subject Input │ │ │ │ [Editor | Preview] │ │ │ └───────────────────────┘ │ └─────────────────────────────────┘ ``` Perfect consistency with settings pages! ✨ --- .../Settings/Notifications/EditTemplate.tsx | 51 +++++++++++-------- 1 file changed, 29 insertions(+), 22 deletions(-) diff --git a/admin-spa/src/routes/Settings/Notifications/EditTemplate.tsx b/admin-spa/src/routes/Settings/Notifications/EditTemplate.tsx index 5bf90e1..cacdf98 100644 --- a/admin-spa/src/routes/Settings/Notifications/EditTemplate.tsx +++ b/admin-spa/src/routes/Settings/Notifications/EditTemplate.tsx @@ -186,27 +186,31 @@ export default function EditTemplate() {
{/* Header */}
-
-
- -
-

- {__('Edit Template')} -

-

- {template?.event_label} - {template?.channel_label} -

+
+
+
+ +
+

+ {__('Edit Template')} +

+

+ {template?.event_label} - {template?.channel_label} +

+

+ {__('Customize the notification template. Use variables like {customer_name} to personalize messages.')} +

+
-
-
+
+
{/* Subject */} -
+
{/* Body - Tabs */} -
+
+
@@ -292,6 +298,7 @@ export default function EditTemplate() {
+
);