-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Loading state of blocks with entities #22072
Comments
I took a very short amount of time to just get out a few explorations around this. Skeleton of a blockThis loading state is very similar to the shadow of the elements coming in. Perhaps a simple shading or even a pulse. Pulsing blocksOver a loading, what about a simple block pulse? This has complications if just flashing and doesn't really help the multiples on same UI though. ConclusionI do feel taking the approach of skeleton content could avoid some of the spinning loader issues. |
I have not experienced any delays with the site title. I prefer the simple shade, but this also looks like the spacer block. |
I imagine something like this should also be added to the template part/post content blocks? |
Had a look into a few loading state visual alternatives to what's already provided by @karmatosed. Most of these would be animating so they might not make sense by just looking at them. I think the simple gray pulsing block that was originally done above is probably the best move forward. @noahtallen in terms of Template Parts loading I think it make sense to err on the side of loading the bigger component until the children has all loaded instead of showing multiple nested loading states. Could you give me a sense of how long some of these blocks/template parts are likely to load for? We might end up in a state where it makes sense to show loading states for only the blocks with entities and no loading state for anything else. |
For some context of the loading hierarchy:
As for time, I'm not sure. I think it partially depends on internet connection, but currently I am seeing maybe a second or two for the root template, and then maybe another second or two for the rest of it. This is all local too, so a real site could be slower. Another challenge is that we don't know the dimensions of the block until after it renders, which could provide a janky experience 🤔 |
That's super helpful
Yeah, very true. Any idea on how we can fix that? Could we not show anything until the block is rendered, then when they load dynamic values we can show the loading part. Definitely wanna avoid too much jumping of elements |
I don't think that helps since the dynamic values define the height :/ For example, the dynamic value "site title" might be very short (and take up one line) or very long (and take up multiple lines) |
I think that's fine though. Most placeholder loaders you see out there have a defined with but not a defined height. I suspect we could work with something similar. |
I think this is also fine and would recommend we go with a simple solution and take from there. We can always iterate. |
Which solution do you recon we should go with @karmatosed ? |
I agree with you on the 'simple gray pulsing block' @dubielzyk. |
Would it make more sense to do something with the toolbar + block icon if we don't know the height? |
This in combination with the placement indicator line, similar to the work Shaun has been exploring in #26404 could work. |
@jameskoster I like that and think it works without the placement indicator even. |
Agreed, the indicator could be situational. I think it might be nice for it to persist in this loading state, if it was present before the block was added – whether that is via drag / drop, or the design I referenced in the previous comment. |
I feel like there's a direction here, so going to cautiously move the labels to 'needs dev', can always shuffle them back. |
I"m unable to recreate the old loading behaviour in my tests (entities seem to load almost immediately). Given it has been almost 3 years since last activity on this issue - I'm going to close it. |
This is how the site title renders while it's loading:
It should indicate this brief loading state somehow. We have to be careful, though, with plaguing the UI with "loading..." or spinners, specially when it is just a brief flash.
The text was updated successfully, but these errors were encountered: