-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add KeyboardAvoidingView #5038
Add KeyboardAvoidingView #5038
Conversation
Hey guys, can someone please review this? Thanks!! ❤️ |
Co-authored-by: Mikołaj Szydłowski <9szydlowski9@gmail.com>
Hello @tomekzaw @szydlovsky @Latropos, I hope this message finds you well. I wanted to reach out to discuss the implementation of I'm certainly not against the idea of integrating this component into the core of the REA package, but I think it has some drawbacks, such as:
What do you think guys about it? |
This fixes this issue #4815 Screen.Recording.2023-11-09.at.10.56.37.mov |
Is the existing implementation not responsive to changes in the parent view's layout? It seems that way, as it only measures the layout during the initial handling of the onLayout callback. Please correct me if I'm mistaken. I've independently implemented this alternative KeyboardAvoidingView. In my implementation, I utilized |
I think we need props to configure I initially believed that |
…#5308) Requires #5320. I induced a regression accidentally in #5031 regarding FlatList. This PR: - fixes this regression, - improves the type structure of other components, - adds a new test suite to detect such mistakes in the future. It also automatically fixes failing future RN version typecheck CI. All the new & old tests should work.
@bglgwyng Hi! Why dod you say that "the usage of KeyboardAvoidingView unset the status bar translucency"? I've just tested it and was unable to reproduce. |
5eb9526
to
79fac63
Compare
@Latropos Sorry for the late reply. I'll share the example code soon! |
We have two similar implementations of KeyboardAvoidingView - here and here. Both approaches require further work to be completed. Currently, KeyboardAvoidingView is not our top priority, so let's postpone these changes for a more opportune moment. I propose continuing the work on @terrysahaidak's original PR to give credit for the idea. If someone decides to further develop this feature, they can simply combine changes from both PRs to the original one. |
Summary
In this PR we are going to keep fixing bugs with our custom KeyboardAvoidingView.
The base of this PR was done by @terrysahaidak (Thank you ❤️)
Test plan
Screen.Recording.2023-09-05.at.12.32.02.mov
Screen.Recording.2023-09-05.at.12.29.20.mov
Screen.Recording.2023-09-05.at.12.29.31.mov
Screen.Recording.2023-09-05.at.12.29.41.mov
Screen.Recording.2023-09-05.at.13.48.01.mov
Screen.Recording.2023-09-05.at.13.48.13.mov
Screen.Recording.2023-09-05.at.13.55.13.mov
Screen.Recording.2023-09-05.at.13.55.22.mov
Testing with SafeAreaView and no navigation stack
Testing code
Replace the code in
/Example/App.tsx
with the following: