Skip to content

Commit db9a90d

Browse files
author
Rajat
committed
Updated the PRD
1 parent 35e3c1b commit db9a90d

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

apps/queue/docs/notification-email-template-overhaul.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,22 @@
22

33
## Summary
44

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.
66

77
## Key Changes
88

99
- Render notification emails with `renderEmailToHtml` from `@courselit/email-editor` instead of raw inline HTML.
1010
- Template structure:
11-
- Actor row with avatar and `actorName`.
11+
- Actor avatar, when available, followed by `actorName`.
1212
- Notification message.
1313
- Centered `View notification` button.
1414
- Footer separator/spacer.
1515
- Small centered grey unsubscribe footer.
1616
- Conditional `Powered by CourseLit` badge below the footer.
1717
- Avatar behavior:
1818
- 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.
2021
- Branding behavior:
2122
- Match existing system-email templates.
2223
- 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
3536
- `unsubscribeUrl`
3637
- `hideCourseLitBranding`
3738
- 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.
3940

4041
## Tests
4142

4243
- Verify the rendered email includes:
4344
- 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.
4547
- `View notification` before unsubscribe.
4648
- Unsubscribe only in the footer area.
4749
- `Powered by CourseLit` when branding is not hidden.

0 commit comments

Comments
 (0)