Create MJML registration confirmation email template #8

Closed
opened 2026-04-07 19:11:17 +00:00 by forgejo_admin · 1 comment
Contributor

Type

Feature

Lineage

Standalone — discovered during registration flow audit (2026-04-07). Current confirmation email is inline Python HTML with hardcoded March 24 tryout details.

Repo

forgejo_admin/westside-emails

User Story

As a parent who just registered
I want to receive a professional branded email confirming my registration with my player details and login credentials
So that I know my registration worked and can access my account

Context

The confirmation email is currently built as 180 lines of inline HTML in basketball-api/services/email.py via _build_confirmation_html(). It hardcodes "Tuesday, March 24" tryout details. The MJML template system already exists and is used by jersey-reminder — this template needs to join that system. The sponsor-outreach.mjml template provides the brand shell to follow: dark header with logo, red accent bar, body content, dark footer.

File Targets

Files to create:

  • src/registration-confirmation.mjml — new MJML template
  • compiled/registration-confirmation.html — compiled output

Files for reference (do not modify):

  • src/sponsor-outreach.mjml — brand shell to match
  • compiled/jersey-reminder.html — example of working compiled template

Acceptance Criteria

  • Template compiles without errors via MJML CLI
  • Compiled HTML renders correctly in Gmail (web + mobile)
  • Compiled HTML renders correctly in Apple Mail
  • Brand matches existing templates: dark header, logo, red accent bar, dark footer
  • All placeholders present: parent_name, player_name, division, position, height, grad_class, profile_url, frontend_url, credentials_block, tenant_name
  • No event/tryout details anywhere in template
  • credentials_block placeholder handles empty string gracefully

Test Expectations

  • Compile: mjml src/registration-confirmation.mjml -o compiled/registration-confirmation.html
  • Preview: open compiled HTML in browser, verify layout
  • Test with placeholder values filled in manually
  • Run command: mjml src/registration-confirmation.mjml -o compiled/registration-confirmation.html

Constraints

  • Use same MJML head/attributes as sponsor-outreach.mjml (Ubuntu font, 13px base, dark palette)
  • Red accent: #c41230 (matches existing templates)
  • Logo URL: https://minio-api.tail5b443a.ts.net/assets/westside/branding/logo.jpeg
  • Placeholder syntax: {{key}} (literal double braces — basketball-api does simple string replacement, no Jinja)
  • credentials_block is pre-rendered HTML injected by the API — template just places it

Checklist

  • PR opened
  • Template compiles
  • No unrelated changes
  • westside-basketball — project
  • forgejo_admin/basketball-api#383 — consumes this template via load_email_template() (parallel ticket)
  • Spec: pal-e-platform/docs/superpowers/specs/2026-04-07-registration-flow-fix-design.md
### Type Feature ### Lineage Standalone — discovered during registration flow audit (2026-04-07). Current confirmation email is inline Python HTML with hardcoded March 24 tryout details. ### Repo `forgejo_admin/westside-emails` ### User Story As a parent who just registered I want to receive a professional branded email confirming my registration with my player details and login credentials So that I know my registration worked and can access my account ### Context The confirmation email is currently built as 180 lines of inline HTML in `basketball-api/services/email.py` via `_build_confirmation_html()`. It hardcodes "Tuesday, March 24" tryout details. The MJML template system already exists and is used by `jersey-reminder` — this template needs to join that system. The `sponsor-outreach.mjml` template provides the brand shell to follow: dark header with logo, red accent bar, body content, dark footer. ### File Targets Files to create: - `src/registration-confirmation.mjml` — new MJML template - `compiled/registration-confirmation.html` — compiled output Files for reference (do not modify): - `src/sponsor-outreach.mjml` — brand shell to match - `compiled/jersey-reminder.html` — example of working compiled template ### Acceptance Criteria - [ ] Template compiles without errors via MJML CLI - [ ] Compiled HTML renders correctly in Gmail (web + mobile) - [ ] Compiled HTML renders correctly in Apple Mail - [ ] Brand matches existing templates: dark header, logo, red accent bar, dark footer - [ ] All placeholders present: parent_name, player_name, division, position, height, grad_class, profile_url, frontend_url, credentials_block, tenant_name - [ ] No event/tryout details anywhere in template - [ ] credentials_block placeholder handles empty string gracefully ### Test Expectations - [ ] Compile: `mjml src/registration-confirmation.mjml -o compiled/registration-confirmation.html` - [ ] Preview: open compiled HTML in browser, verify layout - [ ] Test with placeholder values filled in manually - Run command: `mjml src/registration-confirmation.mjml -o compiled/registration-confirmation.html` ### Constraints - Use same MJML head/attributes as `sponsor-outreach.mjml` (Ubuntu font, 13px base, dark palette) - Red accent: `#c41230` (matches existing templates) - Logo URL: `https://minio-api.tail5b443a.ts.net/assets/westside/branding/logo.jpeg` - Placeholder syntax: `{{key}}` (literal double braces — basketball-api does simple string replacement, no Jinja) - credentials_block is pre-rendered HTML injected by the API — template just places it ### Checklist - [ ] PR opened - [ ] Template compiles - [ ] No unrelated changes ### Related - `westside-basketball` — project - `forgejo_admin/basketball-api#383` — consumes this template via `load_email_template()` (parallel ticket) - Spec: `pal-e-platform/docs/superpowers/specs/2026-04-07-registration-flow-fix-design.md`
Author
Contributor

APPROVED — reference files verified, placeholders aligned, no conflicts.

Verification details:

  1. Reference file: src/sponsor-outreach.mjml exists as brand shell reference.
  2. Compiled directory: compiled/ exists with 5 existing templates (action, announcement, jersey-reminder, notification, sponsor-outreach).
  3. MJML CLI: Available via npx, version 4.18.0. Build command in ticket is correct: mjml src/registration-confirmation.mjml -o compiled/registration-confirmation.html.
  4. Placeholders: All 10 placeholders (parent_name, player_name, division, position, height, grad_class, profile_url, frontend_url, credentials_block, tenant_name) align with the design spec. division is a new addition (not in current inline HTML) — the parallel basketball-api ticket (#383) will wire it. profile_url replaces the old reg_url with updated copy context.
  5. No conflicts: registration-confirmation.mjml does not exist in src/.

Ready for dev.

APPROVED — reference files verified, placeholders aligned, no conflicts. **Verification details:** 1. **Reference file:** `src/sponsor-outreach.mjml` exists as brand shell reference. 2. **Compiled directory:** `compiled/` exists with 5 existing templates (action, announcement, jersey-reminder, notification, sponsor-outreach). 3. **MJML CLI:** Available via npx, version 4.18.0. Build command in ticket is correct: `mjml src/registration-confirmation.mjml -o compiled/registration-confirmation.html`. 4. **Placeholders:** All 10 placeholders (`parent_name`, `player_name`, `division`, `position`, `height`, `grad_class`, `profile_url`, `frontend_url`, `credentials_block`, `tenant_name`) align with the design spec. `division` is a new addition (not in current inline HTML) — the parallel basketball-api ticket (#383) will wire it. `profile_url` replaces the old `reg_url` with updated copy context. 5. **No conflicts:** `registration-confirmation.mjml` does not exist in `src/`. Ready for dev.
Commenting is not possible because the repository is archived.
No labels
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ldraney/westside-emails#8
No description provided.