-
Notifications
You must be signed in to change notification settings - Fork 58
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
Simplify bridge requestMediaPick methods #1547
Simplify bridge requestMediaPick methods #1547
Conversation
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.
Love this change!
Update gutenberg ref.
587a51b
to
af001b9
Compare
…-media-pick-methods-from-bridge
…extra-media-pick-methods-from-bridge
export const mediaSources = { | ||
deviceLibrary: 'DEVICE_MEDIA_LIBRARY', | ||
deviceCamera: 'DEVICE_CAMERA', | ||
siteMediaLibrary: 'SITE_MEDIA_LIBRARY', | ||
}; |
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.
@SergioEstevao - I decided to declare the media source constants bundled in an object.
Anyway, at some point we will probably move all this to the parent apps.
@etoledom tested it again in iOS and Android all looks good! |
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.
Tested all scenarios on Android device, nice work!
LGTM!
This PR simplifies and merges all
requestMediaPick...
methods into onerequestMediaPick
, including the newrequestOtherMediaPickFrom
method.This allow us to handle media pick request from any source in the same way, and giving the same parameters.
Passing the filter parameter to
requestOtherMediaPickFrom
was needed for wordpress-mobile/WordPress-iOS#12883 to work properly, so I decided to do this extra enhancement.This will probably break the WPAndroid integration of
Free Photo Library
. (cc @marecar3 )This is also a good step forward to move all media source definitions to the client side.
gutenberg
side PR: WordPress/gutenberg#18303WPiOS
PR: wordpress-mobile/WordPress-iOS#12883cc @pinarol
To test:
WPiOS
PR.Update release notes:
RELEASE-NOTES.txt
.