Skip to content

fix: synchronize bottom padding with keyboard frame in KeyboardAwareScrollView #332

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

Merged
merged 1 commit into from
Jan 13, 2024

Conversation

kirillzyusko
Copy link
Owner

@kirillzyusko kirillzyusko commented Jan 12, 2024

📜 Description

Synchronized bottom padding with keyboard frame in KeyboardAwareScrollView.

💡 Motivation and Context

Original regression was introduced in #257 (these code lines). I decided not animated bottom padding to potentially fix the issue described in #255 (comment)

However such approach is causing unsynchronized animations in certain conditions and I'm not sure, that it actually fixes the problem described in comment above.

So in this PR I'm reworking it again and bringing back animated transitions 👀

Closes #329

📢 Changelog

JS

  • added currentKeyboardFrameHeight variable;
  • update currentKeyboardFrameHeight variable in onMove handler;
  • use currentKeyboardFrameHeight for bottom padding in KASV.

🤔 How Has This Been Tested?

Tested manually on iPhone 15 Pro + e2e tests.

📸 Screenshots (if appropriate):

Before After
Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-01-12.at.22.57.58.mp4
Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-01-13.at.11.15.01.mp4

📝 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 📚 components Anything related to the exported components of this library labels Jan 12, 2024
@kirillzyusko kirillzyusko self-assigned this Jan 12, 2024
@kirillzyusko kirillzyusko changed the title fix: synchronize bottom padding with keyboard frame in `KeyboardAware… fix: synchronize bottom padding with keyboard frame in KeyboardAwareScrollView Jan 12, 2024
Copy link
Contributor

📊 Package size report

Current size Target Size Difference
112819 bytes 112661 bytes 158 bytes 📈

@kirillzyusko kirillzyusko marked this pull request as ready for review January 13, 2024 10:24
@kirillzyusko kirillzyusko merged commit 391e293 into main Jan 13, 2024
@kirillzyusko kirillzyusko deleted the fix/329-scroll-vew-delayed-bottom-space branch January 13, 2024 10:24
@kirillzyusko kirillzyusko added the KeyboardAwareScrollView 📜 Anything related to KeyboardAwareScrollView component label May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working 📚 components Anything related to the exported components of this library KeyboardAwareScrollView 📜 Anything related to KeyboardAwareScrollView component
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[KASV] white space in the end of ScrollView on keyboard hide
1 participant