Add isNavigationPostEditorKey symbol to fix menu display context#76461
Add isNavigationPostEditorKey symbol to fix menu display context#76461
Conversation
|
Warning: Type of PR label mismatch To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.
Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task. |
|
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: +13 B (0%) Total Size: 8.75 MB
ℹ️ View Unchanged
|
scruffian
left a comment
There was a problem hiding this comment.
Tested the template part isolated editor ✅
Tested the navigation isolated editor ✅
|
Flaky tests detected in b063a70. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/23012989644
|
|
Thanks for fixing this so quickly 🙏 |
What?
Closes #76439
When editing a template part that contains a navigation block (e.g. a header with
focusMode=true), the navigation block's responsive overlay/hamburger menu was incorrectly suppressed — the same as when editing a navigation post directly.Why?
The
editorDisabledResponsiveflag relied onisIsolatedEditorKey, which istruefor any isolated editor context:wp_template_part,wp_block, andwp_navigation. Only thewp_navigationcase should disable responsive mode (so the full menu is always visible when editing a nav entity directly).How?
Adds a new private block-editor setting key
isNavigationPostEditorKey, set totrueonly whenpostType === 'wp_navigation'inuse-block-editor-settings. The navigation block uses this narrower key instead ofisIsolatedEditorKey.Also removes an unrelated
isPreviewModecondition from the same check, as it was not needed.Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast
Screen.Recording.2026-03-12.at.11.40.10.AM.mov