Automattic / wp-calypso

The JavaScript and API powered WordPress.com
https://developer.wordpress.com
GNU General Public License v2.0
12.42k stars 1.99k forks source link

Gallery Block: "Add to Gallery" option replaces current gallery images #55066

Open jp-imagines opened 3 years ago

jp-imagines commented 3 years ago

Steps to reproduce the behavior

  1. Go to My Site > Posts (or Pages, or Portfolio)
  2. Click on Screen Options > Classic View to navigate to wp-admin
  3. Create a new post/page/portfolio
  4. Add a Gallery block, and select images to insert into the gallery. Click Create a New Gallery > Insert Gallery to insert.
  5. Click the "media library" option (below the gallery) to insert a new image
  6. See that the "Add to gallery" option is selected on the left side of the window, but the currently inserted images still appear
  7. Select one or more images to add to the gallery, and click "Add to gallery"
  8. See that only the newly selected images appear on the next screen.
  9. Click "Update gallery." See that only the newly selected images are in the gallery now.

What I expected to happen

The "Add to Gallery" tab shouldn't display the images already in the gallery. Selecting new images shouldn't overwrite the current gallery, but add to it as described.

What actually happened

See above.

Context

30791625-hc

User had difficulty inserting a missing photo into their gallery without removing the other images.

Browser / OS version

Any.

Is this specific to the applied theme? Which one?

No.

Does this happen on simple or atomic sites or both?

Both. Must be in wp-admin view first.

Is there any console output or error text?

No.

Level of impact (Does it block purchases? Does it affect more than just one site?)

Low?

Reproducibility (Consistent, Intermittent) Leave empty for consistent.

Screenshot / Video: If applicable, add screenshots to help explain your problem.

https://user-images.githubusercontent.com/5630717/127691597-8193c400-bcee-41e5-95d7-aeeec0153612.mp4

Workaround shown in the video above:

When inserting new images, click the "Edit gallery" tab first, then go back to the "Add to Gallery" tab. The images already in the gallery should disappear from this view, and selecting new images then adds them in, rather than using only these images.

KirkwallDay commented 2 years ago

An instance of this here: 32453251-hc

Clicking edit gallery first worked to preserve the gallery.