Skip to content

feat(editor): render Bubble Menu Default when there's no children#3226

Merged
gabrielmfern merged 11 commits intocanaryfrom
feat/standardize-default-api
Apr 10, 2026
Merged

feat(editor): render Bubble Menu Default when there's no children#3226
gabrielmfern merged 11 commits intocanaryfrom
feat/standardize-default-api

Conversation

@gabrielmfern
Copy link
Copy Markdown
Member

@gabrielmfern gabrielmfern commented Apr 10, 2026

Summary by cubic

Make <BubbleMenu> the root component that renders the default text formatting toolbar when used without children, and remove BubbleMenu.Default. Updates docs, examples, tests, and bumps @react-email/editor to 0.0.0-experimental.47.

  • Refactors

    • Promote <BubbleMenu> to the root container; it auto-renders the default menu when no children are provided.
    • Remove BubbleMenu.Default; delete its exports/tests and add tests for <BubbleMenu>’s default behavior.
    • Switch internal usage (EmailEditor) and all docs/examples to <BubbleMenu>; link/image/button menus are now BubbleMenu.LinkDefault, BubbleMenu.ButtonDefault, BubbleMenu.ImageDefault.
    • Preserve hideWhenActiveNodes, hideWhenActiveMarks, placement, offset, and onHide on <BubbleMenu>.
  • Migration

    • Replace <BubbleMenu.Default /> and <BubbleMenu.Root /> with <BubbleMenu />.
    • The excludeItems prop is removed; to customize, pass children to <BubbleMenu> using the provided primitives (e.g., Bold, Italic, NodeSelector, LinkSelector, alignment items).

Written for commit 0a15ee4. Summary will update on new commits.

@gabrielmfern gabrielmfern requested a review from joaopcm April 10, 2026 12:51
@gabrielmfern gabrielmfern self-assigned this Apr 10, 2026
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 10, 2026

⚠️ No Changeset found

Latest commit: 0a15ee4

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 10, 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 10, 2026 1:36pm
react-email-demo Ready Ready Preview, Comment Apr 10, 2026 1:36pm
react-email-examples Ready Ready Preview, Comment Apr 10, 2026 1:36pm

Request Review

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 10, 2026

Open in StackBlitz

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

commit: 0a15ee4

Copy link
Copy Markdown
Member

@joaopcm joaopcm left a comment

Choose a reason for hiding this comment

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

Also, what do you think of BubbleMenu instead of BubbleMenu.Root? Having .Root feels like I'm composing something, which is not aligned with having a default structure for a component when no children is passed

@gabrielmfern gabrielmfern merged commit 606c6ac into canary Apr 10, 2026
17 of 18 checks passed
@gabrielmfern gabrielmfern deleted the feat/standardize-default-api branch April 10, 2026 18:23
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