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

Feature/wpmedia multiselect #5721

Merged
merged 7 commits into from
Apr 24, 2017
Merged

Feature/wpmedia multiselect #5721

merged 7 commits into from
Apr 24, 2017

Conversation

nbradbury
Copy link
Contributor

This PR addresses this comment on #5644.

Adds multi-select to the picker used when selecting a photo from the WP media library. As with other pickers, a single tap selects a single photo and long press enables multi-select so multiple photos can be selected. When multiple items are selected, they're inserted as a [gallery].

cc: @aforcier

} else {
mGridAdapter.setAllowMultiselect(true);
mGridAdapter.setInMultiSelect(true);
mGridAdapter.setSelectedItems(selectedItems);
if (selectedItems != null && selectedItems.size() > 0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small nit: we shouldn't need the null check here, as we set up selectedItems as an empty list above and haven't done anything that could null it (this generates a lint warning).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch - fixed in 903215e

@aforcier
Copy link
Contributor

I found an issue with the WP media library screen that predates this PR - it can be addressed in a separate PR, but we should address it before turning this on for all editors:

  1. Launch the new picker
  2. Select the W to open the WP media library
  3. Rotate the device
  4. Picker exits and returns to editor, and "An error occurred when accessing this blog" toast is displayed

@aforcier
Copy link
Contributor

aforcier commented Apr 24, 2017

Looks great aside from my nit and pre-existing issue comments 👍 (tested by enabling the picker for all editors and using the visual editor).

It would be nice to make it more obvious how to add a gallery, but as we've discussed we can worry about that when we re-work gallery handling in general.

@nbradbury
Copy link
Contributor Author

I found an issue with the WP media library screen that predates this PR - it can be addressed in a separate PR

Wow, surprised I didn't see this before, especially since it's been around for a while. I would like to make that a separate PR.

@aforcier
Copy link
Contributor

Had an issue ready to go for the rotation bug, opened it: #5731

@aforcier
Copy link
Contributor

:shipit:!

@aforcier aforcier merged commit f2fead7 into develop Apr 24, 2017
@aforcier aforcier deleted the feature/wpmedia-multiselect branch April 24, 2017 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants