feat: refine MJML templates to match westside-landing visual language #304
No reviewers
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo_admin/basketball-api!304
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "303-mjml-visual-refinement"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Aligns the four core MJML email templates with the westside-landing site's signature visual elements: red left-border cards, headline red underlines, uppercase bold headlines with tight letter-spacing, and footer red top-borders.
Changes
templates/email/includes/brand.mjml— Addedmj-classtokens (red-border-col,bordered-content) for the 4px red left-border card pattern. Addedmj-styleblock with.headline-underline(red 3px bottom border mirroring landingh2::after) and.footer-border(red 2px top border mirroring landing footer).templates/email/action.mjml— Body content wrapped inmj-groupwith 4px red border column + content column (won't stack on mobile). Headline getsheadline-underlineclass,text-transform: uppercase,letter-spacing: -0.02em. Footer usesfooter-borderclass replacing the gray divider.templates/email/notification.mjml— Same treatment as action: red left-border card for body, headline underline, footer red border.templates/email/announcement.mjml— All three section blocks wrapped in red left-border cards. Headline underline and footer red border applied.Test Plan
npm run build:emailcompiles all 4 templates without errorspytest tests/test_jersey_reminder.py— 23/23 tests pass (verifies compiled HTML contains brand colors, table layout, button presence, placeholder replacement)Review Checklist
npm run build:emailcompiles cleanlyRelated Notes
Related
Closes #303
QA Review
Findings (fixed in
a3f9b6b)Critical: MJML v5 beta
mj-includedoes not propagatemj-classormj-attributesdefaultsThe initial commit used
mj-class="red-border-col"andmj-class="bordered-content"tokens defined inbrand.mjml. These compiled to columns with no background color (the 4px red border was invisible) and 50/50 width split instead of 4px/536px. Similarly,mj-buttondefaults frombrand.mjmlcompiled with MJML's built-in defaults (#414141,border-radius: 3px) instead of the brand tokens.Root cause: MJML v5 beta does not apply
mj-attributesormj-classdefinitions from files loaded viamj-include. Onlymj-styleCSS classes propagate correctly (they inject into<style>).Fix applied:
background-color="#d42026",width="4px",padding="0"directly on red border columnspadding="16px 20px",width="536px"on content columnsmj-classdefinitions from brand.mjml with explanatory commentcss-class="headline-underline"andcss-class="footer-border"still work (CSS injection)Verified
npm run build:emailcompiles cleanlybackground-color: #d42026on 4px column tdbackground: #d42026,font-weight: 800,text-transform: uppercase,border-radius: 4pxon buttonsVERDICT: APPROVED
PR #304 Review
DOMAIN REVIEW
Tech stack: MJML email templates (HTML email markup). No Python, no backend changes.
Scope verification: 4 files changed, all under
templates/email/. jersey-reminder.mjml intentionally untouched per scope. No Python files modified. Clean scope.MJML-specific observations:
mj-group for red left-border card -- Good approach. Using
mj-groupprevents the border column from stacking on mobile, which is the correct MJML pattern for a visual accent that must stay side-by-side. The comment in brand.mjml correctly documents the MJML v5 beta limitation that preventsmj-classtokens from propagating viamj-include, justifying the inline repetition.CSS classes via mj-style --
.headline-underlineand.footer-borderare correctly centralized in brand.mjml and applied viacss-classin each template. This is the right abstraction layer for styles that CAN be shared via CSS.Hardcoded
width="536px"on content columns -- This assumes 600px container minus 4px border column minus padding. Fragile if container width changes, but acceptable for email templates where 600px is a universal standard.display: inline-block !important; width: auto !important;on.headline-underline td-- This makes the red underline only span the text width rather than the full column. Intentional design choice matching the landingh2::afterpattern.BLOCKERS
None.
NITS
Redundant button attributes in action.mjml and announcement.mjml -- The CTA buttons inline
background-color="#d42026",color="#ffffff",border-radius="4px",font-size="16px",font-weight="800",inner-padding="14px 32px"which are already set as defaults in brand.mjml's<mj-button>attributes block. Onlytext-transform="uppercase"andletter-spacing="0.05em"are new. Consider adding those two properties to the brand.mjml<mj-button>defaults and removing the redundant inline attributes from both templates. This reduces drift risk if the brand button style ever changes.Red left-border card repetition -- The 5-line mj-group pattern appears 5 times across 3 templates. The MJML v5 beta mj-class limitation is documented and understood. If/when MJML v5 stabilizes mj-class propagation from includes, this could be collapsed into a single
mj-classtoken in brand.mjml.SOP COMPLIANCE
303-mjml-visual-refinementfollows{issue-number}-{kebab-case-purpose}Closes #303PROCESS OBSERVATIONS
Low-risk visual refinement. Template-only changes with no runtime behavior change. Existing test suite validates compiled HTML structure. Change failure risk is minimal -- worst case is a visual rendering difference in email clients, which is a cosmetic issue not a functional one.
VERDICT: APPROVED