wordpress-mobile / WordPress-Android

WordPress for Android
http://android.wordpress.org
GNU General Public License v2.0
2.97k stars 1.32k forks source link

Media Library: "edit" button not available on Android #10739

Open rfaile313 opened 4 years ago

rfaile313 commented 4 years ago

Expected behavior

In a web browser, if you head to https://wordpress.com/media you can select multiple images at once to delete them

Here's a video:

0OwSwP

In the iOS app, you can tap the "Edit" button at My Sites > Site > Media to select multiple images at once for deletion.

slack-imgs

Actual behavior

In the Android app, no such button exists. Only one image can be deleted at a time, by opening them first.

Steps to reproduce the behavior

Log into any site on the Android app and head to My Sites > Site > Media

Tested on Samsung Galaxy S9+, Android 9, WPAndroid 13.3

user-report in 2471816-zen

designsimply commented 4 years ago

Thanks for asking about this! A Media Editing project has just begun.

It will happen for iOS first and then Android. You can follow progress for Media Editing on iOS at https://github.com/wordpress-mobile/WordPress-iOS/issues?utf8=%E2%9C%93&q=label%3A%22Media+Editing%22+

(internal references: paCBwp-ix-p2, paCBwp-jY-p2)

stale[bot] commented 3 years ago

This issue has been marked as stale because:

Please comment with an update if you believe this issue is still valid or if it can be closed. This issue will also be reviewed for validity and priority during regularly scheduled triage sessions.

designsimply commented 3 years ago

The Media Editing project didn't end up addressing this issue. I re-tested today using WPAndroid and WPiOS and found that the behavior now matches but that the option to multi-select images on the Media screen is not available on either platform.

I noticed we recently made an update in Gutenberg Mobile in https://github.com/WordPress/gutenberg/pull/24346 to allow uploading multiple images at once into image blocks. @mkevins out of curiosity, would it be difficult to make it possible to multi-select and delete images in the Media Library directly or would it be totally unrelated and more of a medium-to-large scale project type of thing?

On the other hand, users often get into trouble by deleting images from the media library not realizing they will break those images references if they are still in use on the site and that's worth considering for this case.

mkevins commented 3 years ago

Hi @designsimply :wave: :smile:

would it be difficult to make it possible to multi-select and delete images in the Media Library directly or would it be totally unrelated and more of a medium-to-large scale project type of thing?

That's a good question. I'm not sure off-hand if there are any immediate blockers for that, but I think it's definitely worth exploring. In fact, one thing I've had in mind since implementing gallery block for mobile is that we have a difference in how we treat a collection of images already present in a gallery.

On the web, when a new image is added, the previously selected images are displayed in the picker as being selected (with numbers indicating their ordering). On mobile, when we add new images, the picker does not have "knowledge" of what was previously added. This required a work-around in our shared implementation with web, since the colleciton returned by the picker completely replaces the original collection. We have to keep the original state, merge the newly picked images, and deduplicate them.

It would be nice (and probably even more compatible with web) if we passed the currently selected image ids to the picker so that the behavior is aligned. I haven't yet explored that, but the fact that a multiple selection is available in the picker activity suggests there is already some logic in place towards the goal of enabling multi-delete.

users often get into trouble by deleting images from the media library not realizing they will break those images references

This is a good point, and this risk could be "amplified" with multi-delete. My hunch is that this would need some guard or warning on the API side, since the mobile editor might not have all remote posts synced. I don't think there could ever be a way to totally avoid the risk, so maybe a warning (or one-time dismissable nag) could suffice?

designsimply commented 3 years ago

Excellent explanation, thank you! I agree a warning before allowing multiple image deletion is a really good idea.

Since we only have one user request on file for this, I'm going to keep it in the backlog for now. I want to say I appreciate making sure issues like this have helpful comments added when possible so that they are ready to go when we have time to come back around and work on them.

stale[bot] commented 2 years ago

This issue has been marked as stale because:

Please comment with an update if you believe this issue is still valid or if it can be closed. This issue will also be reviewed for validity and priority during regularly scheduled triage sessions.