Skip to content

fix: hide rich text bubble menu options when inline code is active#3507

Merged
dielduarte merged 1 commit into
canaryfrom
feature/mes-546-inline-code-mode-blocks-other-settings
May 13, 2026
Merged

fix: hide rich text bubble menu options when inline code is active#3507
dielduarte merged 1 commit into
canaryfrom
feature/mes-546-inline-code-mode-blocks-other-settings

Conversation

@dielduarte
Copy link
Copy Markdown
Contributor

@dielduarte dielduarte commented May 13, 2026

Description

This is how it looks like now:
https://www.loom.com/share/f89ba51587f2401997d1ce24800747ea

Essentially we hide all rich text options from the menu when the mark is the inline code


Summary by cubic

Hide rich-text bubble menu options when inline code is active so only the node selector and code toggle are shown. Includes a patch changeset for @react-email/editor.

  • Bug Fixes
    • Use useEditorState from @tiptap/react to detect editor.isActive('code') and render only node selector + code toggle.
    • Hide link, formatting, and alignment controls in code mode to meet Linear MES-546.

Written for commit 9f49851. Summary will update on new commits.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 13, 2026

🦋 Changeset detected

Latest commit: 9f49851

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@react-email/editor Patch

Not sure what this means? Click here to learn what changesets are.

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

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 13, 2026

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

Project Deployment Actions Updated (UTC)
react-email Ready Ready Preview, Comment May 13, 2026 6:53pm
react-email-demo Ready Ready Preview, Comment May 13, 2026 6:53pm

Request Review

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.

cubic analysis

No issues found across 2 files

Confidence score: 5/5

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

Linked issue analysis

Linked issue: MES-546: Inline code mode blocks other settings

Status Acceptance criteria Notes
Hide non-code formatting buttons (Bold, Italic, Underline, Strike, Uppercase) when inline code is active The diff renders the group containing Bold/Italic/Underline/Strike/Uppercase only in the non-code branch; when isCodeActive is true those items are not rendered.
Hide the link selector when inline code is active BubbleMenuLinkSelector is rendered only in the non-code branch; it is omitted in the isCodeActive branch.
Hide alignment controls (left/center/right) when inline code is active The alignment BubbleMenuItemGroup is only rendered in the non-code branch and is not present when isCodeActive is true.
Keep node selector and the inline code button available when inline code is active When isCodeActive is true the UI renders the NodeSelector and BubbleMenuCode components, preserving access to them.

Auto-approved: This change conditionally hides rich text formatting options in the bubble menu when inline code is active, using the same patterns already present in the component, with no impact on business logic, data, or infrastructure.

@dielduarte dielduarte merged commit 962f753 into canary May 13, 2026
13 of 15 checks passed
@dielduarte dielduarte deleted the feature/mes-546-inline-code-mode-blocks-other-settings branch May 13, 2026 20:59
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