Navigation: Disable Mobile Menu in Isolated Editor or Site Editor Preview#76203
Navigation: Disable Mobile Menu in Isolated Editor or Site Editor Preview#76203
Conversation
…n preview canvas and isolated editor
| currentTheme: select( coreStore ).getCurrentTheme()?.stylesheet, | ||
| // In preview mode or isolated editor, always show navigation expanded (no hamburger) | ||
| // so users can see and interact with all menu items. | ||
| editorDisabledResponsive: |
There was a problem hiding this comment.
I think its better to only return what we need from the selector and do calculations outside it, in which case I think it would be preferable to return isIsolatedEditor here and then make editorDisabledResponsive a const in the component. I could be wrong though.
There was a problem hiding this comment.
I had figured to only export from the selector what you actually need. I think it would cause fewer updates if we do the calculation within the selector. It's minor either way in this case though. I'd opt to leave it as is.
|
We should do the same in the Site Editor v2 as well. |
It works on Site Editor v2 without any more changes :) |
|
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. |
|
Size Change: +28 B (0%) Total Size: 6.89 MB
ℹ️ View Unchanged
|
|
Flaky tests detected in d800b6e. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/22781338167
|
scruffian
left a comment
There was a problem hiding this comment.
Makes sense, let's bring it in!
|
Did this cause #76439 (comment) |
|
@getdave Very possibly. It should only impact the isolated navigation editor though. Maybe the "isolated editor" check wasn't specific enough to the navigation instance. |
What?
Disables the navigation block's responsive mobile menu view when in the isolated editor view or site editor preview mode.
Why?
The navigation block in the isolated editor and site editor preview collapses to the mobile hamburger menu when the view is small enough to trigger the breakpoint. Both of these views are intended to display the navigation block structure, not the hamburger menu.
How?
Check for preview or isolated editor, and disable the responsive setting if so.
Testing Instructions
/wp-admin/site-editor.php?p=%2FnavigationTesting Instructions for Keyboard
Screenshots or screencast
Screen.Recording.2026-03-05.at.10.18.57.AM.mov