-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Feature: Add navigation.isLoading
state to core/router store
#67680
Feature: Add navigation.isLoading
state to core/router store
#67680
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Flaky tests detected in 4fe358e. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/12196351428
|
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.
This looks good to me. Thanks for the quick PR, @fabiankaegy.
We can now use this flag to add UI in #67181 to show a custom UI when the user is waiting for search results.
I believe this API needs more consideration for WP 6.8, but we can test it as it is until then. I have added it to the WordPress 6.8 iteration, by the way. |
I unintentionally enabled auto-merge on this PR. Feel free to proceed as necessary if it needs to be reverted or needs additional changes. |
I just noticed it after approving 🙂. No worries, we can try out the API while it's in Gutenberg. It would also need some e2e tests. |
What?
Adds a new
navigation.isLoading
state to thecore/router
interactivity storeWhy?
Today the router only has the
navigation.hasStarted
andnavigation.hasFinished
states. These only get set if theloadingAnimation
option is not set to false.Because of this it is not possible to hide the global loading indicator whilst still knowing whether or not the router is currently loading something.
How?
Adds a new state to the store