Skip to content

Dismiss bottom sheets only from their drag handle - #21

Merged
Tricked-dev merged 2 commits into
Tricked-dev:masterfrom
AKolenda:fix/tracking-sheet-swipe-handle-only
Oct 3, 2026
Merged

Tricked-dev merged 2 commits into
Tricked-dev:masterfrom
AKolenda:fix/tracking-sheet-swipe-handle-only

Conversation

@AKolenda

@AKolenda AKolenda commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Follow-up to #20.

Problem

In v0.3.1, swiping down anywhere inside a bottom sheet still closes it. #20 fixed EditTimeEntryDialog, but only Calendar and Inbox use that. Every other sheet still closes from a downward swipe in the middle of its content, including the Tracking screen's own TimeEntryFormSheet.

Fix

Every ModalBottomSheet in the app now closes only when dragged by its handle, like an iOS sheet. Swipes inside the content only scroll it. Each sheet's scrolling content gets the ConsumeVerticalOverscroll connection from #20:

  • TimeEntryFormSheet, the Tracking edit/add sheet (TrackingScreen.kt)
  • AppSheet, which covers history filters, calendar sheets, inbox settings, statistics filters and the timer bar sheet
  • the server configuration sheet (ConfigScreen.kt)
  • TemplateEditorSheet
  • StatDrillDownSheet (a LazyColumn)

Tests

  • Each sheet above has a new test that swipes down inside its content and asserts the sheet stays open. Every new test fails without the fix and passes with it.
  • spotlessCheck, lintDebug, assembleDebug and assembleDebugAndroidTest pass locally.
  • In full testDebugUnitTest runs, a few tracking tests (TrackingViewModelNetworkRaceTest, TrackingViewModelRunningEntryTest, TrackingScreenJumpTest) failed intermittently. They pass when rerun alone, and TrackingScreenJumpTest passed 3/3 both on this branch and on master. None of them open a sheet.

Tricked-dev#20 fixed EditTimeEntryDialog, used by Calendar and Inbox, but the
Tracking screen edits entries in its own TimeEntryFormSheet, which still
let downward swipes inside the form dismiss the sheet. Apply the same
ConsumeVerticalOverscroll connection there and cover it with a test.
Apply ConsumeVerticalOverscroll to the shared AppSheet and to the
server, template editor and statistics drill-down sheets, so a downward
swipe inside any sheet's content only scrolls it. Each sheet gets a test
that fails without the change.
@AKolenda AKolenda changed the title Dismiss tracking edit sheet only from its drag handle Dismiss bottom sheets only from their drag handle Oct 3, 2026
@Tricked-dev
Tricked-dev merged commit f62e1eb into Tricked-dev:master Oct 3, 2026
0 of 3 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.

2 participants