Automattic / wp-calypso

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

Media library: Bulk editing image's title, caption and description doesn't work #43311

Open sanjeev00733 opened 4 years ago

sanjeev00733 commented 4 years ago

Steps to reproduce

  1. Starting at URL: http:///test271117.blog
  2. Go to My sites > Sites > Media and then select 10 or more images and add some title, caption, and description to all images.
  3. Hit save and recheck the images after reloading the media page.

What I expected

All images should have an updated title, caption, and description.

What happened instead

Only few images have the updated image attributes (random images)

Note: It works fine in wp-admin dashboard.

Screenshot / Video

  1. Please see this video from the user https://www.dropbox.com/sh/50v8b0th0wuxe2e/AABJ_Ghj4hM-DF1DwjrSF2_Ha?dl=0&preview=For+Wordpress.mov
  2. I am able to replicate the issue on my test site.

Context / Source

user-report

flootr commented 4 years ago

Looking into this, got a suspicion what's going on.

flootr commented 4 years ago

So it seems like this is caused by the following behaviour:

  1. Changes to a form field in the media modal are only persisted after 1 second after the user typed something into the field. We call this behaviour debouncing and is likely to prevent spamming requests on every input change.
  2. Hitting the Done button only persists changes to the currently displayed media item

So looking at the users video they're too fast selecting the next item before (1) can apply. That's why they're changes aren't persisted.

What can we do to improve the users experience?

We're currently working on refactoring of the media library state management and it may very well be that this behaviour is not valid anymore afterwards.

/cc @saramarcondes because it's related to the media library reduxification

donalirl commented 4 years ago

Another case of this in #3159821-zen with video showing the issue too.

github-actions[bot] commented 3 years ago

This issue is stale because it has been 180 days with no activity. You can keep the issue open by adding a comment. If you do, please provide additional context and explain why you’d like it to remain open. You can also close the issue yourself — if you do, please add a brief explanation and apply one of relevant issue close labels.