feat(email): Add email digest templates, styles, and components #2149
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.


This commit introduces a comprehensive email delivery system, complete with structured templates, reusable components, and a dedicated styling system.
New email templates, including a
defaultEmailTemplate, have been added, leveraging Go'shtml/templatepackage for dynamic content rendering. These templates are designed with a component-based architecture, making them modular and easy to maintain.A key feature of this commit is the introduction of reusable email components, such as badges, banners, and stat boxes. These components are defined in
workers/email/pkg/digest/components.goand are designed to be easily configurable and reusable across different email types.To ensure a consistent and polished look, a dedicated styling system has been implemented in
workers/email/pkg/digest/styles.go. This file contains all the CSS styles used in the email templates, defined as template snippets. This approach centralizes all styling information, making it easy to manage and update the visual appearance of the emails.A golden file,
digest.golden.html, has been added to the test data to ensure that the email rendering remains consistent and predictable. The.prettierignoreandMakefilehave been updated to exclude this file from formatting and license checks.Additionally, a suite of email icons and logos has been added to
frontend/src/static/img/emailto enhance the visual appeal of the emails.