Shravan - Email Management UI Fixes (Completing Apoorva's PR #4492 and #4731)#4762
Shravan - Email Management UI Fixes (Completing Apoorva's PR #4492 and #4731)#4762Shravan-neelamsetty wants to merge 10 commits intodevelopmentfrom
Conversation
- Email template management with CRUD operations - Integrated email sender with template support - Email outbox with batch tracking and status monitoring - Retry and resend functionality for failed emails - Dark mode support throughout - Responsive design for all components - Fixed CSS files to use CSS Modules (.module.css) Taking over from Apoorva (PR #4492 and #4731) Note: CSS duplicates will be cleaned in next commit
- Removed duplicate CSS selectors from multiple files - Updated .gitignore to exclude Community/ and public/tinymce/ - CSS validation will be fixed in follow-up commit
Issue 2 - Search UX in Templates: - Keep search bar, sort dropdown, and create button visible during loading - Only show loading spinner in template list area - Disable controls during loading to prevent rapid changes Issue 3 - Variable Labels in Preview: - Remove 'No Label' text from variable preview modal - Show variable icon + name only - Add tooltip showing variable type on hover Other fixes: - Add missing useEffect import in Announcements component - Fix CSS syntax errors in EmailTemplateEditor - Add URL routing foundation (WIP for Issue 1) Taking over from Apoorva PR #4492 Based on Chaitanya's feedback
Issue 2 ✅ - Search UX in Templates: - Keep controls visible during loading - Only template list shows spinner Issue 3 ✅ - Variable Labels in Preview: - Show icon + name instead of 'No Label' - Add tooltip with variable type Issue 4 ✅ - Remove Validate API: - Removed unnecessary validateEmailTemplate API call - Save already validates internally Issue 5 ✅ - Template Creation Bug: - Track created template ID - Subsequent saves now UPDATE instead of CREATE - Prevents 'name already exists' error Issue 6 ✅ - Auto Extract Messages: - Use toast.info instead of toast.alert - Show informative messages when no variables found Issue 7 ✅ - Invalid YouTube URL: - Show clear error message instead of gray dummy image - Distinguish between invalid YouTube ID and invalid image URL - Better user feedback Remaining: Issues 1, 8, 9, 10, 11 (to be fixed next)
Issue 8 ✅ - Draft Management: - Use RESET_FORM action for complete state reset - Clear draft notification after clearing - Better success feedback Issue 9 ✅ - Outbox Management: - Add confirmation modal before Retry - Label counts as 'Batches' instead of 'Recipients' - Fresh data already fetches on tab mount Issue 10 ✅ - Template Load Error Handling: - Show clear error message when template loading fails - Show loading/success toasts - Don't select template if loading fails - Prevents '0 variables' confusion All tested and verified working. Remaining: Issues 1, 11
Issue 11 ✅ - Resend Email Modal Blocking: - Don't await full resend completion - Close modal immediately after initiating resend - Show toast: 'Email created for resend successfully!' - Handle promise in background without blocking UI - Let Outbox dashboard show status updates - Prevents modal from staying stuck in 'Sending...' state Tested and verified working on localhost. All 10 issues (2-11) from Chaitanya's feedback are now complete! Only Issue 1 (URL Navigation) remains.
Issue 1 - URL Navigation: - Add React Router hooks (useHistory, useLocation) to EmailPanel - Parse URL to determine current view and tab - Update URL when switching views/tabs - Sync state with URL changes for browser back/forward - Add exact match for dashboard route - Add missing routes: /announcements/email/send and /outbox Consistency Fix: - EmailTemplateList now uses same emoji icons as EmailTemplateEditor - Added getVariableTypeIcon helper function - Variables display consistently across both modals All 11 issues from Chaitanya feedback are now complete! URL Structure: - /announcements/email → Dashboard - /announcements/email/send → Send Email tab - /announcements/email/outbox → Outbox tab - /announcements/email/templates → Templates page Tested and verified working.
❌ Deploy Preview for highestgoodnetwork-dev failed.
|
There was a problem hiding this comment.
Hi Shravan,
I have reviewed your PR locally and below are my trouble points:
Issue 1: The whole page is left sided and not in center (reference would be the old PR & also there is no gap between templates and custom; templated and the preview and send button; email distribution

Issue 2: The UI of the templates page is also left sided, the search text box goes over the left border and the search icon blocks the text; the create template button goes over the right border

Issue 3: In Create Template/Edit Email Template as well everything is left sided and there is no spacing between buttons and no spacing in template variables

Issue 4: Hover issue

Issue 5: As you can see the Modal is still in sending mode even after selecting resend and that resend failing, it stays the same even after refresh and reload
issue.mp4
Issue 6: Dark Mode not implemented properly in any page
darkmode.mp4
Test Case positives approaches
testissue1.mp4
testissue2.mp4
testissue3.mp4
testissue5.6.mp4
Issue 1 - URL Navigation: - Add React Router hooks (useHistory, useLocation) to EmailPanel - Parse URL to determine current view and tab - Update URL when switching views/tabs - Sync state with URL changes for browser back/forward - Add exact match for dashboard route - Add missing routes: /announcements/email/send and /outbox Consistency Fix: - EmailTemplateList now uses same emoji icons as EmailTemplateEditor - Added getVariableTypeIcon helper function - Variables display consistently across both modals All 11 issues from Chaitanya feedback are now complete! URL Structure: - /announcements/email → Dashboard - /announcements/email/send → Send Email tab - /announcements/email/outbox → Outbox tab - /announcements/email/templates → Templates page Tested and verified working.
… modal state bug Issue 2 - Templates List Page: - Added centering to EmailManagement.module.css parent wrapper (max-width: 1400px, margin: 0 auto, padding: 0 2rem) - Fixed search icon overlap by increasing padding-left to 2.75rem - Added pointer-events: none to search icon to prevent blocking input - Fixed Create Template button overflow with max-width - Renamed EmailTemplateList.module.css to EmailTemplateList.css - Updated import in EmailTemplateList.jsx Issue 4 - Hover improvements: - Enhanced hover effects across email management components Issue 5 - Modal Stuck in SENDING: - Fixed IntegratedEmailSender modal state reset on send failure - Moved isSending reset before modal close - Added explicit state reset in catch block - Fixed EmailOutbox with cache-busting and 30s auto-refresh - Force refresh after resend/retry/close modal Issue 1 (Send Email button layout) still in progress.
- Add Weekly Update button to email sender mode selector - Reorganize Send Email page with horizontal button layout - Style Email Distribution options with enhanced hover and selection states - Improve Template Editor with horizontal action buttons in header - Add styled variable chips with type badges (NUMBER, URL, TEXT, IMAGE) - Add inline styles for better cross-browser compatibility - Maintain responsive design and existing functionality
|


Description
This PR completes the Email Management UI improvements by addressing all 11 critical issues identified in Chaitanya's comprehensive feedback on PR #4492. This work takes over from Apoorva's previous attempts and provides a complete, tested solution for the Email Announcement System frontend.
Fixes: High Priority Issues from Chaitanya's feedback (PDF attached to PR #4492)
Implements: Email Management System Enhancement - Complete UI/UX Fixes
Related PRs :
Frontend:
Supersedes #4492 (Apoorva - original with conflicts)
Supersedes #4731 (Apoorva - clean version)
Backend:
This frontend PR is related to OneCommunityGlobal/HGNRest#1945 backend PR (Chaitanya - Mailchimp Replacement)
To test this frontend PR, you need to checkout the backend PR #1945 on branch chaitanya-mailchimp-replacement
Main changes explained:
Issue 1: URL Navigation
Issue 2: Search UX in Templates
Issue 3: Variable Labels in Preview
Issue 4: Remove Validate API
Issue 5: Template Creation Bug
Issue 6: Auto Extract Messages
Issue 7: Invalid YouTube URL Validation
Issue 8: Draft Management
Issue 9: Outbox Management
Issue 10: Template Load Error Handling
Issue 11: Resend Email Modal Blocking
Additional Fixes
How to test:
Setup:
Test Issue 1 (URL Navigation):
Test Issue 2 (Search UX):
Test Issue 3 (Variable Labels):
Test Issue 4 (Validate API):
Test Issue 5 (Template Save Bug):
Test Issue 6 (Auto Extract):
Test Issue 7 (Invalid YouTube):
Test Issue 8 (Draft Management):
Test Issue 9 (Outbox):
Part 1: DevTools Network tab → Switch to Outbox → Verify API call → Switch to Send → Switch to Outbox again → Verify another API call
Part 2: Click "Retry" on FAILED email → Verify confirmation dialog appears → Click OK → Retry proceeds
Part 3: Click "Details" on email → Verify Row 6 shows "Sent Batches" and "Failed Batches" (not Recipients)
Test Issue 10 (Template Load Error):
Normal: Select template → Verify loading + success toasts
Error Simulation: DevTools → Network request blocking → Add pattern /api/email-templates/ → Enable blocking → Select template → Verify error toast and template not selected → Disable blocking
Test Issue 11 (Resend Modal):
Screenshots Recordings of changes:
Issue 1:
issue.1.mov
Issue 2:
issue.2.mov
Issue 3:
issue.3.mov
Issue 4:
issue.4.mov
Issue 5-6:
issue.5-6.mov
Issue 7-8:
issue.7-8.mov
Issue 9:
issue.9.mov
Issue 10:
issue.10.mov
Issue 11:
issue.11.mov
For Reviewers:
All 11 issues from Chaitanya's PDF feedback have been addressed
This PR supersedes both #4492 and #4731
Backend PR #1945 must be running for full testing
Chaitanya is leaving in 3 weeks - please prioritize review
Original feedback: #4492 (comment)