Skip to content

Conversation

@apoorvajainrp21
Copy link

@apoorvajainrp21 apoorvajainrp21 commented Jan 5, 2026

Description

This PR resolves four critical issues identified during code review of the MailChimp replacement email management system, plus adds an enhancement for better user experience.

This frontend PR is related to Chaitanya's backend PR for email management OneCommunityGlobal/HGNRest#1945

Issues Fixed

Issue 1: VIDEO Variable Type Not Supported ✅

Problem: The videoUrl variable was displaying a "URL" badge instead of "VIDEO" badge because the video type wasn't recognized.
Files Changed:

  • src/components/EmailManagement/template-management/templates/EmailTemplateEditor.jsx

Issue 2: Clear Draft Button Not Working ✅

Problem: Clicking "Clear Draft" showed a success toast notification but the form data remained visible in the UI. Only localStorage was cleared, not the component state.
Files Changed:

  • src/components/EmailManagement/email-sender/IntegratedEmailSender.jsx

Issue 3: Offline Alert Banner Not Dismissing ✅

Problem: When internet connection was lost and then restored, the yellow "You are offline" Alert banner remained visible even though the connection was back.
Files Changed:

  • src/components/EmailManagement/email-sender/IntegratedEmailSender.jsx

Issue 4: Large Preview Images Hiding Extracted Content ✅

Problem: When preview emails contained large images, the images would overflow and hide the extracted text content below them, making it difficult to see the full email preview.
Files Changed:

  • src/components/EmailManagement/email-sender/IntegratedEmailSender.css

Enhancement: Automatic HTML Wrapping for Images and Videos ✅

Problem: Users had to manually write HTML tags (<img> and <a> tags) in their email templates to display images and videos properly in the preview.
Files Changed:

  • src/components/EmailManagement/email-sender/utils.js

Testing

All issues have been tested locally:

  • ✅ VIDEO badge displays correctly for video-type variables
  • ✅ Clear Draft completely resets the form UI
  • ✅ Offline alert banner auto-dismisses when connection is restored
  • ✅ Large images in preview are properly constrained and don't hide content
  • ✅ Images and videos render automatically in preview without manual HTML

Screenshots or videos of changes:

AlertBanner_Fixed_Issue3.mp4
ClearDraft_Fixed_Issue2.mp4
Network_Alert_Disappearing.mp4
VideoTag_Issue1

Note:

Include the information the reviewers need to know.

csk731 and others added 25 commits September 27, 2025 21:44
…mponents; refactor EmailPanel to use new template structure for improved email functionality.
…components to enhance email functionality and styling; implement fullscreen mode and modal for email settings. Update template data structure for improved link handling.
…ject input and improving link handling; update email sending actions to include subject in payload. Refactor toast notifications for consistency in styling and error handling.
…ermission checks; enhance error handling in NewsletterTemplateEditor with improved toast notifications. Update template data for consistent styling in footer content.
…nt with URL-based tab management

- Introduced a new route for Email Template Management accessible to specific user roles.
- Enhanced the Announcements component to manage active tabs based on URL query parameters, improving user navigation.
- Updated EmailPanel to support dynamic view switching between sending emails and managing templates, with URL synchronization.
- Integrated modal for sending emails with templates in the NewsletterTemplateEditor, enhancing user experience.
…s and improving success notifications. Update requestor information in payload for permission checks and remove redundant success message display logic.
… for auto-refresh, and improved filter functionality. Added email preview feature and refined UI elements for better user experience.
…anual retry functionality, and enhance UI elements. Updated styles for loading and error states, and optimized template data handling in EmailTemplateList and EmailTemplateEditor.
- Introduced actions for fetching email batch and item audit trails, along with audit statistics.
- Enhanced EmailBatchDashboard component to include buttons for viewing audit trails.
- Updated reducer to manage loading states and errors for audit actions.
- Added AuditTrailModal for displaying audit details, improving user experience and data visibility.
- Added a new protected route for viewing email announcements.
- Refactored email batch actions to focus on parent Email records, including renaming actions and updating API endpoints.
- Updated EmailBatchDashboard to manage emails instead of batches, improving clarity and functionality.
- Enhanced AuditTrailModal and EmailTemplate components for better user experience and error handling.
- Removed deprecated email sending functionality from templates, streamlining the process to utilize emailController endpoints.
- Improved loading states and UI elements across various components for consistency and better user feedback.
- Changed the logic to check for full template data before fetching additional content.
- Updated the API call to fetch full template data only when necessary, enhancing performance and user experience.
- Improved error handling during the fetch process to ensure continuity in case of failures.
- Deleted emailBatchActions.js to streamline email management, focusing on parent Email records.
- Updated emailTemplateActions.js to include new actions for previewing and validating email templates, while removing deprecated email sending actions.
- Refactored EmailBatchDashboard and related components to utilize EmailOutbox for improved email management.
- Enhanced error handling and loading states across various components for better user experience.
- Removed unused styles and components related to the previous email batch dashboard, optimizing the codebase.
- Fixed EmailOutbox stat card alignment and added clickable filter functionality
- Improved responsive design for mobile/tablet/desktop compatibility
- Standardized button sizes across all components
- Added EmailManagementShared.css for consistent styling
- Created LoadingSpinner component for unified loading states
- Fixed image preview overflow issues in IntegratedEmailSender
- Implemented smart processing logic for pending emails (excludes failed)
- Cleaned up ESLint warnings and replaced alerts with toast notifications
- Fixed import paths and added proper error handling
- Added WeeklyUpdateComposer and email constants
…fline alerts, and preview images

- Add VIDEO variable type support with video icon in EmailTemplateEditor
- Fix Clear Draft to properly reset form state in IntegratedEmailSender
- Fix offline alert banner to auto-dismiss when connection restored
- Fix preview images to display properly with constrained sizing in CSS
- Add automatic HTML wrapping for image/video variables in preview utils
@netlify
Copy link

netlify bot commented Jan 5, 2026

Deploy Preview for highestgoodnetwork-dev ready!

Name Link
🔨 Latest commit ca846e8
🔍 Latest deploy log https://app.netlify.com/projects/highestgoodnetwork-dev/deploys/695b2b0d49c22600089a7d56
😎 Deploy Preview https://deploy-preview-4670--highestgoodnetwork-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 5, 2026

Quality Gate Failed Quality Gate failed

Failed conditions
4 Security Hotspots
D Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@one-community one-community changed the title Pr 4492 Apoorva - Redo of email management UI improvements PR#4492 Jan 7, 2026
@one-community one-community changed the title Apoorva - Redo of email management UI improvements PR#4492 Apoorva - Email management UI improvements PR#4670 Jan 7, 2026
@one-community one-community changed the title Apoorva - Email management UI improvements PR#4670 Apoorva - Email management UI improvements Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants