-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Use plural method for multiple media selection handling #10857
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
Conversation
|
You can test the changes on this Pull Request by downloading the APK here. |
Generated by 🚫 dangerJS |
dratwas
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🎉
malinajirka
left a comment
There was a problem hiding this 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?
...ditor/WordPressEditor/src/main/java/org/wordpress/android/editor/EditorFragmentAbstract.java
Outdated
Show resolved
Hide resolved
WordPress/src/main/java/org/wordpress/android/ui/posts/EditPostActivity.java
Show resolved
Hide resolved
malinajirka
left a comment
There was a problem hiding this 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 . 🙇
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
allowMultipleSelectionflag 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.
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.txtif necessary.