Single Pattern View: Layout content shifts and downloads asset twice. #408
Labels
[Component] Theme
The frontend of the pattern directory, pattern lists UI
Milestone
Describe the bug
We render the post content in
single-wporg-pattern.php
and then replace it with JavaScript-driven content.This leads to 2 problems:
This problem isn't as noticeable when patterns use small, compressed images, but some don't. Patterns from the wordpress.org author have large images, many greater than 1 MB (which is another issue we should address).
Related #255, #349
Ideas
1. The view flashes (jank)
a. Move the page header from js into PHP template. ← Probably the easiest
b. Add in some placeholders (fixed heights) in the Pattern Directory theme.
2. The images (& other assets) are downloaded twice
This is definitely tricky since we use the iframe. I wonder if we should consider taking pattern image snapshots on update/upload and use that for the main pattern grid and this page until the user interacts. We could then swap out the image for the iframe.
🤔
Screenshots
View Gif
Snapped at ~100mb up/down.
To Reproduce
Steps to reproduce the behavior:
network
tabDesktop (please complete the following information):
The text was updated successfully, but these errors were encountered: