-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Bugfix/lazy component loading states and fetching #2500
Bugfix/lazy component loading states and fetching #2500
Conversation
This is pretty important fix and should be applied even when not polished. However - the Micorcart, Menu + Wishlist sidebars should be eagerly loaded for the offline mode - this is something i discussed with @patzick and there is a ticket for that. So I'd preffer to have them eagerly loaded this week and then think off what's left for this fancy loader You created here @filrak - we should have both! |
It will be finished today. With this approach user will be able to refresh failed component just with one click (we can even try to do this automatically after connection is restored). I'm not that a big fan of eager loading of this components. No matter if we have eager load or prefetch they still need to be downloaded anyway and in uncertain network conditions the bigger initial bundle is the worse for us. What is the exact reason of eager load of this offscreen components? @patzick ? |
Go to the product page, switch the internet off, add the product to the cart -try checking the cart status :) Good luck; at least for now ;) That's the reason for eagerly loading the key components - just cart, wishlist + navigation. |
Ok, then this PR is prty useless in core functionalities. More like an additional feature |
We should have it + Microcart + navigation eagerly loaded. I really like this feature - let's merge it in |
…ttps://github.com/filrak/vue-storefront into bugfix/lazy-component-loading-states-and-fetching
I added automatic reload of failed components when user cames back online |
Ok; fine with me |
Done. I will improve some parts during stability phase (mostly purge unused css in in-sidebar components and props allowing to specify width of sidebar) but for now it works perfectly fine and solves the problem gracefully ;). |
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.
Really cool feature!
I'd just set default values for component props and changed passing functions as props to vue-styled emits.
src/themes/default/components/theme/blocks/AsyncSidebar/AsyncSidebar.vue
Outdated
Show resolved
Hide resolved
src/themes/default/components/theme/blocks/AsyncSidebar/AsyncSidebar.vue
Outdated
Show resolved
Hide resolved
src/themes/default/components/theme/blocks/AsyncSidebar/AsyncSidebar.vue
Outdated
Show resolved
Hide resolved
src/themes/default/components/theme/blocks/AsyncSidebar/AsyncSidebar.vue
Outdated
Show resolved
Hide resolved
src/themes/default/components/theme/blocks/AsyncSidebar/LoadingError.vue
Outdated
Show resolved
Hide resolved
src/themes/default/components/theme/blocks/AsyncSidebar/LoadingError.vue
Outdated
Show resolved
Hide resolved
…idebar.vue Co-Authored-By: filrak <f.rakowskI@hotmail.com>
…idebar.vue Co-Authored-By: filrak <f.rakowskI@hotmail.com>
…gError.vue Co-Authored-By: filrak <f.rakowskI@hotmail.com>
…idebar.vue Co-Authored-By: filrak <f.rakowskI@hotmail.com>
…gError.vue Co-Authored-By: filrak <f.rakowskI@hotmail.com>
Co-Authored-By: filrak <f.rakowskI@hotmail.com>
Co-Authored-By: filrak <f.rakowskI@hotmail.com>
Co-Authored-By: filrak <f.rakowskI@hotmail.com>
Co-Authored-By: filrak <f.rakowskI@hotmail.com>
…t-loading-states-and-fetching
…ttps://github.com/filrak/vue-storefront into bugfix/lazy-component-loading-states-and-fetching
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.
Co-Authored-By: filrak <f.rakowskI@hotmail.com>
Short description and why it's useful
TODO
close
button on failed loadScreenshots of visual changes before/after (if there are any)
(Failed loading - is offline)
(Failed loading - is online)
Component is loading
The solution is still dirty and needs polishment. Just leaving the WIP PR to mostly show screenshots :)