Pattern Overrides: Add support for Image caption attribute#72476
Pattern Overrides: Add support for Image caption attribute#72476
Conversation
|
Size Change: -10 B (0%) Total Size: 2.18 MB
ℹ️ View Unchanged
|
a99893c to
cdc6048
Compare
|
Flaky tests detected in dc7851d. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/18710123365
|
d590987 to
885f327
Compare
talldan
left a comment
There was a problem hiding this comment.
This works well in my testing. I think it could be considered a bug fix, as without this change users are still able to find a way around the caption restriction (add a caption after enabling overrides).
Making the Enable Overrides button work properly resolves that inconsistency.
|
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. |
885f327 to
dc7851d
Compare
Co-authored-by: ockham <bernhard-reiter@git.wordpress.org> Co-authored-by: talldan <talldanwp@git.wordpress.org> Co-authored-by: cbravobernal <cbravobernal@git.wordpress.org>
I don't think we need to backport it to a 2.5-year-old Gutenberg version, but I'll backport it to 21.9 😛 |
Co-authored-by: ockham <bernhard-reiter@git.wordpress.org> Co-authored-by: talldan <talldanwp@git.wordpress.org> Co-authored-by: cbravobernal <cbravobernal@git.wordpress.org>
|
I just cherry-picked this PR to the release/21.9 branch to get it included in the next release: c2ca71f |
Whatever happened to WordPress' promise of backwards-compatibility? I want my money back! 😠
Thank you! |
|
The automatic backport to the See #72573 for more details. |
|
Thanks @t-hamano, I was just looking into that 🥇 |
What?
Add Pattern Overrides support for the Image block's
captionattribute.Why?
Block Bindings support has been added for the
captionattribute, which means it should also be made available for Pattern Overrides.How?
By adding it to the
PARTIAL_SYNCING_SUPPORTED_BLOCKSarray.We previously considered inferring the list of block attributes supported by pattern overrides from the list of block attributes supported by block bindings from the server. However, we found that those lists aren't necessarily identical -- e.g. the Nav Link and Submenu blocks'
urlattribute is now supported by block bindings, but shouldn't be supported by pattern overrides. We thus decided to keep the separatePARTIAL_SYNCING_SUPPORTED_BLOCKSconst for now.Testing Instructions
trunk, where it isn't -- see screencasts below.)Screenshots or screencast