Image block: Omit max width observer element in galleries#69601
Image block: Omit max width observer element in galleries#69601
Conversation
|
Size Change: +8 B (0%) Total Size: 1.84 MB
ℹ️ View Unchanged
|
| clientId={ clientId } | ||
| blockEditingMode={ blockEditingMode } | ||
| parentLayoutType={ parentLayout?.type } | ||
| parentLayoutType={ layoutType } |
There was a problem hiding this comment.
This isn’t required for the fix and affects nothing at present. It just makes sense to pass the resolved value since otherwise the Image component would be getting undefined when inside a Gallery. It doesn’t matter, for now, in that particular case because everything it might affect is subordinate to allowResize that’s provided through context.
|
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 Unlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @jupa8712. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. 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. |
|
Thanks for testing and reviewing!
It would seem appropriate for now. I imagine the end goal isn’t disabling the in-canvas resizing in flex layouts but making it work like the Spacer block which keeps it and applies the value(s) per the parent layout’s support specification. Ultimately it would be nice if all this could be assimilated into a supports API sort of like what #32502 was doing. I’m sure that’s quite an effort though. |
…69601) Unlinked contributors: jupa8712. Co-authored-by: stokesman <presstoke@git.wordpress.org> Co-authored-by: t-hamano <wildworks@git.wordpress.org>

What?
Closes #69566
When an Image block is inside a gallery, omits an element that may cause layout issues and is unnecessary in that context already.
Why?
How?
Modifies the existing condition for rendering the element to account for the Gallery block’s layout definition.
Testing Instructions
Open a post
Paste in this test markup:
Images in various containers including Gallery
For the first Image block and for one Image block in each container:
figure. Presence looks like this:Screenshots or screencast