Template field: match exactly the behavior of post template panel#76596
Open
ntsekouras wants to merge 1 commit intotrunkfrom
Open
Template field: match exactly the behavior of post template panel#76596ntsekouras wants to merge 1 commit intotrunkfrom
ntsekouras wants to merge 1 commit intotrunkfrom
Conversation
|
Size Change: +94 B (0%) Total Size: 8.75 MB
ℹ️ View Unchanged
|
|
Flaky tests detected in 1e7ea81. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/23207419091
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Follow up of: #76441
PostTemplatePanelhas complex logic that has been iterated over the years to handle differently different combinations of block, classic and hybrid themes that have custom templates or not, permissions etc..In the linked PR I update the
templatefield to match the template panel controls but there are a few more nuances.I observed two cases that didn't match, that needed to be handled in
DataFormPostSummarycomponent.default template. With the experiment this translates to making the fieldreadonly.Snippet to add template support
Testing Instructions
Editor Inspector: Use DataFormexperiment for each case to validate matching behaviors.Notes
While testing I observed a bug in the existing code for classic themes that had previously template support and created templates. The control shows the created templates, but this doesn't work if the template support is not enabled and errors. I have screenshot below.
Block theme 2025
It's expected that the template panel has actions and not the DataForm field. Actions are moved here.
2015 classic theme - It has no available templates
The
templatepanel or field are not rendered2015 classic theme - It has no available templates - but with added template support
2014 classic theme - It has available templates
In the
disabledscreenshot you can see the bug I mention above with previously created templates even if now it didn't have template support.2014 classic theme - It has available templates - but with added template support