close
Skip to content

Fix: Hide "Generate Editorial Note" option in Revisions mode#591

Merged
dkotter merged 1 commit into
WordPress:developfrom
prasadkarmalkar:fix/hide-editorial-notes-in-revisions
May 21, 2026
Merged

Fix: Hide "Generate Editorial Note" option in Revisions mode#591
dkotter merged 1 commit into
WordPress:developfrom
prasadkarmalkar:fix/hide-editorial-notes-in-revisions

Conversation

@prasadkarmalkar
Copy link
Copy Markdown
Contributor

@prasadkarmalkar prasadkarmalkar commented May 20, 2026

What?

Closes #590

Why?

Currently, when a user opens the Revisions in the block editor, the Generate Editorial Note button is still visible when user clicks any block settings dropdown.

How?

Check the current state of the editor via isPreviewMode of @wordpress/block-editor settings and render the menu item only if its not in preview mode.

Note: We are not able to use isRevisionsMode or showDiff (via isShowingRevisionDiff),. They are registered as private selectors within the @wordpress/editor data store.

Use of AI Tools

AI assistance: Yes
Tool(s): Antigravity
Model(s): Gemini 3.1 Pro
Used for: Identify the core hooks/stores details with implementation of BlockSettingsMenuControls and Create testing instructions in PR.

Testing Instructions

  1. Navigate to Settings → AI and ensure AI Editorial Notes is enabled.
  2. Create or edit a post and add some paragraph blocks.
  3. Save the post, make a change, and save it again to generate a revision history.
  4. Open the post settings sidebar and click to view Revisions.
  5. Inside the Revisions diff viewer, click on any block to open its block settings menu (the 3 dots).
  6. Verify that "Generate Editorial Note" does not appear in the menu (only Copy and Copy Styles should be visible).
  7. Exit the Revisions view and return to the normal editor.
  8. Click on a block to open its block settings menu, and verify that "Generate Editorial Note" does appear normally.

Screenshots or screencast

Before After
Screenshot 2026-05-20 at 12 29 00 PM Screenshot 2026-05-20 at 12 28 31 PM

Changelog Entry

Fixed - "Generate Editorial Note" button appearing in the block settings menu during post revisions.

Open WordPress Playground Preview

@prasadkarmalkar prasadkarmalkar changed the title fix: hide generate editorial note option in revision diffs Fix: Hide "Generate Editorial Note" option in Revisions mode May 20, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.06%. Comparing base (7fafa86) to head (d13953d).

Additional details and impacted files
@@            Coverage Diff             @@
##             develop     #591   +/-   ##
==========================================
  Coverage      73.06%   73.06%           
  Complexity      1731     1731           
==========================================
  Files             85       85           
  Lines           7466     7466           
==========================================
  Hits            5455     5455           
  Misses          2011     2011           
Flag Coverage Δ
unit 73.06% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@prasadkarmalkar prasadkarmalkar marked this pull request as ready for review May 20, 2026 07:01
@github-actions
Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: prasadkarmalkar <prasadkarmalkar@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@jeffpaul jeffpaul requested a review from dkotter May 21, 2026 16:20
@jeffpaul jeffpaul added this to the 1.1.0 milestone May 21, 2026
@dkotter dkotter merged commit 3624c91 into WordPress:develop May 21, 2026
33 of 36 checks passed
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.

Editorial Note: The block toolbar's dropdown menu should be hidden in revision mode

3 participants