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

fix: use dp for selection events #436

Merged
merged 1 commit into from
May 10, 2024
Merged

Conversation

kirillzyusko
Copy link
Owner

@kirillzyusko kirillzyusko commented May 10, 2024

📜 Description

Use dp for selection events.

💡 Motivation and Context

If we pass values directly, then we will have incorrect positioning, because we are passing px while RN relies on dp. So in this PR we are converting all selection coordinates in dp and only then pass them.

📢 Changelog

Android

  • convert all selection coordinates to dp;

🤔 How Has This Been Tested?

Tested manually on Pixel 3a (API 33, emulator).

📸 Screenshots (if appropriate):

Before After
image image

Pay an attention to x coordinates 👀

📝 Checklist

  • CI successfully passed
  • I added new mocks and corresponding unit-tests if library API was changed

@kirillzyusko kirillzyusko added 🐛 bug Something isn't working 🤖 android Android specific focused input 📝 Anything about focused input functionality labels May 10, 2024
@kirillzyusko kirillzyusko self-assigned this May 10, 2024
Copy link
Contributor

📊 Package size report

Current size Target Size Difference
136026 bytes 136031 bytes -5 bytes 📉

@kirillzyusko kirillzyusko merged commit f2ea4fe into main May 10, 2024
14 checks passed
@kirillzyusko kirillzyusko deleted the fix/selection-px-to-dp branch May 10, 2024 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖 android Android specific 🐛 bug Something isn't working focused input 📝 Anything about focused input functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant