fix(web): prevent tree page from showing blank screen #1282
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
Layout
component from tree page one level up, out of dynamically loaded chunk, so that navbar and footer are static and displayed at all timesloading
parameter todynamic()
call, such that the loading spinner is displayed during page fetchingThe 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.