Cover block: Clear aspect ratio value when toggling full height#59296
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. |
|
Size Change: +33 B (0%) Total Size: 1.7 MB
ℹ️ View Unchanged
|
fabiankaegy
left a comment
There was a problem hiding this comment.
Good catch and works as advertised :)
Should we backport this to 6.5? Seems like a bug that was introduced with the newly inroduced aspect ratio on the cover
jasmussen
left a comment
There was a problem hiding this comment.
Fabian beat me to it, but I want to also thank you for tackling this one! 🙏
|
Thanks for the reviews, folks! 🙇
Yes, that's the intention. Thanks for adding the labels! |
* Cover block: Clear aspect ratio value when toggling full height * Tweak isMinFullHeight logic Co-authored-by: andrewserong <andrewserong@git.wordpress.org> Co-authored-by: fabiankaegy <fabiankaegy@git.wordpress.org> Co-authored-by: jasmussen <joen@git.wordpress.org>
|
I just cherry-picked this PR to the cherry-pick-wp-6-5-beta-3 branch to get it included in the next release: 5191efd |
* Cover block: Clear aspect ratio value when toggling full height * Tweak isMinFullHeight logic Co-authored-by: andrewserong <andrewserong@git.wordpress.org> Co-authored-by: fabiankaegy <fabiankaegy@git.wordpress.org> Co-authored-by: jasmussen <joen@git.wordpress.org>
What?
Fix an issue with the Cover block where if an aspect ratio is set, the Full Height toggle button in the block toolbar wasn't working.
Why?
Aspect ratio takes precedence over min height rules in the Cover block, so if we wish to update the min height rules, we need to clear out the aspect ratio value.
How?
In the cover block controls, when toggling the full height, clear out the aspect ratio value. Also, only show the full height control as "on" if there is no aspect ratio value.
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast
Before
2024-02-23.12.31.17.mp4
After
2024-02-23.12.31.57.mp4