You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: apps/queue/docs/notification-email-template-overhaul.md
+7-5Lines changed: 7 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,21 +2,22 @@
2
2
3
3
## Summary
4
4
5
-
Replace the hand-written notification email HTML in `@courselit/queue` with a standardized `@courselit/email-editor` template. The email will show the actor beside an avatar, make “View notification” the clear primary button, move unsubscribe into small grey footer text, and conditionally include a CourseLit branding badge.
5
+
Replace the hand-written notification email HTML in `@courselit/queue` with a standardized `@courselit/email-editor` template. The email will show the actor name with the actor avatar when a safe avatar URL exists, make “View notification” the clear primary button, move unsubscribe into small grey footer text, and conditionally include a CourseLit branding badge.
6
6
7
7
## Key Changes
8
8
9
9
- Render notification emails with `renderEmailToHtml` from `@courselit/email-editor` instead of raw inline HTML.
10
10
- Template structure:
11
-
- Actor row with avatar and`actorName`.
11
+
- Actor avatar, when available, followed by`actorName`.
12
12
- Notification message.
13
13
- Centered `View notification` button.
14
14
- Footer separator/spacer.
15
15
- Small centered grey unsubscribe footer.
16
16
- Conditional `Powered by CourseLit` badge below the footer.
17
17
- Avatar behavior:
18
18
- Use `payload.actor.avatar.file`, then `payload.actor.avatar.thumbnail`.
19
-
- If no avatar URL exists, render initials from `actorName`.
19
+
- Render the avatar only when the URL is safe for email markup.
20
+
- If no safe avatar URL exists, skip the avatar image entirely and render only the actor name.
20
21
- Branding behavior:
21
22
- Match existing system-email templates.
22
23
- Show the badge when `!payload.domain.settings?.hideCourseLitBranding`.
@@ -35,13 +36,14 @@ Replace the hand-written notification email HTML in `@courselit/queue` with a st
35
36
-`unsubscribeUrl`
36
37
-`hideCourseLitBranding`
37
38
- Use standard email-editor `image` and `text` blocks for actor avatar/name rendering.
38
-
-When no actor avatar URL exists, generate a small initials SVG data URI for the image block.
39
+
-Do not generate initials image fallbacks; some email clients render `data:` images as broken images.
39
40
40
41
## Tests
41
42
42
43
- Verify the rendered email includes:
43
44
- Actor name and avatar URL when available.
44
-
- Initials fallback when avatar is missing.
45
+
- No avatar image when avatar is missing.
46
+
- No avatar image when the avatar URL uses an unsafe scheme.
45
47
-`View notification` before unsubscribe.
46
48
- Unsubscribe only in the footer area.
47
49
-`Powered by CourseLit` when branding is not hidden.
0 commit comments