Template Switcher: Add theme preview#21768
Conversation
|
Size Change: +331 B (0%) Total Size: 842 kB
ℹ️ View Unchanged
|
Addison-Stavlo
left a comment
There was a problem hiding this comment.
This works very well! And the code looks good from my point of view.
I wonder if we should be displaying all of these previews on focus for use in a tabbing flow. 🤔 - But I don't think that concern should hold up this PR as none of the others work that way yet either. Thoughts for future iterations!
Indeed, I was also wondering about a11y implications but decided to hold off for now because the pre-existing template previews are also on-hover only. But yeah, definitely material for future iterations. |
14c131d to
66d8d28
Compare
|
Some tests currently failing. Waiting for #21780 which should fix them. |
66d8d28 to
58b2810
Compare
vindl
left a comment
There was a problem hiding this comment.
This worked as expected for me and the code looks good. 👍
In #21578, I added a few fields to Core's `/themes` endpoint, for use by the Site Editor's Template Switcher (see both #21578 and #21768). I then submitted those changes as a [PR](WordPress/wordpress-develop#222) against Core. That PR underwent a number of modifications and was eventually merged; the new fields will be part of the `/themes` endpoint exposed by Core starting from the next WP release. This PR updates the fields added by Gutenberg to follow the same semantics, as well as the callsites that use that endpoint.
Description
Add on-hover theme preview to site editor's template switcher (see mockups).
Fixes #20469.
How has this been tested?
Screenshots
Types of changes
Extends existing feature.
Checklist: