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

Prefetch occurrences of the week #103

Open
stormofice opened this issue Jul 24, 2022 · 5 comments
Open

Prefetch occurrences of the week #103

stormofice opened this issue Jul 24, 2022 · 5 comments
Labels
enhancement New feature or request low priority

Comments

@stormofice
Copy link
Contributor

With #93 being fixed, there is still a small amount of flicker due to the backend's latency.

Could we preload all occurrences of the currently select week (after page load) to smooth out the experience?
This should not interfere with normal site usage, as the data is being downloaded in the background.

There are valid data usage concerns, but I think the quality of life improvement is more important.

@stormofice stormofice added enhancement New feature or request low priority labels Jul 24, 2022
@GamerBene19
Copy link
Collaborator

there is still a small amount of flicker due to the backend's latency.

I think the better solution would be to use a proper loading spinner in this case.
@maanex Whats your take on this?

@stormofice
Copy link
Contributor Author

Just to clarify, these fast swaps to "Loading..." and back to content are the ones I think we should avoid:

Screen.Recording.2022-07-24.at.16.55.57.mov

@GamerBene19
Copy link
Collaborator

GamerBene19 commented Jul 24, 2022

Just to clarify, these fast swaps to "Loading..." and back to content are the ones I think we should avoid

Thanks for the clarification, but I did understand what you meant.
Still, I think that having a proper loading spinner/screen is the better solution. Perhaps we can use an approach similar to YouTube, were we display "dummy" components until the content is loaded:
vlcsnap-2022-07-24-21h24m29s855

@maanex
Copy link
Contributor

maanex commented Jul 25, 2022

Ghost elements, as they are called, are a solid option for initial page load. After initial load is done that we should definitely pre-fetch the other days in terms of user experience. The backend should cache those kinds requests anyway so the impact shouldn't be that significant.

@tobiges
Copy link
Member

tobiges commented Jul 26, 2022

It sould be quite easy to implement prefetching: https://www.apollographql.com/docs/react/performance/performance/#prefetching-data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request low priority
Projects
None yet
Development

No branches or pull requests

4 participants