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

Better loading UX #5

Closed
bmaupin opened this issue Jan 16, 2020 · 0 comments
Closed

Better loading UX #5

bmaupin opened this issue Jan 16, 2020 · 0 comments

Comments

@bmaupin
Copy link
Owner

bmaupin commented Jan 16, 2020

Cases

  1. When the API isn't running and the data isn't cached
    • Current: Loading spinner
    • Desired: Loading spinner with message along the lines of the API is starting and can take up to 30 seconds
  2. When the API is running and the data isn't cached
    • Current: No loading spinner
    • Desired: Loading spinner with no message
  3. When the API is running and the data is cached
    • Current: No loading spinner
    • Desired: No loading spinner (this would cause a flash every time the chart is loaded or changed)

Ideas

Idea 1

Could it be possible to create 1 loading spinner component to cover all of these scenarios? It wouldn't be very elegant, but one idea would be to:

  • Wait up to N ms before showing the loading spinner
  • Wait up to N s before showing the message

That would cover all the cases and show the spinner and/or message only when needed...

Idea 2

Problem with this approach: How can we differentiate between case 1 and 2? The UI would have no way of knowing if the API was stopped.

Create a component and use various states to indicate what should happen. For example, if it was used as a parent component and the chart was a child:

  • For case 1, show the loading spinner + message and don't show child components
  • For case 2, show the loading spinner and don't show child components
  • For case 3, show the child components
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

No branches or pull requests

1 participant