Page MenuHomePhabricator

[reports-service] Introduce e-mail template
ClosedPublic

Authored by bartek on Aug 28 2023, 11:02 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Apr 30, 3:41 AM
Unknown Object (File)
Sun, Apr 28, 12:17 AM
Unknown Object (File)
Thu, Apr 25, 1:58 PM
Unknown Object (File)
Apr 4 2024, 11:15 AM
Unknown Object (File)
Apr 4 2024, 11:14 AM
Unknown Object (File)
Apr 4 2024, 11:05 AM
Unknown Object (File)
Mar 7 2024, 4:41 PM
Unknown Object (File)
Feb 26 2024, 2:15 AM
Subscribers

Details

Summary

This diff introduces HTML templates using Maud library, which allows to rendering HTML using Rust macros.
The templates will be used to render HTML e-mails for reports.
Also included some base HTML page layout (the <html>, <head>, <body> tags) along with some basic CSS styling.

Depends on D8980

Test Plan

Created a temporary HTTP endpoint that renders HTML and opened it in the browser.
Screenshots of the final result in D8988

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bartek held this revision as a draft.
bartek edited the test plan for this revision. (Show Details)
bartek published this revision for review.Aug 29 2023, 12:21 AM
michal added a reviewer: tomek.

Adding @tomek because of new dependency

services/reports/src/email/template/mod.rs
43–49 ↗(On Diff #30460)

Should we also add stateVersion?

This revision is now accepted and ready to land.Aug 29 2023, 9:19 AM
This revision now requires review to proceed.Aug 30 2023, 1:53 AM

The dependency looks ok - has an appropriate license, is maintained, and doesn't have serious issues open. It also seems convenient to use, so it's probably not worth it to search for possible alternatives.

This revision is now accepted and ready to land.Aug 30 2023, 2:17 AM