Skip to content

feat(editor): add Inspector.Node and Inspector.Text#3187

Merged
joaopcm merged 1 commit intocanaryfrom
feat/inspector-node-text
Apr 6, 2026
Merged

feat(editor): add Inspector.Node and Inspector.Text#3187
joaopcm merged 1 commit intocanaryfrom
feat/inspector-node-text

Conversation

@joaopcm
Copy link
Copy Markdown
Member

@joaopcm joaopcm commented Apr 6, 2026

Summary

  • Add Inspector.Node — render-props component for inspecting selected nodes (styles, attributes, theme defaults)
  • Add Inspector.Text — render-props component for inspecting text selections (marks, alignment, link, parent block styles)
  • Export both on the Inspector compound component + context types

API

// Full control via render-props
<Inspector.Node>
  {({ nodeType, getStyle, setStyle, getAttr, setAttr, presetColors }) => (
    <div>...</div>
  )}
</Inspector.Node>

<Inspector.Text>
  {({ marks, toggleMark, alignment, setAlignment, linkColor, setLinkColor }) => (
    <div>...</div>
  )}
</Inspector.Text>

// Default rendering (placeholder — wired in next PR)
<Inspector.Node />
<Inspector.Text />

Context

Part of the inspector sidebar redesign (PRODUCT-1739). This is the core API PR — defines the render-props context objects that consumers and pre-built section components will use.

Depends on #3183 (hooks), #3185 (primitives), #3186 (pickers).

Test plan

  • pnpm lint:fix passes
  • All 119 existing inspector tests still pass
  • Types exported for consumer use

Summary by cubic

Add Inspector.Node and Inspector.Text render-props components to inspect and edit the selected node or text. This is the core API for the inspector sidebar redesign (PRODUCT-1739) and enables theme-aware custom inspector UIs.

  • New Features
    • Inspector.Node: read/write node styles and attributes, batch style updates, access nodeType/nodePos, theme defaults, and document preset colors.
    • Inspector.Text: read/toggle marks, set alignment, read/write link href/color, and update parent block styles with theme defaults and preset colors.
    • Exported via the Inspector compound (Inspector.Node, Inspector.Text) plus context/prop types.
    • Default rendering is a placeholder; use render-props for now.

Written for commit 5bf13cb. 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 6, 2026 6:37pm
react-email-demo Ready Ready Preview, Comment Apr 6, 2026 6:37pm
react-email-examples Ready Ready Preview, Comment Apr 6, 2026 6:37pm

Request Review

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 6, 2026

⚠️ No Changeset found

Latest commit: 5bf13cb

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.

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

commit: 5bf13cb

@joaopcm joaopcm merged commit 4ba85eb into canary Apr 6, 2026
15 of 17 checks passed
@joaopcm joaopcm deleted the feat/inspector-node-text branch April 6, 2026 19:41
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