Try fix image block#21167
Conversation
|
Size Change: -1 B Total Size: 857 kB
ℹ️ View Unchanged
|
| <div | ||
| className={ | ||
| needsAlignmentWrapper | ||
| ? 'wp-block block-editor-block-list__block' |
There was a problem hiding this comment.
Ideally these classes are not needed, and ideally, we provide an alignment wrapper component that the block can wrap around the block.
There was a problem hiding this comment.
I guess it's another argument to absorb the alignment in Block.* for now.
There was a problem hiding this comment.
I'm fine with this for now (with a comment) while we continue the work to improve alignments
There was a problem hiding this comment.
It's needed so the div has the proper width and margins. Yes, we'd need to comment and continue with figuring out how to best proceed with the alignment issue.
025626e to
c5b033c
Compare
|
This needs a thorough test since we'll need to do a patch release for Gutenberg 7.8 with this change. |
youknowriad
left a comment
There was a problem hiding this comment.
I tested this and it seems to work well in 2020
Some alignments are broken in 2019 but I believe that it's broken in master too.
|
This tests well for me also. Both with no editor style and TwentyTwenty. TwentyNineteen, as Riad mentions, has some separate issues. I also confirmed that very very long multi-line captions still work as they should. Nice. The following is unrelated, but something we really should look at: there's no right margin on a left floated image, or left margin on a right floated image: |
That seems to be the case only if the image is resized 🤔 |
|
Interesting. |
* Try fix image block * Fix flickering * Add comment
|
@jasmussen Thanks for looking into it |
|
I guess this needs to be fixed before we can do a patch release. |
|
I fixed it in #21201 but I'm not sure how to proceed with the feedback. |
|
Does Gutenberg use automated end to end tests for these kinds of bugs? |
I'm having the same issue since 7.8.1. Also alignment are all over the shop, I reverted back to 7.8 for now. |


Description
Alternative to #21160. This is a more complete fix, I think.
Fixes clicking on the block when it's floated.
Fixes centre alignment.
Fixes toolbar position when floated.
Fixes block outline when floated.
How has this been tested?
Screenshots
Types of changes
Checklist: