-
Notifications
You must be signed in to change notification settings - Fork 26
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
Issue 857 - Chart loading skeleton #858
Conversation
|
||
if (loading) { | ||
content = <div css={chartLoading}>Loading...</div>; | ||
content = <Skeleton css={[wrapperStyle, fullHeight]} />; |
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 should be default! Then it fixes all the problems, maybe... no weird safe data checks!
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.
I changed this but unfortunately some kind of weird safeData checks are still required because of the way the components are structured. There's probably another cleaner way to fix this -- after demo day
We should have the |
Height ratio is off. Also, to keep this user friendly we should show the user something besides just a grayish rectangle. Could be as simple as some words or a loading spinner... |
53d3cb5
to
cf85b15
Compare
Current status for this PR:
It adds a note about a newly discovered issue with LineChart, which will be covered in another PR: |
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.
Loading "skeleton" ratio now works and has a spinner to indicate somethings happening. Tests and documentation look good for protectData
Resolves #857.
This adds a loading skeleton to charts.
Prior to this PR, charts did not have a height before they were loaded, so it caused a page reflow.
That said, there's a number of things on this PR that I'm not especially confident in.
safeData
to avoid having the charts throw errors ifdata
is null andisLoading
is true, but it smells fishy to me.