kirillzyusko / react-native-keyboard-controller

Keyboard manager which works in identical way on both iOS and Android
https://kirillzyusko.github.io/react-native-keyboard-controller/
MIT License
1.62k stars 67 forks source link

fix: snap points scroll calculations #464

Closed kirillzyusko closed 3 months ago

kirillzyusko commented 3 months ago

📜 Description

Fixed corner cases for scrollOutput function, added tests, updated docs and example apps.

💡 Motivation and Context

This is a slight revision of https://github.com/kirillzyusko/react-native-keyboard-controller/pull/452

In this PR I fixed some bugs, unified some functions, updated docs, etc.

📢 Changelog

JS

Docs

🤔 How Has This Been Tested?

Tested locally on iPhone 15 Pro.

Tested on CI.

📝 Checklist

github-actions[bot] commented 3 months ago

📊 Package size report

Current size Target Size Difference
138151 bytes 137329 bytes 822 bytes 📈
github-actions[bot] commented 3 months ago

PR Preview Action v1.4.7 :---: :rocket: Deployed preview to https://kirillzyusko.github.io/react-native-keyboard-controller/pr-preview/pr-464/ on branch gh-pages at 2024-06-06 15:57 UTC

argos-ci[bot] commented 3 months ago

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) 👍 Changes approved 1 changed Jun 6, 2024, 3:58 PM
kirillzyusko commented 3 months ago

+1kb is also a lot for this PR - need to figure out if uni tests gets included in final bundle 👀

kirillzyusko commented 3 months ago

@kgni I slightly revised the implementation - would you mind to re-check that everything works well in your project? 👀

If yes, then I'll merge it and publish a new version soon 🙌

kgni commented 3 months ago

@kirillzyusko seems to be some small issues with the scrolling being stuck now. This was not happening before. Also it feels like performance decreased on the UI thread, I was getting 60 frames before, but this might not be related.

video: https://share.cleanshot.com/tQWgl0KS.

I need to dive deeper into it, will test more tomorrow and get back

kgni commented 3 months ago

@kirillzyusko I dove deeper into my implementation, and removed some workers in my layout component, just to have only the KeyboardAwareScroll doing its thing. No bugs, and also performant. I think you can merge.

https://github.com/kirillzyusko/react-native-keyboard-controller/assets/84397151/019b2909-2b50-498c-b48f-0abdb1262f56