Repository navigation
fix(mobile): keep the settings pull-down in the body, not the sheet - #3324
Merged
Merged
Conversation
The settings page is a modal sheet whose body is one long verticalScroll. The sheet also followed a pull-down, so a single gesture meant both "scroll the body" and "drag the page away": on the emulator the same pull-down moves the sheet 305 px and dismisses the page instead of scrolling the list. AdaptiveModalSurface now takes `draggable` (default true, so every other sheet keeps its current behaviour) and forwards it to Material's `sheetGesturesEnabled`. Settings opts out; its close button, the back action, and a tap on the scrim still close the page.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
AdaptiveModalSurfacegainsdraggable(defaulttrue, so every other sheet keeps its current behaviour) and forwards it to Material'ssheetGesturesEnabled.verticalScroll, so a pull-down has to scroll the body rather than drag the page away.MobileScreenTestcomment that described the old gesture.Validation
Measured on the emulator (
emulator-5554, 1080x2400 @420dpi, Android 17), release APK installed in place over the previous build so the signed-in state was identical. Settings sheet, list at the top, one identical pull-down gesture per build, captured per frame:140x9, then145 -> 187 -> 219 -> 262 -> 305, then gone140x37The alternative exits still work on device: the close button, the back action, and a tap on the scrim all close the page.
Not covered
The report was a shake while pulling the settings page down on a real device. I could not reproduce that shake on the emulator with synthetic input (
adb shell input swipe, 2.5 s and 6 s pull-downs) — on the unmodified build the nested scroll already won that gesture there, so the shake likely depends on real touch-event timing.This change removes the sheet from the pull-down gesture entirely, which is the conflict the report points at (305 px -> 0 px above), but whether it removes the shake on the reporting device is not verified.