improvement(emails): align the email design tokens with the platform design system - #6479
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview Introduces shared pieces— The email preview gallery gains more template entries, category grouping with auto-Uncategorized fallback, and an iframe grid styled with email design tokens. Plain personal emails and Reviewed by Cursor Bugbot for commit 9c2043f. Configure here. |
Greptile SummaryThe PR aligns email styling with the platform design tokens and consolidates repeated email presentation patterns.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| apps/sim/components/emails/_styles/base.ts | Centralizes the revised email design tokens and shared presentation styles without an identified blocking failure. |
| apps/sim/components/emails/_styles/base.tokens.test.ts | Adds repository-source comparisons for email colors, typography, geometry, and font weights. |
| apps/sim/app/api/emails/preview/route.ts | Expands the preview catalog and replaces the link list with a categorized iframe gallery using fixed identifiers. |
| apps/sim/components/emails/billing/pro-features-box.tsx | Extracts duplicated email-compatible Pro feature markup while retaining necessary inline table structure. |
| apps/sim/components/emails/components/email-button.tsx | Centralizes CTA markup and styling for reuse across branded templates. |
Reviews (3): Last reviewed commit: "fix(emails): restore row spacing in the ..." | Re-trigger Greptile
…latform mirror with a test
c1d59bb to
9e3ba41
Compare
|
@cursor review |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 9c2043f. Configure here.
Summary
The email
baseStylesclaimed to be "derived from globals.css light mode tokens" but had drifted. I diffed every value against the live platform source (globals.css,tailwind.config.ts,chip-chrome.ts) and corrected it.Color drift — values that no longer matched their own comment:
--borderis#d8d8d8, emails used#dedede--text-mutedis#7a7a7a, emails used#707070#f8f8f8→--surface-1#fbfbfbtextBody(--text-body#434343) andtextInverse(--text-inverse). Body copy was rendering at--text-secondary; the platform's body/value token is--text-body, so paragraph text now matches the app.colors.divider→colors.border(the platform retired--divider)Type scale now mirrors
tailwind.config.tsand uses its names (caption/small/sm/base/md), so every size traces to a Tailwind token. Email body stays atmd16px — the one deliberate deviation from the app's 15pxbase, and still a real token. The single off-scale value (24px OTP/balance figure) is now a nameddisplaytoken with a comment saying why the platform has no equivalent.Weights: added a
fontWeightscale (400/500/600) and removed everyfontWeight: 'bold'(=700, off the platform's three-step scale).Geometry: one
RADIUSconstant =--radius8px, which kills the loneborderRadius: '6px'inpayment-failed. The CTA now transcribes the platform primary Chip exactly —chipGeometryClassish-[30px] rounded-lg px-2 text-sm, so button padding went12px→8px. Worth an eyeball — the one change where matching the platform makes the email button slightly tighter.De-duplication:
ProFeaturesBox— ~55 lines were copy-pasted byte-for-byte betweencredits-exhaustedandfree-tier-upgrade, including an uppercase/letter-spaced title and a border (${colors.brandTertiary}20) that existed nowhere elseerrorBoxtoken —payment-failedwas re-typinginfoBox's own padding and margin just to swap the fillinfoBoxLabel/infoBoxValue—credit-purchasehand-styled four<Text>s inside an otherwise correctinfoBoxgreetingtoken — 10 files spelled out{...paragraph, marginTop: 0}inline and 8 forgot it entirely; now one token used by all 18footerLinktoken — the footer hand-rolled its own; deleted the deadbaseStyles.footerit never usedRhythm:
limit-threshold,usage-threshold,usage-limit-reachedandpayment-failedeach had a divider fencing off the CTA. Every template is now greeting → body → box → CTA → one divider → footnote.Type of Change
Testing
Rendered all 16 templates and scanned the emitted HTML for every legacy value —
#dedede,#707070,#f8f8f8,border-radius:6px,font-weight:700|bold,text-transform:uppercase,letter-spacing:0.5px: 0 hits across 16 templates. Confirmed the platform values (#d8d8d8,#434343,#7a7a7a,#fbfbfb) are present, and that every template renders exactly one divider and one flush greeting. Source scan shows zero raw hex, zerobold, zero raw radius literals outsidebase.ts. Tests: 6/6 email + 227/227 mailer & schedule-notification. Type-check clean.Not visually diffed in a mail client — verification is on rendered HTML, not pixels.
Checklist