Skip to content

feat(react-email): Leverage Server Components for better UX #1947

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 26 commits into
base: 4.0
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
a7828c0
feat(react-email): Link checker for preview server on a toolbar (#1799)
gabrielmfern Jan 27, 2025
b1415df
chore: Bump for 4.0.0-alpha.0 release
gabrielmfern Jan 27, 2025
b3f833c
fix(react-email): Padding on the file tree
gabrielmfern Jan 29, 2025
9f02b52
feat(react-email): Image validation checking (#1884)
gabrielmfern Feb 3, 2025
8a93f51
use the oficial lottie react library
gabrielmfern Feb 3, 2025
83d44cb
remove unused import
gabrielmfern Feb 10, 2025
b8a4c21
Bump to 4.0.0-alpha.1
gabrielmfern Feb 10, 2025
39c86b8
fix changelogs
gabrielmfern Feb 10, 2025
9ad8efa
feat(react-email): Customizable email view size (#1837)
gabrielmfern Feb 10, 2025
10561b2
bump for 4.0.0-alpha.2
gabrielmfern Feb 10, 2025
5a05747
fix code view contrast
gabrielmfern Feb 10, 2025
9525279
bump to 4.0.0-alpha.3
gabrielmfern Feb 10, 2025
8fe3d1d
feat(react-email): Spam Assassin checker for email templates (#1913)
gabrielmfern Feb 25, 2025
b96e27a
add changeset
gabrielmfern Feb 25, 2025
fa542bf
Bump to 4.0.0-alpha.4
gabrielmfern Feb 25, 2025
e646bb7
use the oficial lottie react library
gabrielmfern Feb 3, 2025
ddd959d
add initial draft for react-dom rendering
gabrielmfern Feb 13, 2025
5d84ee7
use portals, SO MUCH SIMPLER
gabrielmfern Feb 17, 2025
5cd2f7e
lint
gabrielmfern Feb 20, 2025
0333a56
fix props name
gabrielmfern Feb 20, 2025
96b548c
wire up overwritten React and React DOM for the rendering to work wit…
gabrielmfern Feb 20, 2025
5ad56ba
update to use flex layouts
gabrielmfern Feb 21, 2025
543ae33
add help icon on the bottom saying the rendering might differ
gabrielmfern Feb 25, 2025
e660495
remove commented code
gabrielmfern Mar 10, 2025
726ecf5
fix key error
gabrielmfern Mar 10, 2025
abd17b4
add dev:preview command
gabrielmfern Mar 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/angry-bugs-sing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"react-email": minor
---

Add image validation checking
5 changes: 5 additions & 0 deletions .changeset/empty-phones-relax.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"react-email": minor
---

Make the width and height for the preview of the email customizable
5 changes: 5 additions & 0 deletions .changeset/empty-rivers-laugh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"react-email": major
---

Added toolbar with a link checker
5 changes: 5 additions & 0 deletions .changeset/fast-birds-fail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"react-email-starter": patch
---

[email protected]
6 changes: 6 additions & 0 deletions .changeset/flat-apes-sniff.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"react-email-starter": patch
"create-email": patch
---

[email protected]
5 changes: 5 additions & 0 deletions .changeset/loud-clouds-wink.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"react-email": patch
---

Fix padding on the file tree
5 changes: 5 additions & 0 deletions .changeset/nine-masks-sort.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"react-email": patch
---

Fix code view contrast
5 changes: 5 additions & 0 deletions .changeset/polite-apples-sit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"react-email": minor
---

add spam checker on the sidebar
57 changes: 57 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"mode": "pre",
"tag": "alpha",
"initialVersions": {
"demo": "0.0.0",
"web": "0.0.0",
"@benchmarks/preview-server": "0.0.0",
"@benchmarks/tailwind-component": "0.0.0",
"react-email-with-aws-ses": "1.0.7",
"react-email-with-mailersend": "1.0.7",
"react-email-with-nodemailer": "1.0.7",
"react-email-with-plunk": "1.0.7",
"react-email-with-postmark": "1.0.7",
"react-email-with-resend": "1.0.7",
"react-email-with-next-scaleway": "1.0.7",
"react-email-with-node-scaleway": "1.0.7",
"react-email-with-sendgrid": "1.0.7",
"@react-email/body": "0.0.11",
"@react-email/button": "0.0.19",
"@react-email/code-block": "0.0.11",
"@react-email/code-inline": "0.0.5",
"@react-email/column": "0.0.13",
"@react-email/components": "0.0.33",
"@react-email/container": "0.0.15",
"create-email": "0.1.9",
"react-email-starter": "0.1.9",
"@react-email/font": "0.0.9",
"@react-email/head": "0.0.12",
"@react-email/heading": "0.0.15",
"@react-email/hr": "0.0.11",
"@react-email/html": "0.0.11",
"@react-email/img": "0.0.11",
"@react-email/link": "0.0.12",
"@react-email/markdown": "0.0.14",
"@react-email/preview": "0.0.12",
"react-email": "3.0.7",
"@react-email/render": "1.0.5",
"@react-email/row": "0.0.12",
"@react-email/section": "0.0.16",
"@react-email/tailwind": "1.0.4",
"@react-email/text": "0.0.11",
"tsconfig": "0.0.0",
"docs": "0.0.0"
},
"changesets": [
"angry-bugs-sing",
"empty-phones-relax",
"empty-rivers-laugh",
"fast-birds-fail",
"flat-apes-sniff",
"loud-clouds-wink",
"nine-masks-sort",
"polite-apples-sit",
"spicy-beds-explain",
"unlucky-tigers-destroy"
]
}
5 changes: 5 additions & 0 deletions .changeset/spicy-beds-explain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"react-email-starter": major
---

- [email protected]
5 changes: 5 additions & 0 deletions .changeset/unlucky-tigers-destroy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"react-email-starter": patch
---

[email protected]
1 change: 0 additions & 1 deletion apps/demo/emails/magic-links/aws-verify-email.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
Section,
Text,
} from '@react-email/components';
import * as React from 'react';

interface AWSVerifyEmailProps {
verificationCode?: string;
Expand Down
1 change: 0 additions & 1 deletion apps/demo/emails/magic-links/linear-login-code.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {
Section,
Text,
} from '@react-email/components';
import * as React from 'react';

interface LinearLoginCodeEmailProps {
validationCode?: string;
Expand Down
1 change: 0 additions & 1 deletion apps/demo/emails/magic-links/notion-magic-link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
Preview,
Text,
} from '@react-email/components';
import * as React from 'react';

interface NotionMagicLinkEmailProps {
loginCode?: string;
Expand Down
1 change: 0 additions & 1 deletion apps/demo/emails/magic-links/plaid-verify-identity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
Section,
Text,
} from '@react-email/components';
import * as React from 'react';

interface PlaidVerifyIdentityEmailProps {
validationCode?: string;
Expand Down
1 change: 0 additions & 1 deletion apps/demo/emails/magic-links/raycast-magic-link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
Section,
Text,
} from '@react-email/components';
import * as React from 'react';

interface RaycastMagicLinkEmailProps {
magicLink?: string;
Expand Down
1 change: 0 additions & 1 deletion apps/demo/emails/magic-links/slack-confirm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {
Section,
Text,
} from '@react-email/components';
import * as React from 'react';

interface SlackConfirmEmailProps {
validationCode?: string;
Expand Down
1 change: 0 additions & 1 deletion apps/demo/emails/newsletters/codepen-challengers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import {
Section,
Text,
} from '@react-email/components';
import * as React from 'react';

const baseUrl = process.env.VERCEL_URL
? `https://${process.env.VERCEL_URL}`
Expand Down
19 changes: 11 additions & 8 deletions apps/demo/emails/newsletters/google-play-policy-update.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {
Section,
Text,
} from '@react-email/components';
import * as React from 'react';

const baseUrl = process.env.VERCEL_URL
? `https://${process.env.VERCEL_URL}`
Expand Down Expand Up @@ -101,7 +100,9 @@ export const GooglePlayPolicyUpdateEmail = () => (

<Section style={containerContact}>
<Row>
<Text style={paragraph}>Connect with us</Text>
<Column>
<Text style={paragraph}>Connect with us</Text>
</Column>
</Row>
<Row
align="left"
Expand Down Expand Up @@ -139,12 +140,14 @@ export const GooglePlayPolicyUpdateEmail = () => (
</Column>
</Row>
<Row>
<Img
style={footer}
width="540"
height="48"
src={`${baseUrl}/static/google-play-footer.png`}
/>
<Column>
<Img
style={footer}
width="540"
height="48"
src={`${baseUrl}/static/google-play-footer.png`}
/>
</Column>
</Row>
</Section>

Expand Down
1 change: 0 additions & 1 deletion apps/demo/emails/newsletters/stack-overflow-tips.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import {
Section,
Text,
} from '@react-email/components';
import * as React from 'react';

interface StackOverflowTipsEmailProps {
tips?: { id: number; description: string }[];
Expand Down
1 change: 0 additions & 1 deletion apps/demo/emails/notifications/github-access-token.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {
Section,
Text,
} from '@react-email/components';
import * as React from 'react';

interface GithubAccessTokenEmailProps {
username?: string;
Expand Down
1 change: 0 additions & 1 deletion apps/demo/emails/notifications/vercel-invite-user.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import {
Tailwind,
Text,
} from '@react-email/components';
import * as React from 'react';

interface VercelInviteUserEmailProps {
username?: string;
Expand Down
1 change: 0 additions & 1 deletion apps/demo/emails/notifications/yelp-recent-login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {
Section,
Text,
} from '@react-email/components';
import * as React from 'react';

interface YelpRecentLoginEmailProps {
userFirstName?: string;
Expand Down
1 change: 0 additions & 1 deletion apps/demo/emails/receipts/apple-receipt.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {
Section,
Text,
} from '@react-email/components';
import * as React from 'react';

const baseUrl = process.env.VERCEL_URL
? `https://${process.env.VERCEL_URL}`
Expand Down
1 change: 0 additions & 1 deletion apps/demo/emails/reset-password/dropbox-reset-password.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {
Section,
Text,
} from '@react-email/components';
import * as React from 'react';

interface DropboxResetPasswordEmailProps {
userFirstname?: string;
Expand Down
1 change: 0 additions & 1 deletion apps/demo/emails/reset-password/twitch-reset-password.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
Section,
Text,
} from '@react-email/components';
import * as React from 'react';

interface TwitchResetPasswordEmailProps {
username?: string;
Expand Down
1 change: 0 additions & 1 deletion apps/demo/emails/reviews/airbnb-review.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {
Section,
Text,
} from '@react-email/components';
import * as React from 'react';

interface AirbnbReviewEmailProps {
authorName?: string;
Expand Down
1 change: 0 additions & 1 deletion apps/demo/emails/reviews/amazon-review.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {
Section,
Text,
} from '@react-email/components';
import * as React from 'react';

interface AmazonReviewEmailProps {
titleText?: string;
Expand Down
1 change: 0 additions & 1 deletion apps/demo/emails/welcome/koala-welcome.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {
Section,
Text,
} from '@react-email/components';
import * as React from 'react';

interface KoalaWelcomeEmailProps {
userFirstname: string;
Expand Down
1 change: 0 additions & 1 deletion apps/demo/emails/welcome/stripe-welcome.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
Section,
Text,
} from '@react-email/components';
import * as React from 'react';

const baseUrl = process.env.VERCEL_URL
? `https://${process.env.VERCEL_URL}`
Expand Down
1 change: 0 additions & 1 deletion apps/web/src/app/components/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import classNames from 'classnames';
import type { Metadata } from 'next';
import dynamic from 'next/dynamic';
import Link from 'next/link';
import React from 'react';
import { componentsStructure } from '../../../components/structure';
import PageTransition from '../../components/page-transition';
import { Spotlight } from '../../components/spotlight';
Expand Down
2 changes: 0 additions & 2 deletions apps/web/src/components/logo.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import * as React from 'react';

export const Logo = () => {
return (
<svg
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/tooltip-content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const TooltipContent = React.forwardRef<
<TooltipPrimitive.Portal>
<TooltipPrimitive.Content
{...props}
className="z-20 rounded-md border border-slate-6 bg-black px-3 py-2 text-xs text-white"
className="z-20 rounded-md border border-slate-6 bg-black px-3 py-2 text-white text-xs"
ref={forwardedRef}
sideOffset={sideOffset}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { promises as fs } from 'node:fs';
import path from 'node:path';
import { Bench } from 'tinybench';
import { runServer } from './utils/run-server';
import { runServerAndFetchPreviewPage } from './utils/run-server-and-fetch-preview-page';

const pathToCanaryCliScript = path.resolve(
__dirname,
Expand Down
1 change: 0 additions & 1 deletion benchmarks/preview-server/src/local-vs-2.1.7-canary.2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { promises as fs } from 'node:fs';
import path from 'node:path';
import { Bench } from 'tinybench';
import { runServer } from './utils/run-server';
import { runServerAndFetchPreviewPage } from './utils/run-server-and-fetch-preview-page';

const pathToCanaryCliScript = path.resolve(
__dirname,
Expand Down
3 changes: 2 additions & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,15 @@
"noAutofocus": "off"
},
"nursery": {
"useSortedClasses": "warn"
"useSortedClasses": "off"
},
"suspicious": {
"noArrayIndexKey": "off",
"noExplicitAny": "off",
"noAssignInExpressions": "off"
},
"correctness": {
"noUnusedImports": "warn",
"useExhaustiveDependencies": "off",
"useJsxKeyInIterable": "off",
"noChildrenProp": "off"
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"@types/node": "22.10.2",
"@types/react": "19.0.1",
"@types/react-dom": "19.0.1",
"eslint": "8.50.0",
"happy-dom": "15.10.2",
"prettier": "3.4.2",
"prettier-plugin-tailwindcss": "0.6.6",
Expand Down
12 changes: 12 additions & 0 deletions packages/create-email/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# create-email

## 1.0.0-alpha.3

### Patch Changes

- [email protected]

## 1.0.0-alpha.2

## 1.0.0-alpha.1

## 1.0.0-alpha.0

## 0.1.9

## 0.1.9-canary.2
Expand Down
2 changes: 1 addition & 1 deletion packages/create-email/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-email",
"version": "0.1.9",
"version": "1.0.0-alpha.3",
"description": "The easiest way to get started with React Email",
"main": "src/index.js",
"type": "module",
Expand Down
Loading
Loading