Fix: Hide "Generate Editorial Note" option in Revisions mode#591
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |

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
isPreviewModeof@wordpress/block-editorsettings and render the menu item only if its not in preview mode.Note: We are not able to use
isRevisionsModeorshowDiff(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
Screenshots or screencast
Changelog Entry