Skip to content

RNMobile: Image Block vol 02#9888

Merged
etoledom merged 8 commits intomasterfrom
rnmobile/image-block-vol-02
Sep 14, 2018
Merged

RNMobile: Image Block vol 02#9888
etoledom merged 8 commits intomasterfrom
rnmobile/image-block-vol-02

Conversation

@etoledom
Copy link
Copy Markdown
Contributor

Description

This PR adds the ability to recognize an empty image block and one with content, showing the appropriate UI in each case.

This was implemented following the web version as an example, trying to recreate the same structure on mobile.

The UI is temporary and most of the code will probably change in the near future.

For now, the image is being downloaded directly by the <Image> component, but in the future, it might be better to let the main app to handle both downloads and uploads.

Screenshots

image_block_with_image

For testing, please refer to the Gutenberg Mobile PR

cc @hypest

@etoledom etoledom 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 Sep 13, 2018
@etoledom etoledom self-assigned this Sep 13, 2018
@etoledom etoledom requested a review from mzorz September 13, 2018 23:44
Copy link
Copy Markdown
Contributor

@mzorz mzorz left a comment

Choose a reason for hiding this comment

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

Works as advertised, nice work @etoledom! I left a minor comment but otherwise approving this work

const { url } = attributes;

const onUploadPress = () => {
};
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Minor nit: I'd add some console.log() here to indicate this has been pressed, and also we could use a TODO comment in code in the function body to mark this as something we need to implement

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

eslint seems to not like console.logs:
error Unexpected console statement no-console
But I'll add the TODO comment for future references.

Thank you!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Oh! 😅 makes sense 👍 thank you!

@etoledom etoledom merged commit b29e6b2 into master Sep 14, 2018
@etoledom etoledom deleted the rnmobile/image-block-vol-02 branch September 14, 2018 14:09
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.

2 participants