-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Navigation Block: fix link UI popover only opens if there's one navigation block in the page #47829
Comments
ProblemWe have x2 Navigation blocks which are both referencing the same underlying When a link block is inserted into menu 1 the But then immediately after that Nav block 2 syncs with the entity which triggers What we want is for the user changes only to be reported as the "last block updated" whereas what's happening is the synced blocks are reported. This means that the following check will never pass... gutenberg/packages/block-editor/src/components/off-canvas-editor/block-contents.js Line 80 in b071855
...and thus and Link UI is never shown in the list view. Possible SolutionsAdd "actor" metadataIn #47874 we considered adding a The idea was that we'd grab the meta from the state and discard any results that were triggered by Other ideas
|
I think this bug is a manifestation of the fragile nature of the solution we have here. I don't love the current UX for adding links to a navigation block - I think that the idea being explored in #46981 is a superior UX and we should explore this direction. This bug only happens in quite a specific scenario (you need to have the same nav block twice in the same page) and even then it doesn't stop you from being able to edit the block - it just requires a few extra clicks - you could even argue that it's a better experience than the current one! All that is to say I think we should pause these efforts and put them into #46981. |
I don't think this is anything to do with
|
I think we can solve this a different way: #48219 |
Description
While fixing #47828 we uncovered a new bug in the case where more than one navigation block is present on the page.
Step-by-step reproduction instructions
Insert a navigation block with custom links.
Click the inserter to add a new custom link, it should trigger the popover to edit the link.
Insert a new navigation block just below.
Insert a new custom link to it. The popover should open, but it doesn't.
Screenshots, screen recording, code snippet
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: