Skip to content

Conversation

@ike-kottlowski
Copy link
Contributor

@ike-kottlowski ike-kottlowski commented Oct 23, 2025

🎟️ Tracking

None yet.

📔 Objective

We have a bit of a disjointed workflow this PR aims to improve that by:

  1. Referencing the build artifacts directly from the MJML namespace in the IMailService implementation, simplifying the process of finding the correct templates to consume.
  2. Tracking all build artifacts from the MJML development process, separate from the legacy handlebars artifacts.
  3. Adding a build option of npm run build:watch:hbs to listen to changes to template files and build *.html.hbs files based on the changes.

The initial workflow pass involved moving files from the MJML output (src/Core/MailTemplates/Mjml/out) into the Handlebars namespace (src/Core/MailTemplates/Handlebars) which can be error prone, especially if changes are made to a shared or common component. Making changes to a shared component requires all dependent emails be re-built and moved to the correct location, which is not scalable.

This process aims to make the build process more hands-off by referencing the MJML build artifacts directly in the IMailService implementation.

📸 Screenshots

A sample workflow involving the update of an image in an email

y56dly8jkU.mp4
  1. User calls an endpoint that triggers an email to be sent.
  2. User investigates the sent email.
  3. User ensures npm run build:watch:hbs is running in the background.
  4. User modifies mjml template triggering the watch to rebuild all templates.
  5. User rebuilds API project since HandlebarsMailService is registered as a singleton in the DI 6. Pipeline.
  6. User calls the same endpoint to trigger sending of same email.
  7. User investigates and sees the email is different from the initial email.

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

@github-actions
Copy link
Contributor

github-actions bot commented Oct 23, 2025

Logo
Checkmarx One – Scan Summary & Detailsed240ec3-36c0-4968-907a-d27260adbc7a

Great job! No new security vulnerabilities introduced in this pull request

@codecov
Copy link

codecov bot commented Oct 23, 2025

Codecov Report

❌ Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 51.99%. Comparing base (ff4b3eb) to head (3a9ce6a).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
.../Services/Implementations/HandlebarsMailService.cs 33.33% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6490      +/-   ##
==========================================
- Coverage   51.99%   51.99%   -0.01%     
==========================================
  Files        1876     1877       +1     
  Lines       82633    82617      -16     
  Branches     7316     7316              
==========================================
- Hits        42969    42954      -15     
  Misses      38008    38008              
+ Partials     1656     1655       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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