-
-
Notifications
You must be signed in to change notification settings - Fork 514
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: Screen props: fullScreenSwipeEnabled
(1)
#1362
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some notes for reviewer
private fun logNotAvailable(propName: String) { | ||
Log.w("RN SCREENS", "$propName prop is not available on Android") | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be moved out from the class to some kind of utils. This time I followed example of ScreenStackHeaderConfigViewManager
typedef NS_ENUM(NSInteger, RNSScreenSwipeDirection) { | ||
RNSScreenSwipeDirectionHorizontal, | ||
RNSScreenSwipeDirectionVertical, | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved such enum types to the external header file in one of following PRs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job 🎉 I added some comments, please answer them.
|
||
- (void)didMoveToWindow | ||
{ | ||
if (self.window != nil && ![self isMountedUnderScreenOrReactRoot]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was added for proper gesture handling in modals and it would be good to check if it works correctly there after we merge modal stackPresentation
s. It will be good to test on example provided in #784
|
||
if (parent != nil) { | ||
RCTSurfaceTouchHandler *touchHandler = [parent performSelector:@selector(touchHandler)]; | ||
[touchHandler setEnabled:NO]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is calling those 2 methods the same as this:
react-native-screens/ios/RNSScreenStack.m
Line 600 in 8442950
[touchHandler cancel]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be. The thing is, that in new counterpart of RCTTouchHandler
-- RCTSurfaceTouchHandler
the cancel
method became private, but it has the same impl as before (old impl, new impl).
PS. Tested -- seems to work properly
Should I put a test screen for this in FabricTestExample or maybe the test exists somewhere already? 🤔
ae55c29
to
92c1eef
Compare
android/src/paper See: #1328
92c1eef
to
a8019a8
Compare
Description
Support screen props on Fabric
Part of stack PR:
fullScreenSwipeEnabled
(1) #1362screenOrientation
(3) #1364stackPresentation
&stackAnimation
(4) #1365Changes
Test code and steps to reproduce
Checklist