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)
Sat, Dec 14, 11:56 PM
Unknown Object (File)
Sat, Dec 14, 11:56 PM
Unknown Object (File)
Sat, Dec 14, 11:55 PM
Unknown Object (File)
Sat, Dec 14, 11:39 PM
Unknown Object (File)
Wed, Nov 27, 1:40 AM
Unknown Object (File)
Nov 22 2024, 9:52 AM
Unknown Object (File)
Nov 22 2024, 3:54 AM
Unknown Object (File)
Nov 12 2024, 12:00 PM
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