-
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
Navigation: Preload Navigation screen API requests #24672
Conversation
Use wp.apiFetch.createPreloadingMiddleware to preload the innitial API requests made by the Navigation screen. This makes the screen appear quicker.
Size Change: 0 B Total Size: 1.16 MB ℹ️ View Unchanged
|
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.
There seems to be a couple of (possibly caching?) bugs in this branch that I couldn't reproduce on master
.
- When deleting the last/only menu, the screen briefly changes, but then the deleted menu re-appears.
- When no menus are present (delete your last menu and then reload the page) and creating a menu for the first time, the 'Create Menu' UI is still shown after the menu has been created.
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.
LGTM
Hm, bugger. I suspect the way we handle preloading in Gutenberg is flawed. We're caching requests at the Probably we'll have to look at implementing preloading at the Closing for now. |
Closes #24642.
Use
wp.apiFetch.createPreloadingMiddleware
to preload the initial API requests made by the Navigation screen. This makes the screen appear quicker.To test