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

Tiled Gallery: Adjust columns attribute when images are removed #30015

Closed
sirreal opened this issue Jan 9, 2019 · 4 comments · Fixed by #30582
Closed

Tiled Gallery: Adjust columns attribute when images are removed #30015

sirreal opened this issue Jan 9, 2019 · 4 comments · Fixed by #30582
Assignees
Labels
[Block] Tiled Gallery [Feature] Media The media screen in Calypso, general media management, or integration with third party media. [Pri] Low

Comments

@sirreal
Copy link
Member

sirreal commented Jan 9, 2019

We don't allow the range control for columns to be greater than the number of images in the Gallery, but if we've set it and remove images, the columns attribute can be greater than the images. We should ensure that the columns attribute and the range control are not greater than the number of images.

Steps to reproduce

  1. Add a number of image to a Tiled Gallery (8).
  2. Pick a view with an adjustable columns setting (circles).
  3. Set the columns to the maximum.
  4. Using "Edit Gallery" from the block toolbar, remove images.
  5. The images in the gallery are updated, but the maximum columns in the sidebar is not. This is the bug.
@simison
Copy link
Member

simison commented Jan 22, 2019

I'm not able to replicate this.

When setting columns to maximum and then removing images, columns in both attributes and in slider control always matches the new number of images.

Anything I'm missing?

@sirreal
Copy link
Member Author

sirreal commented Jan 22, 2019

I'm not able to replicate this.

@simison I've updated with some decent testing instructions. It's when images are removed via the media modal, I've observed it both in Calypso and WP Admin.

This is likely related to #30065. It seems to be related with keeping the media modal and the block in sync.

@sirreal sirreal added the [Feature] Media The media screen in Calypso, general media management, or integration with third party media. label Jan 22, 2019
@simison
Copy link
Member

simison commented Jan 22, 2019

Thanks! Seems like this is happening with core block as well. Opened an issue at upstream: WordPress/gutenberg#13423

@sirreal
Copy link
Member Author

sirreal commented Jan 25, 2019

We can grab the upstream fix for this: WordPress/gutenberg#13488

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Tiled Gallery [Feature] Media The media screen in Calypso, general media management, or integration with third party media. [Pri] Low
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants