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

feat: getImage iOS #253

Merged
merged 4 commits into from
Nov 1, 2024
Merged

Conversation

s77rt
Copy link
Contributor

@s77rt s77rt commented Jul 22, 2024

Overview

Added getImage support for iOS.

Test Plan

  1. Copy JPEG image
  2. Paste the image and verify it's pasted as jpeg
  3. Copy PNG image
  4. Paste the image and verify it's pasted as png
  5. Copy GIF image
  6. Paste the image and verify it's pasted as gif
Screen.Recording.2024-07-22.at.12.35.07.PM-1.mov
Screen.Recording.2024-07-23.at.7.36.54.PM-1.mov

@s77rt
Copy link
Contributor Author

s77rt commented Jul 22, 2024

In our use case, we need to use getImage because using getImagePNG for JPEG is slower

Copying as JPEG Copying as PNG
Screen.Recording.2024-07-22.at.9.42.07.AM.mov
Screen.Recording.2024-07-22.at.9.42.49.AM.mov

@s77rt s77rt marked this pull request as draft July 23, 2024 17:36
@s77rt
Copy link
Contributor Author

s77rt commented Jul 23, 2024

Putting this on draft while I add support for more image types including GIF

@s77rt s77rt marked this pull request as ready for review July 23, 2024 19:29
@s77rt
Copy link
Contributor Author

s77rt commented Jul 23, 2024

Ready for review

@durdevic
Copy link

Amazing! How did you enable text input to capture the Paste event?

@s77rt
Copy link
Contributor Author

s77rt commented Oct 30, 2024

@durdevic There is a proposal on adding onPaste to TextInput but not approved yet. However you can patch RN and apply changes from facebook/react-native#45425

@s77rt
Copy link
Contributor Author

s77rt commented Oct 30, 2024

@Naturalclar Would you be able to review this one?

Copy link

@durdevic durdevic left a comment

Choose a reason for hiding this comment

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

Seems to be good 👍

@durdevic
Copy link

Perfect, thanks for that one! @s77rt

Let's hope both got merged in the next release 🤞

Copy link
Member

@Naturalclar Naturalclar left a comment

Choose a reason for hiding this comment

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

thank you so much! lgtm

@Naturalclar Naturalclar merged commit 9e152fe into react-native-clipboard:master Nov 1, 2024
@usedlife usedlife mentioned this pull request Nov 21, 2024
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.

4 participants