Skip to content

Conversation

@planarvoid
Copy link
Contributor

Fix

The current solution is ignoring the other types of pasted objects than text - URL and Intent. In this solution I've created 3 independent interfaces for plugins to override this behaviour for all types of pasted items.

Test 1 - paste without selected text

  1. Run the app without changes
  2. Copy an URL from outside of the app
  3. Click into an empty line
  4. Long press + paste
  5. Notice the URL is pasted and is not clickable

Test 2 - paste over selected text

  1. Run the app without changes
  2. Copy an URL from outside of the app
  3. Long press on a word
  4. Paste
  5. Notice the URL has replaced the selected text and is not clickable

Test 3 - paste URL with plugin enabled

  1. In the MainActivity add .addPlugin(UrlPastePlugin()) to the Aztec object
  2. Run the app
  3. Copy an URL from outside of the app
  4. Click on an empty line
  5. Paste
  6. Notice the URL is pasted but it's a link redirecting to the URL

Test 3 - paste URL over selected text with plugin enabled

  1. In the MainActivity add .addPlugin(UrlPastePlugin()) to the Aztec object
  2. Run the app
  3. Copy an URL from outside of the app
  4. Long press on a word
  5. Paste
  6. Notice the selected word is now a link and it's a link redirecting to the URL

Review

@khaykov

Make sure strings will be translated:

  • If there are new strings that have to be translated, I have added them to the client's strings.xml as a part of the integration PR.

@planarvoid planarvoid added the bug label Nov 9, 2022
@planarvoid planarvoid requested a review from khaykov November 9, 2022 12:56
@planarvoid planarvoid self-assigned this Nov 9, 2022
@khaykov khaykov self-assigned this Nov 9, 2022
Copy link
Contributor

@khaykov khaykov 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 expected 👍

@planarvoid planarvoid merged commit 3762b38 into trunk Nov 10, 2022
@planarvoid planarvoid deleted the feature/improve-paste-behaviour branch November 10, 2022 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants