Fix: Stop Filter/Sort sheet jitter on Android 12+#362
Merged
Conversation
The Column inside the apps and permissions filter/sort ModalBottomSheet used verticalScroll without overrides. On API 31+ the default stretch overscroll feeds nested-scroll deltas that race with ModalBottomSheet's own drag-to-dismiss connection, producing visible jitter at the top boundary of the sheet content. Pass overscrollEffect = null on both verticalScroll calls so the inner content no longer dispatches overscroll deltas. Sheet drag-to-dismiss still works via the existing nested-scroll handoff. Trade-off: pre-API-31 edge glow is also removed inside these sheets — acceptable given the small content.
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.
What changed
The Filter and Sort sheet (opened from the filter icon on the Apps and Permissions tabs) no longer jitters or bounces when scrolled at its top boundary on Android 12 and newer.
Technical Context
Column + verticalScrollinside bothModalBottomSheets used the default overscroll. On API 31+ that is the stretch effect, which dispatches scroll deltas throughNestedScrollConnection.ModalBottomSheetalso listens on that connection for its drag-to-dismiss handoff — the two race and produce the visible jitter.overscrollEffect = nullon the innerverticalScrollso it no longer dispatches overscroll deltas. Sheet drag-to-dismiss still works via the same nested-scroll handoff.ModalBottomSheets in the app (WatcherFilterBottomSheet, the support debug-log sheet) were checked; they don't useverticalScrolland are unaffected.