Experimental: Add template panel to include the existing template actions#76539
Experimental: Add template panel to include the existing template actions#76539ntsekouras merged 5 commits intotrunkfrom
template panel to include the existing template actions#76539Conversation
|
Size Change: +1.87 kB (+0.02%) Total Size: 7.66 MB
ℹ️ View Unchanged
|
|
Flaky tests detected in ee6c3ee. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/23432664092
|
|
I believe one action is missing, and that is switching a classic theme template (PHP file) with another classic theme template? |
This PR affects the
In the case we have a preview, the initial designs dictate that it should open the |
|
Neat! Could we apply an aspect ratio to the thumbnail in the Template panel? When a classic template is selected, I think we could expand the copy in the Template panel slightly, something like:
I suppose in this one case the button might read "Create block template" as well. |
t-hamano
left a comment
There was a problem hiding this comment.
Thanks for working on this!
In block themes when there are no available templates we need a way (possibly) in the template panel to `use the default template). Right now you can't from the panel.
What do you think about including default templates in the "Choose a template" modal, not just user-created custom templates? If so, I don't think the "Use default template" button would be necessary.
For example:
5f82439 to
35a213b
Compare
I updated with this change, although I'm only appending the default template if the experiment is enabled. So I haven't removed the @jameskoster I updated the suggestions from here. Right now the I'd appreciate testing with the different combinations of themes(block, classic, hybrid) with the experiment either |
t-hamano
left a comment
There was a problem hiding this comment.
I think this PR works in all scenarios, and I believe it's ready to ship.
@jameskoster, what do you think from a design perspective?
|
Everything seems to be working 👍 Spending a few minutes with the feature I'm slightly conflicted about the action triggers. I'm wondering if clicking the template thumbnail should go to edit the template, and we replace the "Edit" button below with a "Swap" button that opens the modal. I think either works, but I'd appreciate a confidence boost either way from y'all @WordPress/gutenberg-design. |
|
Is it something we can start with here, then adjust easily? |
We can adjust easily. I'll merge this one after merging this one: #76532 and we can iterate if needed. |
192ccc3 to
ee6c3ee
Compare
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
…ctions (#76539) Co-authored-by: ntsekouras <ntsekouras@git.wordpress.org> Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: carolinan <poena@git.wordpress.org> Co-authored-by: jameskoster <jameskoster@git.wordpress.org> Co-authored-by: jasmussen <joen@git.wordpress.org>
…ctions (#76539) Co-authored-by: ntsekouras <ntsekouras@git.wordpress.org> Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: carolinan <poena@git.wordpress.org> Co-authored-by: jameskoster <jameskoster@git.wordpress.org> Co-authored-by: jasmussen <joen@git.wordpress.org>
What?
Part of: #76104
Which is part of the bigger: #76076
Alternative of: #76251
The discussions in the alternative PR led to some new designs about where the template actions should live.
Block themes:

Classic themes (with and without template support)

Notes
The replacement of
changetemplate in both template field (DataForm) and this panel is going to be handled separately because we first need to create the newradio-cardcomponent.This PR is WIP and aims to validate the suggested approach and clarify the remaining UX/UI issues.
change templatemodal only for block themes for now, which is available if you click the preview. Hybrid themes can have php templates without preview, so they should render a select control. Should thisselectcontrol render in a modal in this case?Testing Instructions
Editor Inspector: Use DataFormexperiment2014and add template support). The panel should show thecreate newbutton and only show theeditand the template preview if a block template is selected.Snippet for adding template support:
Block theme (2025)
Screen.Recording.2026-03-16.at.4.38.15.PM.mov
Hybrid theme
Screen.Recording.2026-03-16.at.4.37.23.PM.mov