-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
When changing a gallery block to multiple images, let the image blocks inherit the gallery alignment #11374
Comments
I think it's a good request. I tested and confirmed with WordPress 4.9.8 and Gutenberg 4.2.0 using Firefox 63.0.1 on macOS 10.13.6 that when you convert a gallery into images the alignment is not preserved. (1m50s) |
I've created a PR which makes the alignment to be persistent during a block conversion. While I was testing it, I start having some thoughts about: "What about when transforming an image to a gallery?" In my rush, I tried to make it work for vice-versa too, but when multiple images and each one has it's own alignment, which one should decide our new gallery alignment? Picking the alignment of the first image may sound like an answer, but it's too magic and inconsistent. Curious about what do you think about this. |
Hi, I did not realize that it was possible to change images to a gallery, but yes, sure enough, that seems to work. I would expect the gallery to inherit the alignment of the images if they are all the same, but have no alignment if they differ. It's easy to add an alignment if needed to a gallery. |
We can just use the simplest approach as a start, if we're transforming one image, use the same alignment, if more than one, just ignore the alignment. The proposal by @rowroll is reasonable as well. |
Is your feature request related to a problem? Please describe.
My blog is "old school" in that it just posts image after image, each with a caption. In the old editor I upload the images into the Media Library, give them captions, submit them all. Now I have to start a gallery block, upload the images, give them captions, then insert into the page. Then I need to change the gallery block into images, except the images all appear left aligned (breaking the style sheet?) and I have to individually align each image block to be the centered.
Describe the solution you'd like
I can give the gallery an alignment, then explode it into image blocks, and all the image blocks inherit that alignment.
Describe alternatives you've considered
Let me set the image blocks to be center aligned by default.
The text was updated successfully, but these errors were encountered: