WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.48k stars 4.18k forks source link

Data views: Add loading indicator for preview field #59832

Open jameskoster opened 7 months ago

jameskoster commented 7 months ago

Related: https://github.com/WordPress/gutenberg/pull/59792

Here's Table layout:

https://github.com/WordPress/gutenberg/assets/846565/4dca44f6-7436-44ad-b44a-bc171758b145

It feels very clunky how the templates load piecemeal. It's particularly bad in this layout due to the reflow that occurs when the templates load.

Here's Grid layout:

https://github.com/WordPress/gutenberg/assets/846565/97a565d5-f695-47aa-ae94-67546ca0b30b

The fixed height helps a bit by eliminating the reflow, but it still feels very sluggish.


To address we can add a fixed height to the template previews in table layout, and add a loading indicator which obscures the preview until fully loaded.

t-hamano commented 5 months ago

I tried solving it once in #61408, but it wasn't the ideal approach. let me remove myself from assignees as I can't think of any other solution at the moment.