-
Notifications
You must be signed in to change notification settings - Fork 751
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Fix global loading state on root Coach pages #11218
Fix global loading state on root Coach pages #11218
Conversation
Fixes both global and local loaders being displayed when loading the classes page.
on root coach pages. Even though global/local loading state is set in some loading pages handlers, before running individual pages handlers, coach plugin fetches some data in global 'beforeRoute'. That takes significantly more time than individual handlers. Not having loading state set in this 'beforeRoute' caused seemingly missing global loader (even though it was displayed very briefly for individual handlers)
Build Artifacts
|
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.
Changes look correct to me! Thanks @MisRob!
@@ -26,7 +26,8 @@ export default [ | |||
path: '/classes', | |||
component: CoachClassListPage, | |||
handler(toRoute) { | |||
store.dispatch('loading'); | |||
// loading state is handled locally | |||
store.dispatch('notLoading'); |
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 accords with my general sense that we can reduce the role of the core loading state to be about toggling the linear loader when the navigation is still resolving. In this frame, we could handle it entirely within our core routing setup, where we toggle it on before route enter, and toggle it after after the route has resolved.
Summary
See commit messages for more details.
Comments
Further improvements in the Coach loading states and navigation overall are needed. See #11219.
References
Closes #10729
Reviewer guidance
On slow network, navigate the root Coach pages and tabs
Testing checklist
PR process
Reviewer checklist
yarn
andpip
)