Show the same link creation UI in Navigation block canvas and editable list view.#68263
Show the same link creation UI in Navigation block canvas and editable list view.#68263snehapatil2001 wants to merge 1 commit intoWordPress:trunkfrom
Conversation
…able direct insert.
|
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. |
|
Thank you for the PR. This was fixed by #71163 so I'm going to go ahead and close this one out. |
Closes #68184
What?
This PR fixes the behavior of the navigation block inserter by disabling direct block insertion and adding 'core/navigation-submenu' to the prioritized block list. It ensures that all navigation block variations, including submenus, are easily accessible and consistent across both the canvas and list views.
Why?
The current behavior of the navigation block inserter causes an inconsistent user experience by directly inserting blocks without showing the block inserter UI. This makes it difficult to insert navigation blocks, especially submenus. By disabling direct insertion and ensuring proper prioritization of blocks, we aim to provide a more predictable and consistent block insertion process across all contexts.
How?
directInsertproperty fromtruetofalsein bothinner-blocks.jsandunsaved-inner-blocks.jsto prevent direct block insertion.PRIORITIZED_INSERTER_BLOCKSconstant to include'core/navigation-submenu', ensuring submenus are prioritized and accessible in the block inserter.renderAppenderlogic to ensure that the block inserter UI appears consistently and provides clear navigation options.Testing Instructions
Screenshots or screencast
Screen.Recording.2024-12-24.at.1.08.44.PM.mov