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

RNmobile: Trigger media library picker #11511

Merged
merged 4 commits into from Nov 6, 2018

Conversation

hypest
Copy link
Contributor

@hypest hypest commented Nov 5, 2018

Description

Wires up the "Media Library" button on the Image placeholder block and triggers the media picker of the parent native app over the Native<->RN bridge. It provides a callback to be called by the Native side to send the selected image URL back into RN.

How has this been tested?

Using this native mobile side PR: wordpress-mobile/gutenberg-mobile#220

Types of changes

Adds a call to a Native<->Bridge function.

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.

@hypest hypest added the Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) label Nov 5, 2018
@hypest hypest requested a review from pinarol November 5, 2018 21:10
… value

The caption field is optional so it is valid to have it undefined due to GB web.
Copy link
Contributor

@pinarol pinarol left a comment

Choose a reason for hiding this comment

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

Tested via WordPress-Android app

  • Open a post
  • Create image block
  • Tap "Media Library"
  • Pick an image from WP media library
  • Verify that image block is updated with the selected image
  • Set a caption for the image
  • Repeat these steps multiple times to see if multiple image blocks can be added&updated

@hypest
Copy link
Contributor Author

hypest commented Nov 6, 2018

Thanks for adding a fix commit @pinarol !

@hypest hypest merged commit 3511dd8 into master Nov 6, 2018
@hypest hypest deleted the rnmobile/trigger-media-library-picker branch November 6, 2018 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants