-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Stats: Create Placeholder Component #2491
Conversation
c8ec6aa
to
991f7bd
Compare
Code refactor all looks good to me. When I test using the instructions, though, I only see the placeholders flash on for a split-second & no spinners at all. Here's a video: That |
I tested this branch and the spinner and skeletons both show up at the same time? Is there a reason why we show 2 different preloaders consecutively? I think we should just show one or the other - at least for all the modules, except for the bar chart which can retain the spinner. |
I believe the history behind the spinner was some stats modules were so slow to load ( like the chart on long periods ) that the spinner would be shown after the 6 seconds. The skeleton and spinner are shown at the same time on production right now. The only ( planned ) behavior change in this branch is to show the spinner sooner that it currently happens in production. From my testing, the branch behaves like production does, but I could have just been staring at it too long today. |
Yeah, probably out of scope for this cleanup. But I can confirm that the spinner shows up ~2 sec after the skeleton 👍 |
@timmyc 👍 I'll just create a different issue for the double |
Marking this ready to go as I'm seeing a similar effect w/ empty localStorage on other branches. |
Stats: Create Placeholder Component
Currently the markup for rendering placeholder/skeleton loading indicators is scattered throughout all stats components. This branch aims to centralize all of that markup/scss into one central location, and to fix some behaviors around it.
To Test
The best way to test the placeholders is to empty your localStorage on the Insights page, and a year view of a site stats page. Refresh the pages on empty local storage and ensure everything still has pulsing loading indicators, and after 2s the spinners should appear.
To Do
/cc @alternatekev and @jancavan for thoughts