-
Notifications
You must be signed in to change notification settings - Fork 11
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
Render Skeleton When Loading Profile Viewer #152
Conversation
Modified the way the profile viewer loads to show only the skeleton card when the page is loading in; this fixes the issues with the skeleton not rendering at all, as well as making it a bit more clear that the page is still loading content.
The Back Matter and Metadata components previously were rendered alonside the skeleton. Now that those components do not render right away, the tests for those components had to be updated; the test functions were changed to use `await` and a timeout of 10000ms to wait on the page to load before finding the elements.
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.
Ideally the skeletons should be used in each area of the page that might take time to independently load and should resemble the general shape of the component that will be rendered, populating independently as the data is available.
This reverts commit 4b1e604.
When the controls are still being resolved, display the back matter and metadata components alongside the skeleton, because they will be fully loaded before the controls are resolved.
In the previous commit that initially sets up the skeleton, |
Change the skeleton to render two rectangles in the place of the "imported controls." This more accurately matches the style of the page when it loads.
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.
Sorry, looked better before my terrible suggestion 😟.
This reverts commit 4397e9c.
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.
Looks good, provided that the distribution (commands the pipeline execute) displays things properly.
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.
Comparing the two different styles, it definitely looks better this way having the skeleton for loading imported controls instead of the whole page. Also, it isn't part of this task, but there is a console error for a key prop when running tests. I don't know if there is an issue for it already.
Out of curiosity, was console error there before this branch was created? Just don't want to unintentionally add errors to fix later. |
It must have been there before this branch, but not exactly sure where or when this error occurred. |
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 looks so much better with the skeleton rendering than without. Great work!
Modified the way the profile viewer loads to show only the skeleton
card when the page is loading in; this fixes the issues with the
skeleton not rendering at all, as well as making it a bit more clear
that the page is still loading content.