-
Notifications
You must be signed in to change notification settings - Fork 944
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
[NavigationDrawer] Allow users to scroll to dismiss on lower resolution devices. #8503
[NavigationDrawer] Allow users to scroll to dismiss on lower resolution devices. #8503
Conversation
bazel detected changes to the following targets:
|
bazel detected changes to the following targets:
|
Could you please provide some documentation around the addition to explain why we need this change and what it means |
@yarneo I've added documentation please let me know if further clarification is needed. |
Just want to clarify: Do you believe maybe that your added change is possibly the only needed conditional and |
@@ -641,7 +641,8 @@ - (void)updateViewWithContentOffset:(CGPoint)contentOffset { | |||
transitionRatio:transitionPercentage]; | |||
|
|||
[self updateDrawerState:transitionPercentage]; | |||
self.currentlyFullscreen = self.contentReachesFullscreen && headerTransitionToTop >= 1; | |||
self.currentlyFullscreen = | |||
self.contentReachesFullscreen && contentOffset.y > 0; |
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.
clang-format suggested the following change:
- self.currentlyFullscreen =
- self.contentReachesFullscreen && contentOffset.y > 0;
+ self.currentlyFullscreen = self.contentReachesFullscreen && contentOffset.y > 0;
@yarneo |
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.
Thanks. please make sure we haven't regressed with high res devices with this fix. good work
@yarneo I tested on high res devices and it looks good to me. |
In #8503 this line was removed but after further testing when the contentViewController expands it's preferredContentSize this causes a regression in the header behavior. With this line added back into the check this behavior is fixed.
…on devices. (material-components#8503) This change allows `currentlyFullscreen` property on [`MDCBottomDrawerContainerViewController`](https://github.com/material-components/material-components-ios/blob/develop/components/NavigationDrawer/src/private/MDCBottomDrawerContainerViewController.m) to become `NO` on lower resolution devices. Currently this property is always `NO`. This doesn't allow the code within `- (void)scrollViewWillEndDragging:withVelocity:targetContentOffset:` to be executed. ## Testing 1. Set `preferredContentSize` on the headerVC of a Navigation Drawer example to 80. 2. Set `preferredContentSize` on the contentVC of the same Navigation Drawer example to a value less than 240. 3. Open the example on a iPhoneSE 4. Rotate to landscape. 5. Try to swipe to dismiss the drawer. Closes #8454
…omponents#8514) In material-components#8503 this line was removed but after further testing when the contentViewController expands it's preferredContentSize this causes a regression in the header behavior. With this line added back into the check this behavior is fixed.
This change allows
currentlyFullscreen
property onMDCBottomDrawerContainerViewController
to becomeNO
on lower resolution devices. Currently this property is alwaysNO
. This doesn't allow the code within- (void)scrollViewWillEndDragging:withVelocity:targetContentOffset:
to be executed.Testing
preferredContentSize
on the headerVC of a Navigation Drawer example to 80.preferredContentSize
on the contentVC of the same Navigation Drawer example to a value less than 240.Closes #8454