Skip to content
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 in Site View: Improve fallback loading #51802

Open
scruffian opened this issue Jun 22, 2023 · 3 comments
Open

Navigation in Site View: Improve fallback loading #51802

scruffian opened this issue Jun 22, 2023 · 3 comments
Assignees
Labels
[Block] Navigation Affects the Navigation Block [Status] In Progress Tracking issues with work in progress [Type] Task Issues or PRs that have been broken down into an individual action to take

Comments

@scruffian
Copy link
Contributor

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:
janky

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:

  1. Delete all your navigations
  2. Open the site editor
  3. Open the navigation section
  4. Notice that there is a small flash before the fallback is created.
@scruffian scruffian added the [Block] Navigation Affects the Navigation Block label Jun 22, 2023
@getdave
Copy link
Contributor

getdave commented Jun 27, 2023

May be fixed by #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();
	} }
>

@getdave
Copy link
Contributor

getdave commented Jul 3, 2023

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.

@getdave
Copy link
Contributor

getdave commented Jul 5, 2023

PR to fix is open #52322

@jordesign jordesign added the [Type] Task Issues or PRs that have been broken down into an individual action to take label Jul 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Navigation Affects the Navigation Block [Status] In Progress Tracking issues with work in progress [Type] Task Issues or PRs that have been broken down into an individual action to take
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants