-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Edit Site: Refactor the NavigationMenuContent component and fix the deprecation notice #51469
Conversation
Size Change: -132 B (0%) Total Size: 1.4 MB
ℹ️ View Unchanged
|
Wow this is such a great improvement. I'd not had a chance to dive in there and this produces a much better UX. Thank you! I'll review tomorrow. |
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.
Testing I could find any bugs here. Removing that artificial delay is a big win. Thank you!
Thanks for the review/testing, @getdave! |
…eprecation notice (WordPress#51469) * Edit Site: Refactor the NavigationMenuContent component and fix the deprecation notice * Remove artificial delay to avoid loading flickering * Display Page List block when it has no inner blocks
What?
PR fixes
blocks
property deprecation notice for Navigation menus in the Site Editor sidebar and refactors selectors to work with therootClientId
prop.I've also removed the artificial loading delay. The original flickering issue isn't noticeable now that the "skeleton" loader has been removed (#50326).
What is causing the "flickering:"
The list view starts rendering the
rootClientId
blocks while the "is single list block" value is resolved and then switches to rendering page list items. You can test this by logging the following condition:Why?
The core shouldn't use deprecated properties/methods.
How?
Updates the
PrivateListView
component torootClientId
instead of theblocks
prop.Testing Instructions
First, please ensure the testing site has at least one Navigation menu with custom links/pages and one showing "Page List."
Screenshots or screencast
CleanShot.2023-06-13.at.20.42.41.mp4