Skip to content

feat(editor): add Inspector.Document defaults and EmailTheming validation#3189

Merged
joaopcm merged 4 commits intocanaryfrom
feat/inspector-document-defaults
Apr 7, 2026
Merged

feat(editor): add Inspector.Document defaults and EmailTheming validation#3189
joaopcm merged 4 commits intocanaryfrom
feat/inspector-document-defaults

Conversation

@joaopcm
Copy link
Copy Markdown
Member

@joaopcm joaopcm commented Apr 6, 2026

Summary

  • Inspector.Document now renders default sections (Background + Container) when no children are passed
  • Inspector.Provider throws a clear error if EmailTheming extension is missing

Usage

// Default rendering — Background and Container sections
<Inspector.Document />

// Custom rendering — same render-props API as before
<Inspector.Document>
  {({ findStyleValue, setGlobalStyle }) => (
    <div>...</div>
  )}
</Inspector.Document>

Context

Final PR in the inspector sidebar redesign stack (PRODUCT-1739). Stacked on top of #3188 (section components).

Test plan

  • pnpm lint:fix passes
  • All 119 existing inspector tests still pass
  • children prop is now optional on Inspector.Document
  • EmailTheming validation throws at render time (fail-fast)

Summary by cubic

Adds default Background and Container sections to Inspector.Document when no children are provided, and adds a fail-fast check in Inspector.Provider for the EmailTheming extension. Supports PRODUCT-1739 (inspector sidebar redesign).

  • New Features

    • Inspector.Document renders Background + Container by default when no children are passed.
    • children is now optional; the render-props API is unchanged.
    • Inspector.Provider throws a clear error if EmailTheming is missing.
  • Migration

    • Ensure the EmailTheming extension is included in your editor setup (e.g., EmailTheming or EmailTheming.configure({...})).

Written for commit 864665c. Summary will update on new commits.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 6, 2026

⚠️ No Changeset found

Latest commit: 864665c

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

@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Apr 6, 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 7, 2026 3:32pm
react-email-demo Ready Ready Preview, Comment Apr 7, 2026 3:32pm
react-email-examples Ready Ready Preview, Comment Apr 7, 2026 3:32pm

Request Review

@cubic-dev-ai
Copy link
Copy Markdown
Contributor

cubic-dev-ai bot commented Apr 6, 2026

This review could not be run because your cubic account has exceeded the monthly review limit. If you need help restoring access, please contact contact@cubic.dev.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 6, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@react-email/editor@3189

commit: 864665c

@joaopcm joaopcm force-pushed the feat/inspector-document-defaults branch from eda3861 to 864665c Compare April 7, 2026 15:32
Base automatically changed from feat/inspector-section-components to canary April 7, 2026 15:34
@joaopcm joaopcm merged commit edd0b4f into canary Apr 7, 2026
13 of 14 checks passed
@joaopcm joaopcm deleted the feat/inspector-document-defaults branch April 7, 2026 15:35
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