-
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
Fix image centering in gutenberg 8.2.0 #22693
Fix image centering in gutenberg 8.2.0 #22693
Conversation
@@ -259,7 +259,7 @@ export function ImageEdit( { | |||
} | |||
|
|||
function updateAlignment( nextAlign ) { | |||
const extraUpdatedAttributes = isWideAligned | |||
const extraUpdatedAttributes = [ 'wide', 'full' ].includes( nextAlign ) |
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.
The wide alignment issue was a different regression introduced here 1063573#r39498180, I pushed a fix
* Image block: use hooks * Use data hooks * Formatting * Fix e2e tests * Fix useSelect * Clean up * Fix select
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.
Works well in my testing! Thanks @roo2 and @youknowriad 🙂
b8f8fd0
to
3571ce1
Compare
Co-authored-by: Riad Benguella <benguella@gmail.com>
closes #22694
Description
Currently in 8.2.0, image centering is broken, I originally found it testing for wordpress.com and can confirm it also happens in gutenberg's docker testing environment
Before:
Automattic/wp-calypso#42637
How has this been tested?
Technical Details
It looks like the missing piece was that the
.components-resizable-box__container
element no longer haddisplay: inline-block;
set on it after this change https://github.com/WordPress/gutenberg/pull/22360/files#diff-d1d037caeeea85a91038b28fa70cd435L28Note
There is currently an issue with resizing the image and then setting it to "Wide width", if you do this, the image is not set to full screen like it should be