Repository navigation
feat(email): branding, text overrides and 16 new templates (0.3.0) - #51
Merged
Merged
Conversation
…new notice templates
…emplates, release 0.3.0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Grows
@locusgraph/emailfrom 4 to 20 templates and makes every one brandable and rewordable, so SpendGraph and other apps can send them without forking.Branding
product("locusgraph"|"spendgraph") on every template, with the product mark and wordmark in the header.brandoverride:name,wordmark,markUrl,markWidth,markHeight, merged over the product's brand.Text overrides
subject,preview,label,heading,body,button,note,footer.overridesreplaces any slot with a string or a function of the props plusbrandName. Left-out slots keep the default; an empty string removes one.Setup once
createEmails({ product, brand, overrides })returns all 20 templates under short names (emails.welcome,emails.paymentFailed, ...). Per-calloverrideswin overcreateEmailsoverrides, which win over defaults.Build your own
defineEmailgives a new template the shared layout, slots, overrides and plain text. The kit parts andrenderEmailremain for fully custom layouts.Standard (from Postmark's template guidance and Clerk/Better Auth/Stack Auth comparisons)
previewgives the next step instead of repeating the subject.Label: valuerows, note, footer, brand last.securityFooter.Templates
welcome,emailVerificationinvitation,invitationAccepted,ownershipTransferred,organizationDeletedroleChanged,memberRemovedkeyCreated,keyRevoked,keyExpiringreceipt,lowCredits,paymentFailed,planChangedusageWarning,usageOverPlan,usageSummary,spendLimitReachedapprovalRequestedDocs site
codesnippet (define-demo.ts,demo-docs.ts) instead of the demo function body.Release notes for 0.3.0
Label: valueand the brand moves from first line to last.Before release
apps/design/public/email/spendgraph-mark.png(currently a copy of the LocusGraph mark).design.locusgraph.com/email/*-mark.pngserve the images.email-v0.3.0.Test plan
pnpm check(lint, typecheck, tests, registry build)@locusgraph/email: 36 testsapps/example-reactandapps/example-nextbuild/brand/media/emailin light and dark🤖 Generated with Claude Code