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

Mobile: Upgrade js-draw to 1.26.0 #11589

Merged

Conversation

personalizedrefrigerator
Copy link
Collaborator

@personalizedrefrigerator personalizedrefrigerator commented Jan 6, 2025

Summary

This pull request updates the version of js-draw used in the mobile app.

Notable changes:

  • Added a "selection options" menu:
    • screenshot: Text selected, selection menu includes copy to clipboard and paste
    • This allows users to copy/paste without needing to attach a keyboard.
  • Improved text editing: Prevent long text from going off the edge of the screen in editing mode.

Note

It doesn't seem possible to read clipboard data using the clipboard browser API in an Android WebView (see the Android browser section of this compatibility table). As such, clipboard access is currently implemented with @react-native-clipboard/clipboard.

At present, pasting non-SVG images isn't supported. When this is implemented with @react-native-clipboard/clipboard's getImage, getImage doesn't seem to resolve or reject.

Testing plan

Android:

  1. Open the image editor
  2. Draw something
  3. Select it
  4. Long-press on the selection
  5. Verify that the selection menu is visible
  6. Click "Copy to clipboard"
  7. Close the editor (don't save changes)
  8. Open the image editor
  9. Switch to the select tool
  10. Long-press
  11. Click "paste"
  12. Verify that the previously copied content has been pasted
  13. Take a screenshot
  14. Attempt to paste the screenshot
    • Note: At present, the screenshot won't paste. See the implementation note above.

@laurent22 laurent22 merged commit 6220267 into laurent22:dev Jan 6, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants