Skip to content

fix(editor): render Table as native <table> instead of Section to fix invalid nesting#3219

Draft
bukinoshita wants to merge 1 commit intocanaryfrom
fix/table-rendering-nesting-ad4a
Draft

fix(editor): render Table as native <table> instead of Section to fix invalid nesting#3219
bukinoshita wants to merge 1 commit intocanaryfrom
fix/table-rendering-nesting-ad4a

Conversation

@bukinoshita
Copy link
Copy Markdown
Member

@bukinoshita bukinoshita commented Apr 9, 2026

Summary by cubic

Render the editor’s Table as a native <table> instead of Section to eliminate invalid <tr> inside <td> nesting. This fixes broken layouts in email clients and fulfills Linear BU-670.

  • Bug Fixes
    • Replaced Section from @react-email/components with a native <table> that wraps children in <tbody>.
    • Preserved align, width, border=0, cellPadding=0, cellSpacing=0, role="presentation", and centering styles.
    • Added an integration test to prevent <tr> inside <td> and updated snapshots.

Written for commit 8e1b4c3. Summary will update on new commits.

… invalid nesting

The Table node's renderToReactEmail method was using Section, which wraps
children in its own <table><tbody><tr><td>...</td></tr></tbody></table>
structure. This caused TableRow (<tr>) and TableCell (<td>) children to
be nested inside a <td> without a nested <table>, producing invalid HTML
that email clients repair inconsistently.

Replace Section with a native <table> element that wraps children in a
<tbody>, producing the correct structure:
<table><tbody><tr><td>...</td></tr></tbody></table>

Resolves BU-670

Co-authored-by: Bu Kinoshita <bukinoshita@users.noreply.github.com>
@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Apr 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
react-email Ready Ready Preview, Comment Apr 9, 2026 5:31pm
react-email-demo Ready Ready Preview, Comment Apr 9, 2026 5:31pm
react-email-examples Ready Ready Preview, Comment Apr 9, 2026 5:31pm

Request Review

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 9, 2026

⚠️ No Changeset found

Latest commit: 8e1b4c3

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 3 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants