-
-
Notifications
You must be signed in to change notification settings - Fork 86
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: over keyboard view #589
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kirillzyusko
added
documentation
Improvements or additions to documentation
enhancement
New feature or request
e2e
Anything about E2E tests
tests
You added or changed unit tests
labels
Sep 20, 2024
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
📊 Package size report
|
This was referenced Sep 25, 2024
kirillzyusko
added a commit
that referenced
this pull request
Sep 29, 2024
## 📜 Description Fixed integration of `GestureDetector` inside `OverKeyboardView`. ## 💡 Motivation and Context The problem came to the fact that `TouchableWithoutFeedback` kind of intercepted touches and `GestureDetector` didn't receive it. I added `TouchableWithoutFeedback` in #589 - in that PR it was reasonable to keep it there as it prevented crashes when touch gets handled by `rootView`. However in most cases developers will wrap area in `OverKeyboardView` in `Touchable*` to handle closing of their views, so now for me it seems to be safe to remove it. The second thing is that if we apply styles to stretch inner view in JS then `GestureDetector` becomes broken again. I added this fix as iOS only and back to the time I haven't discovered any issues on Android. Now I see, that it introduces some edge-case bugs, so I apply this style/fix conditionally (iOS only). Applying these 2 fixes `GestureDetector` can work in `OverKeyboardView`. Fixes an issue discovered in #599 ## 📢 Changelog <!-- High level overview of important changes --> <!-- For example: fixed status bar manipulation; added new types declarations; --> <!-- If your changes don't affect one of platform/language below - then remove this platform/language --> ### JS - removed `TouchableWithoutFeedback`; - apply `width`/`height` style only for `ios`. ## 🤔 How Has This Been Tested? Tested manually on Pixel 3a (API 33, emulator) and Pixel 7 Pro (API 34, real device). ## 📸 Screenshots (if appropriate): |Before|After| |-------|-----| |<video src="https://github.com/user-attachments/assets/b26347e8-38ee-48b8-ba2c-2a5f4a354c70">|<video src="https://github.com/user-attachments/assets/5b54733b-9f2d-4c73-80ce-441c1f43c7a6">| ## 📝 Checklist - [x] CI successfully passed - [x] I added new mocks and corresponding unit-tests if library API was changed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
documentation
Improvements or additions to documentation
e2e
Anything about E2E tests
enhancement
New feature or request
OverKeyboardView
Anything related to OverKeyboardView
tests
You added or changed unit tests
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📜 Description
Added
OverKeyboardView
component.💡 Motivation and Context
From an implementation perspective I think it's worth to note that there are only one way to implement that:
WindowManager
withTYPE_APPLICATION_PANEL
;UIRemoteKeyboardWindow
(prior to iOS 16 it was possible to attach just as a last window, but starting from iOS 16 theUIRemoteKeyboardWindow
gets hidden in window list);So in this PR I used approaches from above to achieve this.
From an unusual things:
OverKeyboardView
inTouchableWithoutFeedback
.Closes #373
📢 Changelog
Docs
E2E
OverKeybaordView
;JS
OverKeyboardView
view;iOS
OverKeyboardView
component;UIWindow.topWindow
extension;Android
OverKeyboardView
component;getDisplaySize
extension;🤔 How Has This Been Tested?
Tested manually on:
📸 Screenshots (if appropriate):
📝 Checklist