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

Use URL in clipboard, if available, to create a new link #18279

Merged
merged 4 commits into from
Nov 5, 2019

Conversation

SergioEstevao
Copy link
Contributor

@SergioEstevao SergioEstevao commented Nov 4, 2019

Description

Related to: wordpress-mobile/gutenberg-mobile#680

This PR changes the link code in React Native to check if the clipboard has an URL and use it if editing a new link on the content.

How has this been tested?

This can be tested using this GB-mobile PR: wordpress-mobile/gutenberg-mobile#1537

Screenshots

Types of changes

New feature

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.

@SergioEstevao SergioEstevao 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 4, 2019
@SergioEstevao SergioEstevao added this to the Gutenberg 6.9 milestone Nov 4, 2019
@SergioEstevao SergioEstevao requested a review from koke November 4, 2019 21:45
@SergioEstevao SergioEstevao changed the title Get urls from clipboard if available Use URL in clipboard, if available, to create a new link Nov 4, 2019
Copy link
Contributor

@hypest hypest left a comment

Choose a reason for hiding this comment

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

Only left one comment/suggestion to fix the build, but otherwise this looks good to me!

@SergioEstevao
Copy link
Contributor Author

@hypest I have updated the code, can you give it a look and approve if all is ok?

Copy link
Contributor

@koke koke left a comment

Choose a reason for hiding this comment

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

I think the code looks good, I'll test later today

packages/format-library/src/link/index.native.js Outdated Show resolved Hide resolved
packages/format-library/src/link/index.native.js Outdated Show resolved Hide resolved
Copy link
Contributor Author

@SergioEstevao SergioEstevao left a comment

Choose a reason for hiding this comment

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

Test

Copy link
Contributor

@koke koke left a comment

Choose a reason for hiding this comment

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

Tested and it works nicely 👌

@SergioEstevao SergioEstevao merged commit c3af33c into master Nov 5, 2019
@SergioEstevao SergioEstevao deleted the rnmobile/680_link_prefill_url_from_clipboard branch November 5, 2019 16:17
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.

3 participants