-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Post Template: Fix condition checks #42038
Conversation
Size Change: +6 B (0%) Total Size: 1.25 MB
ℹ️ View Unchanged
|
Aha, yep, you're right. Looks like while copying the old logic I misunderstood this condition:
And missed this condition:
|
How hard would it be to add E2E tests for the three scenarios you identified? |
For some reason I thought Twenty Twenty-one was a classic theme that had One problem I noticed when checking Kadence is that you have to refresh the editor after creating a block template in order for the Default template option to appear. It looks like this bug existed before #41925 though (I verified by disabling Gutenberg) so it's not relevant to this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be good to have E2E tests for the four scenarios (T19, T20, Kadence, T22) since the logic is confusing and error prone, but I don't want that to stop us merging this so that the next Gutenberg release isn't buggy!
Technically not complicated, but I'm worried that switching between multiple themes for simple tests might be flaky. Adding this to my to-do list and will try to follow up with e2e tests shortly.
Correct, the "Default template" string is supplied by the server, so it requires a page refresh. Maybe we can fix this as a part of #41449. |
I'm going to merge this. @jorgefilipecosta, we'll need to cherry-pick this for the next release. |
Thanks @Mamaduka! |
What?
A follow-up to #41925.
PR fixes the following conditions for the "Post Template" component:
Why?
These match behavior of the previous Post Template panel component.
P.S. @noisysocks, sorry I missed this during initial testing.
Testing Instructions
Theme with no templates
Theme with templates, no block template support
Block Theme
Screenshots or screencast