Skip to content

Conversation

@mkevins
Copy link
Contributor

@mkevins mkevins commented Nov 27, 2019

This PR aims to consolidate various media selection handling by refactoring methods that utilize both singular and plural paradigms to only use plural methods where possible.

We should preserve the behavior that occurs when multiple images are selected via the media library intent (multiple selection is possible for the image block even though the allowMultipleSelection flag is false).

Related gutenberg-mobile PR: wordpress-mobile/gutenberg-mobile#1621

To test:


Image block:

When multiple items are selected via the media library in the image block, the additional items are appended to the editor as new image blocks.


Gallery block:

Related PR: #10703

Checkout related Gallery PR and build with source.

  • In a post, add a gallery block
  • Tap "ADD MEDIA"
  • Tap "WordPress Media Library"
  • Select multiple images

Expected behavior:

The selected images should be added to the gallery, and not added as new image blocks.


Update release notes:

  • I have considered adding unit tests where possible.

  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@peril-wordpress-mobile
Copy link

peril-wordpress-mobile bot commented Nov 27, 2019

You can test the changes on this Pull Request by downloading the APK here.

@peril-wordpress-mobile
Copy link

Warnings
⚠️ PR is not assigned to a milestone.

Generated by 🚫 dangerJS

@mkevins mkevins marked this pull request as ready for review November 27, 2019 12:33
@mkevins mkevins requested a review from dratwas November 27, 2019 12:46
Copy link
Contributor

@dratwas dratwas left a comment

Choose a reason for hiding this comment

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

LGTM 🎉

Copy link
Contributor

@malinajirka malinajirka left a comment

Choose a reason for hiding this comment

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

Thanks @mkevins! I've left two minor comments. However, I believe we should do a small clean up before we merge this PR - most importantly remove the appendMediaFile since it's not being used anymore. Wdyt?

Copy link
Contributor

@malinajirka malinajirka left a comment

Choose a reason for hiding this comment

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

Thanks for the changes!! ;) LGTM - I'm approving this PR and marking it as ready for merge. I'm not sure how the process works when the PR relies on changes from gutenberg-mobile repo so I'll leave the merge to you @mkevins . 🙇

@mkevins mkevins merged commit 8455cb1 into develop Dec 3, 2019
@oguzkocer oguzkocer deleted the fix/multiple-media-selection-handling branch April 15, 2020 12:30
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.

4 participants