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

fix(web): prevent tree page from showing blank screen #1282

Merged
merged 1 commit into from
Oct 20, 2023

Conversation

ivan-aksamentov
Copy link
Member

When loading for the first time the /tree page shows blank space without even navbar and footer. This is due to dynamic loading of the page content.

Here I:

  • bubble the Layout component from tree page one level up, out of dynamically loaded chunk, so that navbar and footer are static and displayed at all times
  • add loading parameter to dynamic() call, such that the loading spinner is displayed during page fetching

The page still freezes after fetching, while the tree is rendered. I believe this is due to the sheer amount of things being rendered in Auspice, but might also be perf problems on Nextclade side. I don't currently know a way to handle this or how to display loading indicator there, because React rendering is still synchronous and blocks main thread.

When loading for the first time the `/tree` page  shows blank space without even navbar and footer. This is due to dynamic loading of the page content.

Here I:
 - bubble the `Layout` component from tree page one level up, out of dynamically loaded chunk, so that navbar and footer are static and displayed at all times
 -  add `loading` parameter to `dynamic()` call, such that the loading spinner is displayed during page fetching

The page still freezes after fetching, while the tree is rendered. I believe this is due to the sheer amount of things being rendered in Auspice, but might also be perf problems on Nextclade side. I don't currently know a way to handle this or how to display loading indicator there, because React rendering is still synchronous and blocks main thread.
@vercel
Copy link

vercel bot commented Oct 20, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
nextclade ✅ Ready (Inspect) Visit Preview Oct 20, 2023 2:52pm

@ivan-aksamentov ivan-aksamentov merged commit eb24265 into master Oct 20, 2023
@ivan-aksamentov ivan-aksamentov deleted the fix/web-tree-page-blank branch October 20, 2023 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant