-
Notifications
You must be signed in to change notification settings - Fork 3
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
Show spinner while snapshot image is loading #309
Conversation
…t image while overlay image is loading
Nice! I think the spinner is great.
|
I could, but then we're not showing the user something useful while we could be. It's a micro optimization but I prefer that over showing the spinner for longer. In the Chromatic webapp we currently preload the snapshot image but we don't preload the overlay images, which inspired this behavior.
It is, but the snapshot in the demo is < 100px tall and I've given the container a min-height: 100px, so it's actually getting vertically centered relative to that. Without the min-height the spinner could render flush to the top edge or even get clipped, which would be weird. |
@ghengeveld In that case, I would recommend keep current behavior, but without the pulsing image.
Perfect! |
@MichaelArestad Without the pulsating effect, there is no way to know the overlay image is still loading, which may lead people to incorrectly assume there are no visual changes. An alternative effect I originally envisioned is a linear indeterminate progress bar either above or below the image. Do you think that would be more appropriate? I implemented this alternative loading indicator. It is actually simpler because it works both for the snapshot image and the overlay images (in which case the bar appears on top of the snapshot image). Screen.Recording.2024-05-22.at.14.14.15.mov |
Screen.Recording.2024-05-28.at.10.59.09.mov
📦 Published PR as canary version:
1.5.0--canary.309.7b89f8d.0
✨ Test out this PR locally via: