Open scruffian opened 1 year ago
~May be fixed by https://github.com/WordPress/gutenberg/pull/51795~
It won't be "fixed" but we can extend it by using the special button as a place to preload the fallback if there are no menus.
We can even do it on mouseenter
like this:
// ...snip
const { getNavigationFallbackId } = useSelect( coreStore );
// ...snip
<NavigatorButton
as={ SidebarNavigationItem }
path="/navigation"
withChevron
icon={ navigation }
onMouseEnter={ () => {
getNavigationFallbackId();
} }
>
Or we could check on the resolution status of getNavigationFallbackId
and if it hasn't resolved then show a spinner.
So that's change the condition for isLoading
to also consider status of Navigation Fallback resolver.
PR to fix is open https://github.com/WordPress/gutenberg/pull/52322
What problem does this address?
When a site has no navigations, we load the fallback when you open the Navigation section of the Site View:
What is your proposed solution?
We should find a way to load the fallback earlier so that its already where when you navigate to the the Navigation section.
To replicate: