Skip to content

fix(mobile): keep the settings pull-down in the body, not the sheet - #3324

Merged
wgqqqqq merged 1 commit into
GCWing:mainfrom
wgqqqqq:wgq/mobile-settings-sheet-drag
Oct 10, 2026
Merged

wgqqqqq merged 1 commit into
GCWing:mainfrom
wgqqqqq:wgq/mobile-settings-sheet-drag

Conversation

@wgqqqqq

@wgqqqqq wgqqqqq commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • AdaptiveModalSurface gains draggable (default true, so every other sheet keeps its current behaviour) and forwards it to Material's sheetGesturesEnabled.
  • The mobile settings page opts out. Its body is one long verticalScroll, so a pull-down has to scroll the body rather than drag the page away.
  • Update the MobileScreenTest comment 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:

build sheet top edge per frame moved dismissed
before 140 x9, then 145 -> 187 -> 219 -> 262 -> 305, then gone 305 px yes
after 140 x37 0 px no

The alternative exits still work on device: the close button, the back action, and a tap on the scrim all close the page.

:app:compileDebugKotlin
:app:compileDebugAndroidTestKotlin
:app:testDebugUnitTest

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.

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.
@wgqqqqq
wgqqqqq merged commit 2af689a into GCWing:main Oct 10, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant