Add aspect ratio control for gallery block#71116
Conversation
|
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. |
|
Thanks for working on this! |
|
thank you! this is so critical! clients upload a million diff image ratios and expect multiple galleries to all look the same! |
|
This is working great in my testing. Pinging @t-hamano also. |
tyxla
left a comment
There was a problem hiding this comment.
Looks like some tests should be updated with the new block.json attributes
t-hamano
left a comment
There was a problem hiding this comment.
Thanks for the ping! I don't have time to actually test it right now, but I'll take a look at the code and leave feedback on anything that bothers me.
|
@dhananjaykuber are you able to followup with these fixes? |
Co-authored-by: Aki Hamano <54422211+t-hamano@users.noreply.github.com>
Co-authored-by: Aki Hamano <54422211+t-hamano@users.noreply.github.com>
Co-authored-by: Aki Hamano <54422211+t-hamano@users.noreply.github.com>
scruffian
left a comment
There was a problem hiding this comment.
I think this is ready to bring in now. Might be good to get a review from someone else.
|
This PR also needs the fixtures regenerating. I think the best way forward here might be to merge this into a different branch in Gutenberg and keep iterating there, so I can update it. |
a2129d6
into
WordPress:feat/aspect-ratio-for-gallery-block
* Add aspect ratio control for gallery block (#71116) Merging into a branch in the main repo so I can fix the tests. * feat: Add aspect ratio control for gallery block * Update packages/block-library/src/gallery/edit.js Co-authored-by: Aki Hamano <54422211+t-hamano@users.noreply.github.com> * Apply suggestion from @scruffian * Update packages/block-library/src/gallery/edit.js Co-authored-by: Aki Hamano <54422211+t-hamano@users.noreply.github.com> * Update packages/block-library/src/gallery/edit.js Co-authored-by: Aki Hamano <54422211+t-hamano@users.noreply.github.com> * Update packages/block-library/src/gallery/edit.js * Update packages/block-library/src/gallery/edit.js * Apply suggestion from @scruffian --------- Co-authored-by: Ben Dwyer <ben@scruffian.com> Co-authored-by: Aki Hamano <54422211+t-hamano@users.noreply.github.com> Co-authored-by: dhananjaykuber <dhananjaykuber@git.wordpress.org> Co-authored-by: scruffian <scruffian@git.wordpress.org> Co-authored-by: tyxla <tyxla@git.wordpress.org> Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: mtias <matveb@git.wordpress.org> Co-authored-by: jhmonroe <jhmonroe@git.wordpress.org> Co-authored-by: cbirdsong <cbirdsong@git.wordpress.org> * update fixtures * Update packages/block-library/src/gallery/edit.js Co-authored-by: Aki Hamano <54422211+t-hamano@users.noreply.github.com> --------- Co-authored-by: Dhananjay Kuber <dhananjay.kuber@rtcamp.com> Co-authored-by: Aki Hamano <54422211+t-hamano@users.noreply.github.com> Co-authored-by: dhananjaykuber <dhananjaykuber@git.wordpress.org> Co-authored-by: tyxla <tyxla@git.wordpress.org> Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: mtias <matveb@git.wordpress.org> Co-authored-by: jhmonroe <jhmonroe@git.wordpress.org> Co-authored-by: cbirdsong <cbirdsong@git.wordpress.org> Co-authored-by: dhananjaykuber <dhananjaykuber@git.wordpress.org> Co-authored-by: scruffian <scruffian@git.wordpress.org> Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: mikachan <mikachan@git.wordpress.org> Co-authored-by: cbirdsong <cbirdsong@git.wordpress.org>
…ss#72104) * Add aspect ratio control for gallery block (WordPress#71116) Merging into a branch in the main repo so I can fix the tests. * feat: Add aspect ratio control for gallery block * Update packages/block-library/src/gallery/edit.js Co-authored-by: Aki Hamano <54422211+t-hamano@users.noreply.github.com> * Apply suggestion from @scruffian * Update packages/block-library/src/gallery/edit.js Co-authored-by: Aki Hamano <54422211+t-hamano@users.noreply.github.com> * Update packages/block-library/src/gallery/edit.js Co-authored-by: Aki Hamano <54422211+t-hamano@users.noreply.github.com> * Update packages/block-library/src/gallery/edit.js * Update packages/block-library/src/gallery/edit.js * Apply suggestion from @scruffian --------- Co-authored-by: Ben Dwyer <ben@scruffian.com> Co-authored-by: Aki Hamano <54422211+t-hamano@users.noreply.github.com> Co-authored-by: dhananjaykuber <dhananjaykuber@git.wordpress.org> Co-authored-by: scruffian <scruffian@git.wordpress.org> Co-authored-by: tyxla <tyxla@git.wordpress.org> Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: mtias <matveb@git.wordpress.org> Co-authored-by: jhmonroe <jhmonroe@git.wordpress.org> Co-authored-by: cbirdsong <cbirdsong@git.wordpress.org> * update fixtures * Update packages/block-library/src/gallery/edit.js Co-authored-by: Aki Hamano <54422211+t-hamano@users.noreply.github.com> --------- Co-authored-by: Dhananjay Kuber <dhananjay.kuber@rtcamp.com> Co-authored-by: Aki Hamano <54422211+t-hamano@users.noreply.github.com> Co-authored-by: dhananjaykuber <dhananjaykuber@git.wordpress.org> Co-authored-by: tyxla <tyxla@git.wordpress.org> Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: mtias <matveb@git.wordpress.org> Co-authored-by: jhmonroe <jhmonroe@git.wordpress.org> Co-authored-by: cbirdsong <cbirdsong@git.wordpress.org> Co-authored-by: dhananjaykuber <dhananjaykuber@git.wordpress.org> Co-authored-by: scruffian <scruffian@git.wordpress.org> Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: mikachan <mikachan@git.wordpress.org> Co-authored-by: cbirdsong <cbirdsong@git.wordpress.org>
Closes #66760
What?
Adds aspect ratio control to the Gallery block, allowing users to force all image blocks within the gallery to use the same aspect ratio for consistent visual presentation.
Why?
Currently the Gallery block displays images in their original aspect ratios, there is no way to control their aspect ratio.
How?
Add Aspect Ration control for gallery block.
Testing Instructions
Screenshots or screencast