bottom sheet refactor - #569
Open
Kimblebee wants to merge 4 commits into
Open
Conversation
# Conflicts: # app/src/androidTest/java/com/google/jetpackcamera/utils/ComposeTestRuleExt.kt
- Remove isQuickSettingsOpen and quickSettingsIsOpen from TrackedCaptureUiState, QuickSettingsUiState, and UI state adapters. - Remove toggleQuickSettings() from QuickSettingsController and its implementations. - Manage quick settings drawer visibility as local UI state in PreviewScreen via rememberSaveable. - Clean up unused quickSettingsIsOpen and toggleQuickSettings tests.
…osable - Make QuickSettingsContent internal and container-independent with modifier and showMoreSettingsButton parameters. - Flatten internal layout structure by removing intermediate QuickSettingsLayout helper. - Add additional top padding above the 'More settings' navigation button.
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
Kimblebee
changed the base branch from
main
to
kim/refactor/quickSettings/button-rows
August 27, 2026 22:12
Kimblebee
force-pushed
the
kim/refactor/quickSettings/bottomSheet-refactor
branch
from
August 27, 2026 22:39
6b1fec0 to
a4bf36f
Compare
Integrate Material 3 BottomSheetScaffold into CaptureLayout to render Quick Settings in-hierarchy and avoid window-spawning modal overlays. Make the drag handle pill clickable for dismiss, and update test helpers to close the sheet deterministically.
Kimblebee
force-pushed
the
kim/refactor/quickSettings/bottomSheet-refactor
branch
from
August 27, 2026 22:58
a4bf36f to
8544a5b
Compare
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
Refactors Quick Settings to use Material 3's in-hierarchy
BottomSheetScaffoldinstead ofModalBottomSheet.Why the Transition from
ModalBottomSheettoBottomSheetScaffold?BottomSheetScaffoldrenders the sheet within the primary Compose layout tree, maintaining a single window lifecycle and preserving seamless viewfinder rendering.Key Changes
ScaffoldwithBottomSheetScaffoldinCaptureLayout.kt(sheetPeekHeight = 0.dp), unifyingSnackbarHostand removing nested sheet wrappers.BottomSheetDefaults.DragHandlewithonDismissQuickSettingsclick action andQUICK_SETTINGS_DRAG_HANDLEtest tag.isQuickSettingsOpeninPreviewScreen.ktwithLaunchedEffectsync andBackHandler(enabled = isQuickSettingsOpen).closeQuickSettings()and updatedvisitQuickSettingsinComposeTestRuleExt.ktto click the drag handle pill, eliminating flaky synthetic gesture timeouts.Lifecycle Behavior & Trade-offs
ModalBottomSheet(which dynamically mounts/unmounts from composition upon opening/closing),BottomSheetScaffoldis a persistent layout container. When hidden (sheetPeekHeight = 0.dp), the sheet container remains in the composition tree and is translated off-screen rather than decomposed. Automated tests therefore check visibility (.isNotDisplayed()) rather than complete semantics node absence.onDismissRequestmodal API for bidirectionalLaunchedEffectsynchronization between the boolean UI state (isQuickSettingsOpen) andSheetState..clickablemodifier was explicitly attached to provide a deterministic tap-to-dismiss target for accessibility and test automation.