-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Disable Notes in Code Editor #72859
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disable Notes in Code Editor #72859
Conversation
|
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. |
|
I think the logic should go in the |
Mamaduka
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the follow-up, @karthick-murugan!
This is working as expected.
Co-authored-by: karthick-murugan <[email protected]> Co-authored-by: Mamaduka <[email protected]> Co-authored-by: youknowriad <[email protected]> Co-authored-by: jeffpaul <[email protected]> Co-authored-by: desrosj <[email protected]>
|
I just cherry-picked this PR to the wp/6.9 branch to get it included in the next release: f7bd86b |
What?
Closes #72828
Hides the Notes sidebar and the Notes option from the Options menu when the editor is in Code Editor mode, as block-level commenting is not applicable without visual block rendering.
Why?
Currently, when switching to Code Editor mode, the Notes sidebar remains visible. This creates confusion and functional limitations:
Block-level commenting requires visual blocks to function properly, so the Notes sidebar should be hidden when in Code Editor mode.
How?
useSelecthook to detect the current editor mode usinggetEditorMode()fromeditorStoreeditorMode === 'text'nullearly when in Code Editor mode, which hides NotesTesting Instructions
Video
REC-20251031112743.mp4