-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
shrink list loading indicator to avoid page repaints #10778
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
Conversation
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.
Niiice! Hmmm, I think removing it entirely might be a touch confusing for some of our power users who might rely on knowing if a book is on a given list. So I think the next best thing we can do is to make it position absolute so it takes up no space. Something like this. You might need to also add an inline style to make it appear correctly before css load.
Hopefully enough to give those power users the cue they need, without being to confusing/jarring for others. In some universe, we'll hopefully just make this performant enough to not need lazy loading :')
.list-overview-loading-indicator {
position: relative;
}
.list-overview-loading-indicator::before {
content: "Loading...";
font-size: 8px;
text-transform: uppercase;
text-align: center;
line-height: 0;
height: 8px;
width: calc(100% - 8px);
position: absolute;
top: -8px;
left: 0;
opacity: 0.75;
}
@cdrini I think your proposal works to fix the problem (repainting) but it does leave a bit to be desired for the casual user to see this loading thing pop up and then disappear (in the rare care they do notice it -- the loading indicator disappears very fast for me). How about we put a loading indicator on the want to read dropper? Maybe where the little drop down arrow is. |
On second thought if the dropper is too hard to fuss with then we could have a small text that doesn't disappear like: |
My thinking is, there are 2 use cases:
(1) restricts us to something low-profile, so no animations or motion, since that'll attract the attention of a bunch of folks who don't really need to be looking there. (2) restricts us that it must be something that can be seen when looked for. The tiny loading text I think meets this requirement. No motion, so (1) people will likely not notice it, and (2) people will, even if they can't read it, notice something there and come to associate it with loading. And if a (1) person happens to notice it, they can just look/read it if necessary. Tiny loading text also is a good step improvement over what we have, which has this same issue, but is worse for the (1) crowd, and worse for all due to the layout shifts. |
@cdrini once I put it together your suggestion looks pretty good. It solves the main issue of a jumpy screen so lets go with it! Demo: |
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.
Lgtm! Tested on testing. The "..." is not appearing... but I think that was a pre-existing bug so not worrying about it.
Noticed while working on #10776
When you load a book page the cover image taking a while to load causes the page to jump.
However, once that's fixed in #10776 you'll be quick to notice the next thing that jumps around.
That is the "Loading..." indicator for lists.
I think that we should remove that loading indicator because:
Technical
Testing
The video below gives a nice demo
Screenshot
list_loading.mp4
Stakeholders