Skip to content

Conversation

@mmenanno
Copy link

🎯 Overview

Adds a new {ItemUrl} template variable to email notifications that provides direct links to media details pages, enhancing user experience by enabling one-click access to requested content. This also adds toggles to turn of the injected logo or posters from the email template if you either don't want the logo or are using the {PosterImage} variable to insert the posting in a custom way and don't want a duplicate. It also gives the option to turn off the entire basic email wrapper if the user wants to submit fully custom HTML in the body.

✨ Features Added

🔗 ItemUrl Template Variable

  • Direct media links in email notifications
  • Multi-media support: Movies (/details/movie/{id}), TV shows (/details/tv/{id}), Music (/details/artist/{id})
  • Configurable URLs using ApplicationUrl setting
  • Graceful fallback when ApplicationUrl not configured

🎨 Enhanced Email Notification UI

  • New "Advanced Template Customizations" section
  • Organized toggles for email template options:
    • Use Basic Email Wrapper
    • Include Header Logo
    • Include Movie/TV Poster

🖼️ UI Preview

w3zn8-921nx-2508

📝 Implementation Details

Backend Changes

  • NotificationMessageCurlys.cs - Core GetDetailsUrl() method for URL generation
  • Email template system - Enhanced to support conditional logo/poster inclusion
  • Settings integration - Uses existing ApplicationUrl configuration

Frontend Changes

  • TypeScript interfaces - Added new email notification properties
  • Angular component - Enhanced email settings UI
  • Form controls - New toggles for advanced template customization

Email Template Enhancement

  • Conditional rendering - Logo and poster inclusion based on user preferences

🧪 Testing

  • ✅ Movie request emails generate correct URLs
  • ✅ TV show request emails generate correct URLs
  • ✅ Music request emails generate correct URLs
  • ✅ UI displays properly on all screen sizes
  • ✅ Graceful handling when ApplicationUrl not set
  • ✅ Advanced customization toggles work correctly

- Add ItemUrl variable to email templates that generates direct links to media details pages
- Support for movies (/details/movie/{id}), TV shows (/details/tv/{id}), and music (/details/artist/{id})
- Uses configured ApplicationUrl setting for proper URL construction
- Enhances user experience by providing one-click access to requested media
- Reorganizes email notification UI with dedicated 'Advanced Template Customizations' section
- Professional styling with proper spacing, readable white text, and grey underline
@tidusjar
Copy link
Member

tidusjar commented Aug 28, 2025

🎉 Snyk checks have passed. No issues have been found so far.

security/snyk check is complete. No issues have been found. (View Details)

@mmenanno mmenanno force-pushed the feature/email-customization-complete branch from 10cb43c to 0bf75e5 Compare August 28, 2025 06:18
Code Quality Fixes:
- Rename parameter 'imgsrc' to 'img' for consistency
- Extract nested ternary operation into GetLogoContent method
- Remove duplicate method overload causing signature ambiguity
- Make GetPosterContent method static for better performance
- Convert EmailNotificationComponent and SettingsMenuComponent to standalone architecture

Testing:
- Add comprehensive unit tests for EmailBasicTemplate with 18 test cases
- Test all LoadTemplate parameter combinations and overloads
- Test GetPosterContent static method with various inputs
- Include edge cases, error conditions, and validation tests
- All tests passing with 100% coverage of changes made

This resolves all Angular quality gate issues including typescript-S7648.
@mmenanno mmenanno force-pushed the feature/email-customization-complete branch from 0bf75e5 to a2e31f1 Compare August 28, 2025 06:25
@sonarqubecloud
Copy link

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.

2 participants