Skip to content

feat(editor): add inspector examples for defaults, composed, and custom usage#3190

Merged
joaopcm merged 7 commits intocanaryfrom
feat/inspector-examples
Apr 7, 2026
Merged

feat(editor): add inspector examples for defaults, composed, and custom usage#3190
joaopcm merged 7 commits intocanaryfrom
feat/inspector-examples

Conversation

@joaopcm
Copy link
Copy Markdown
Member

@joaopcm joaopcm commented Apr 6, 2026

Summary

Replace the single document-inspector example with three focused examples showcasing the full inspector API:

  • Inspector — Defaults: Zero-config sidebar using <Inspector.Document />, <Inspector.Node />, <Inspector.Text /> with no children
  • Inspector — Composed: Mix built-in section components (Inspector.Background, Inspector.Padding, etc.) with custom UI. Conditional sections per node type.
  • Inspector — Custom: Entirely hand-rolled UI with plain HTML. No primitives or sections — just render-props data and callbacks.

Context

Part of the inspector sidebar redesign (PRODUCT-1739). Stacked on top of #3189 (Document defaults + validation).

Test plan

  • pnpm lint:fix passes
  • All 119 existing inspector tests still pass
  • All examples use only public API imports (@react-email/editor/*)
  • Old document-inspector.tsx removed, index updated with three new entries

Summary by cubic

Replaces the single inspector example with three focused examples and adds an inspector sidebar to the Full Email Builder. Ships inspector styles via the default theme and fixes the builder layout using a shared EditorContext.Provider (PRODUCT-1739).

  • New Features

    • Inspector — Defaults: zero‑config sidebar using Inspector.Document, Inspector.Node, Inspector.Text.
    • Inspector — Composed: pick sections (Inspector.Background, Inspector.Padding, Inspector.Size, Inspector.Border) and add custom UI per node type.
    • Inspector — Custom: fully custom UI built with render‑props only; no primitives or sections.
    • Full Email Builder: integrated inspector sidebar with breadcrumb + Inspector.Document, Inspector.Node, Inspector.Text.
    • Replaced document-inspector.tsx with three new examples and updated the examples index.
  • Bug Fixes

    • Exported stylesheet at @react-email/editor/styles/inspector.css and included it in @react-email/editor/themes/default.css.
    • Inspector CSS: adjusted input/textarea/select widths, spacing, unit label styling, smaller color trigger, tighter hex field, label min-width, and section separators/headers.
    • Full Email Builder layout: fixed-height editor + sidebar, sidebar fills height, and shared editor via EditorContext.Provider so menus and sidebar stay in sync.

Written for commit 05e17d5. Summary will update on new commits.

@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:52pm
react-email-demo Ready Ready Preview, Comment Apr 7, 2026 3:52pm
react-email-examples Ready Ready Preview, Comment Apr 7, 2026 3:52pm

Request Review

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 6, 2026

⚠️ No Changeset found

Latest commit: 05e17d5

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

@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.

@joaopcm joaopcm self-assigned this Apr 6, 2026
@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@3190

commit: 05e17d5

@joaopcm joaopcm requested a review from gabrielmfern April 6, 2026 20:21
@joaopcm joaopcm force-pushed the feat/inspector-document-defaults branch from eda3861 to 864665c Compare April 7, 2026 15:32
@joaopcm joaopcm force-pushed the feat/inspector-examples branch from c2e39ec to a3c3081 Compare April 7, 2026 15:32
Base automatically changed from feat/inspector-document-defaults to canary April 7, 2026 15:35
@joaopcm joaopcm force-pushed the feat/inspector-examples branch from a3c3081 to 05e17d5 Compare April 7, 2026 15:51
@joaopcm joaopcm merged commit 285da36 into canary Apr 7, 2026
16 checks passed
@joaopcm joaopcm deleted the feat/inspector-examples branch April 7, 2026 15:57
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