Skip to content
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

Gallery: removing images doesn't update maximum number of columns #13423

Closed
simison opened this issue Jan 22, 2019 · 0 comments · Fixed by #13488
Closed

Gallery: removing images doesn't update maximum number of columns #13423

simison opened this issue Jan 22, 2019 · 0 comments · Fixed by #13488
Labels
[Block] Gallery Affects the Gallery Block - used to display groups of images [Type] Bug An existing feature does not function as intended

Comments

@simison
Copy link
Member

simison commented Jan 22, 2019

Describe the bug
Gallery block allows the maximum number of columns not be higher than the number of images.

When removing images via "Edit gallery" button from the block's toolbar, the number columns does not get reflected to "new maximum".

To Reproduce
Steps to reproduce the behavior:

  1. Go to block editor

  2. Add gallery block and some images to it

  3. From the sidebar, change the number of columns to maximum

  4. Press "pen" icon from block's toolbar to "edit gallery"

  5. Remove image from media modal

  6. Observe the number of columns stay higher than the number of images:

    image

Removing images via "x" icons on corners works and updates the number of columns correctly.

Expected behavior
I expected a number of columns to be lowered to match the number of images.

Desktop (please complete the following information):

  • OS: MacOS
  • Browser Firefox
  • Version 64

We found out about this while building a custom gallery block that also relies on media modal:
Automattic/wp-calypso#30015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Gallery Affects the Gallery Block - used to display groups of images [Type] Bug An existing feature does not function as intended
Projects
None yet
2 participants