0
Rework EMailTemplate: blocks rendered at the end, one template file per block, shared design tokens
Source: nextcloud/server#65330 · opened by @skjnldsv
After the email redesign for 36 (#65193, #65194, #65312 and the PRs moving mails over), lib/private/Mail/EMailTemplate.php has become hard to change, and hard for customers to customise. Ten PRs in, these are the parts that slowed us down: | Today | What it cost | |---|---| | The HTML lives in ~35 PHP heredocs filled with positional vsprintf (%7\$s) | Every visual tweak is a careful edit of long strings | | Colors, radius and font stack repeated in about 50 inline styles, dark mode as a separate set of rules in <head> | The NcNoteCard colors (#65222) and dark mode links touched dozens of places | | bodyOpened / bodyListOpened / footerAdded decide where HTML gets appended | Headings and the sender block have to close the body by hand | | addBodyText($text, $plainText) silently treats $text as raw HTML when $plainText is given | That's how the &amp; heading bug happened (#65219) | | Right-to-left mirroring is a regex over the finished HTML (#65312) | Works, but it…
No pledges yet. Be the first to back this.
Comments
Similar requests
File template rework
6 votes · 0 comments
Projects rework to automatic "Related resources"
0 votes · 0 comments
User cannot move shared file to shared folder
0 votes · 0 comments
No logs when config file lock blocks indefinitely
0 votes · 0 comments
Make oauth2 tokens expiration time configurable
0 votes · 0 comments
No comments yet.