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 Sidebar: Fetch the blocks from the content when trying to load navigations #52899
Conversation
Size Change: +256 B (0%) Total Size: 1.44 MB
ℹ️ View Unchanged
|
94a9265
to
be2b298
Compare
Flaky tests detected in e883da0. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5654048075
|
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 fix @scruffian 🚀
This restores the sidebar navigation editing for customized template parts. I could only replicate the original issue when a template part containing navigation had been customized.
The key change from #52417 appears to be the removal of the call to update the edited entity record. If we do come across other regressions, addressing that might be a thread to follow.
...es/edit-site/src/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js
Outdated
Show resolved
Hide resolved
...es/edit-site/src/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js
Outdated
Show resolved
Hide resolved
…ttern/use-navigation-menu-content.js Co-authored-by: Dave Smith <getdavemail@gmail.com>
Merging this even though the interactivity tests are broken as this seems to be a problem already in trunk. |
Can confirm that this isn't needed for 6.3 as nav appears correctly in the sidebar. Removing backport label. |
What?
Updates the way we load navigations from the entity, so that we create blocks which can be used to display the navigation in the sidebar.
Why?
This worked, but was broken by #52417. The problem seems to be that we were relying on the blocks property, which isn't always present.
How?
Instead of relying on
block
, we can just generate them from content, usingparse
.Testing Instructions
Screenshots or screencast