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

Add toolbar to image block #11660

Merged
merged 3 commits into from Nov 12, 2018

Conversation

Projects
None yet
2 participants
@pinarol
Contributor

pinarol commented Nov 9, 2018

Description

This PR includes changes for adding toolbar to image block and also adding edit button in it.

How has this been tested?

  • Refer to parent PR to find out how to setup the testing environment.

Test 1:

  • Open a blog post
  • Add image block, tap Media Library, select an image
  • Add another image block but don't set an image for it
  • Tap on the image block with an image set, verify that toolbar is visible
  • Tap on the image block with no image is set, verify that toolbar isn't visible

Test 2:

  • Open a blog post
  • Add image block, tap Media Library, select an image
  • See that toolbar appears with an edit button in it(pencil icon)
  • Tap edit button in the toolbar
  • Verify that image picker is opened, select an image
  • Verify that image is changed in the image block

Test 3:

  • Open a blog post
  • Add image block, tap Media Library, select an image
  • See that toolbar appears with an edit button in it(pencil icon)
  • Tap edit button in the toolbar
  • Verify that image picker is opened, tap "Cancel"
  • Verify that image is NOT changed in the image block

Screenshots

screen shot 2018-11-09 at 13 49 07

Types of changes

Checklist:

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

This comment has been minimized.

Contributor

pinarol commented Nov 12, 2018

Rafactored due to edit.js, ready to review again @etoledom @hypest

@hypest

hypest approved these changes Nov 12, 2018

LGTM!

@pinarol pinarol merged commit 42d1fe5 into master Nov 12, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@pinarol pinarol deleted the rnmobile/image-block-toolbar branch Nov 13, 2018

grey-rsi pushed a commit to OnTheGoSystems/gutenberg that referenced this pull request Nov 22, 2018

Add toolbar to image block (WordPress#11660)
* Add toolbar to image block

* Refactor edit.native.js to make it similar to web

* Raplace BlockFormatControls usage with BlockControls
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment