fix(email): document post-queue render path and tighten guard
This commit is contained in:
@@ -71,7 +71,7 @@ email/
|
||||
invitation.html # MODIFY
|
||||
banned.html # MODIFY
|
||||
test.html # MODIFY
|
||||
notification.html # MODIFY: keeps body, IMPORTs post-queue-body when applicable
|
||||
notification.html # MODIFY: keeps {body}; post queue flow supplies rendered post-queue body
|
||||
digest.html # MODIFY: keeps loops; reskinned
|
||||
README.md # MODIFY: partials now real; document IMPORT + literal-hex constraint
|
||||
languages/
|
||||
@@ -526,7 +526,7 @@ git commit -m "feat(email): convert banned.html to shared partials + brand"
|
||||
|
||||
### Task 8: Convert `notification.html` + reskin `post-queue-body.html`
|
||||
|
||||
`notification.html` keeps its notification body and imports `post-queue-body.html` for post-queue notifications.
|
||||
`notification.html` keeps `{body}`. NodeBB's post queue flow renders `post-queue-body.html` server-side into that notification body before the email template renders.
|
||||
|
||||
**Files:**
|
||||
- Modify: `email/notification.html`, `email/partials/post-queue-body.html`
|
||||
@@ -558,9 +558,9 @@ git commit -m "feat(email): convert banned.html to shared partials + brand"
|
||||
<p style="color: #3a3340;">{content}</p>
|
||||
```
|
||||
|
||||
- [x] **Step 2: Read `email/notification.html`** (lines ~166–417 are the header/body/footer). Note where it renders the notification body and whether it already `IMPORT`s `post-queue-body.html`.
|
||||
- [x] **Step 2: Read `email/notification.html`** (lines ~166–417 are the header/body/footer). Note where it renders `{body}`; post-queue content is supplied by NodeBB before template render.
|
||||
|
||||
- [x] **Step 3: Apply the Task 6 transform to `notification.html`** — IMPORT header + `[[email:notification.preheader]]` preheader + retained body table (palette/font find/replace) + IMPORT footer. Preserve the `.notification-body` content and any `{{{ if }}}` post-queue branch; if the body renders a post-queue item, keep/add `<!-- IMPORT emails/partials/post-queue-body.html -->` inside that branch. Add `style="color: #a8893f;"` to notification body links.
|
||||
- [x] **Step 3: Apply the Task 6 transform to `notification.html`** — IMPORT header + `[[email:notification.preheader]]` preheader + retained body table (palette/font find/replace) + IMPORT footer. Preserve the `.notification-body` content that renders `{body}`; post-queue content is already rendered into that value by NodeBB before this template runs. Add `style="color: #a8893f;"` to notification body links.
|
||||
|
||||
- [ ] **Step 4: Guard + build**
|
||||
|
||||
@@ -709,4 +709,4 @@ Task 12 note: `node scripts/check-emails.js` passed with `Email template check p
|
||||
|
||||
**Placeholder scan:** Color/font changes given as a concrete find/replace table; `header.html`/`footer.html`/`reset.html`/`post-queue-body.html` given as complete markup; per-template specifics tabulated. Tasks 6–9 reference complete bodies that already exist in the repo (transform, not author-from-scratch) — the engineer reads the existing file and applies the listed mechanical changes. No "TBD"/"handle edge cases".
|
||||
|
||||
**Type/name consistency:** Import paths (`emails/partials/header.html`/`footer.html`/`post-queue-body.html`), preheader keys (`[[email:<name>.preheader]]`), the `<!-- preheader -->` marker, and the guard script's regexes all agree across tasks.
|
||||
**Type/name consistency:** Import paths (`emails/partials/header.html`/`footer.html`), preheader keys (`[[email:<name>.preheader]]`), the `<!-- preheader -->` marker, and the guard script's regexes all agree across tasks. `post-queue-body.html` is rendered by NodeBB's post queue flow into notification body content.
|
||||
|
||||
@@ -15,9 +15,10 @@ verbatim. Three issues:
|
||||
like they came from the same product as the forum.
|
||||
2. **Massive duplication.** Each template inlines the full `<head>` (reset CSS,
|
||||
media queries), header, and footer — ~400 lines per file, ~390 of them
|
||||
identical across all 10. `partials/header.html`, `partials/footer.html`, and
|
||||
`partials/post-queue-body.html` exist but **nothing imports them** — they are
|
||||
dead code, and the README wrongly claims they are included.
|
||||
identical across all 10. `partials/header.html` and `partials/footer.html`
|
||||
exist but **nothing imports them** — they are dead code, and the README
|
||||
wrongly claims they are included. `partials/post-queue-body.html` is rendered
|
||||
by NodeBB's post queue flow into notification body content.
|
||||
3. **Inbox hygiene gaps.** Every template has an empty `<title>` and no
|
||||
preheader (inbox preview text). These make messages look unfinished in the
|
||||
inbox list and are easy wins under deliverability heuristics.
|
||||
@@ -67,7 +68,7 @@ email/
|
||||
partials/
|
||||
header.html # doctype, <head>, brand <style>, letterhead band, open container
|
||||
footer.html # gold hairline, unsubscribe block, closing tags
|
||||
post-queue-body.html # unchanged in structure; reskinned
|
||||
post-queue-body.html # NodeBB post queue flow renders this into notification body; reskinned
|
||||
welcome.html # IMPORT header + body block + IMPORT footer
|
||||
verify-email.html
|
||||
reset.html
|
||||
@@ -75,7 +76,7 @@ email/
|
||||
registration_accepted.html
|
||||
banned.html
|
||||
invitation.html
|
||||
notification.html # body imports post-queue-body.html when applicable
|
||||
notification.html # renders {body}; post queue flow supplies rendered post-queue body
|
||||
digest.html # keeps its loops; reskinned
|
||||
test.html
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user