Skip to content
This repository has been archived by the owner on Jun 14, 2022. It is now read-only.

Use Block Editor Preview component over Layout/Section thumbnails? #374

Open
johnstonphilip opened this issue May 21, 2020 · 2 comments
Open
Labels
enhancement New feature or request

Comments

@johnstonphilip
Copy link
Collaborator

The Problem
Currently Sections and Layouts use a png image as a preview. However, depending on the theme the section/layout might not actually look like the thumbnail.

Describe the solution you'd like
WordPress core has added a live preview component for their Block patterns, and I am wondering if we could use that instead of the png image.

Here's the the component in usage in core's pattern inserter:
https://github.com/WordPress/gutenberg/blob/5494ff5e528fa7ebe2cb53bf33cf914de3405e60/packages/block-editor/src/components/inserter/preview-panel.js#L16

@mikemcalister
Copy link
Contributor

Thanks for the note! This is definitely something we're looking at, especially as the library grows.

@mikemcalister
Copy link
Contributor

In a quick test, it looks like it can take a sec for those previews to generate (understandable). But it also regenerates the preview any time you switch tabs away from them, which could be troublesome if you have a bunch of patterns.

@mindctrl mindctrl added the enhancement New feature or request label May 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants