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

Chaotic pattern previews #38911

Open
jameskoster opened this issue Feb 18, 2022 · 5 comments
Open

Chaotic pattern previews #38911

jameskoster opened this issue Feb 18, 2022 · 5 comments
Labels
[Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced Needs Design Needs design efforts. [Type] Enhancement A suggestion for improvement.

Comments

@jameskoster
Copy link
Contributor

When patterns contain blocks that need to load external data (e.g. Navigation block, Site Logo block) the preview thumbnail appears sequentially which can feel quite chaotic due to the overall height changing multiple times through the loading state.

It's most egregious when browsing multiple patterns that contain multiple instances of these blocks at the same time, for example when selecting a header.

The issue is best explained with a video:

jumpy.mp4

I assume it's unrealistic to expect the pattern to know its overall dimensions before the contents are fully loaded. So we may need to consider a holistic loading state for pattern thumbnail grids.

loader

@jameskoster jameskoster added Needs Design Needs design efforts. [Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced labels Feb 18, 2022
@youknowriad
Copy link
Contributor

I think our best shot here is the use of React "suspense". I've already started a PR that explores these ideas which would allow us to have better control over loading states #37261 It's a bit challenging but I'll get back to it and see how far we can get.

@anelllya
Copy link

I think one good way of solving this is creating a ghost loading with a template of at least nine elements. Like in this example: https://www.npmjs.com/package/react-loading-skeleton. What do you think?

@jasmussen
Copy link
Contributor

I suspect that #38980 will help with the navigation block in most of the cases, at least, and I'll take a look at that when I get a moment.

@javierarce
Copy link
Contributor

We also have this problem in other places where we load patterns: Improvements to pattern loading #36491

@jameskoster
Copy link
Contributor Author

#38997 brings this to the surface once more.

default.mp4

@jordesign jordesign added the [Type] Enhancement A suggestion for improvement. label Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced Needs Design Needs design efforts. [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

6 participants