Refactor Quick Settings UI - #530
Open
Kimblebee wants to merge 80 commits into
Open
Conversation
- remove flip camera, stream config, and concurrent camera from quick settings - all quick settings menu items adopt the button row ux - WIP unique selection of settings depending on current capture mode
auxiliary function for settings subtitles
… state - Re-added the 'More Settings' button to the Quick Settings bottom sheet. - Introduced a 'showMoreSettingsButton' boolean parameter to control its visibility, defaulting to true. - Removed unused 'focusedQuickSetting' state from 'QuickSettingsUiState' and 'TrackedCaptureUiState'. - Cleaned up 'FlashModeUiStateAdapter.kt' by removing a debug 'println' and adding a 'todo(kc)' for 'visibleFlashModes'.
Remove unused drawables and their corresponding enum classes in
QuickSettingsEnums that are no longer referenced after the quick
settings refactoring.
- Decoupled dynamic range (video HDR) from image format (image HDR) settings across UI, controller, and CameraX configuration layers.
- Removed dynamic range constraints from the createImageUseCase configuration in CameraSession.kt, enabling independent Ultra HDR
image capture.
- Updated QuickSettings bottom sheet click handlers to mutate only the HDR setting relevant to the active capture mode.
- Enforced specialized Low Light Boost vs Ultra HDR conflicts in CameraXCameraSystem.kt, prioritizing Low Light Boost.
- Created HdrUiStateAdapterTest.kt covering all HDR availability states and flash conflicts.
- Refactored CameraXCameraSystemTest.kt to run parameterized HDR decoupling tests on both front and rear lenses.
…oogle/jetpack-camera-app into kim/hdr/decouple-capture-modes
…ocations and setting internal visibility
temcguir
requested changes
Jul 14, 2026
…ate, and hide unsupported flash modes
temcguir
reviewed
Jul 18, 2026
- Remove redundant `externalCaptureMode` from `QuickSettingsControllerImpl` constructor and streamline selection guards. - Align `CameraXCameraSystem` HDR format constraints check with `HdrUiStateAdapter` by checking if the active effect targets image capture instead of checking for any active effect. - Address PR styling comments by converting trailing comments to dedicated lines. - Fix UI accessibility nit (remove duplicate announcements) and add missing KDoc to `HdrIndicator`. - Create unit tests for `QuickSettingsControllerImpl` and `QuickSettingsUiStateAdapter`, and add test coverage for effect interactions in `HdrUiStateAdapterTest`.
- Consolidate HybridQuickSettings, VideoQuickSettings, and ImageQuickSettings in QuickSettingsScreen.kt into a single unified QuickSettingsContent layout that adapts dynamically based on the active CaptureMode. - Rename QuickSettingsBottomSheet in QuickSettingsComponents.kt to QuickSettingsModalBottomSheet to avoid composable name duplication. - Remove redundant remember keys for indicator slot lambdas in PreviewScreen.kt. - Remove unused FLASH_UNSUPPORTED_ON_LENS enum value in DisabledReason.kt. - Change quick settings group title string resources in strings.xml to Title Case for visual consistency. - Format preview annotation and wrap lines exceeding 100 characters in QuickSettingsComponents.kt. - Replace JUnit assertThrows usage with try-catch in FlashModeUiStateAdapterTest.kt to avoid JUnit imports. - Add test coverage for simple selection changes in FlashModeUiStateAdapter.updateFrom.
Introduces `QuickSettingsListRow`, a generic helper Composable that handles the
boilerplate of iterating over selectable UI states (`SingleSelectableUiState<T>`), mapping
values to quick settings icons/labels via `QuickSettingsEnum`, and rendering the buttons.
Refactors `FlashRow`, `AspectRatioRow`, and `CaptureModeRow` to utilize this generic
helper, which:
- Deduplicates list iteration, button configuration, and selection logic.
- Eliminates the custom `CaptureModeToggleButton` helper.
- Simplifies code maintenance and future addition of quick settings options.
Kimblebee
force-pushed
the
kim/refactor/quickSettings/button-rows
branch
from
July 29, 2026 17:36
9216e74 to
2370297
Compare
Kimblebee
force-pushed
the
kim/refactor/quickSettings/button-rows
branch
from
July 29, 2026 17:41
2370297 to
bfd867e
Compare
temcguir
approved these changes
Jul 31, 2026
-adjust letter capitalization for quick settings title - hide settings that arent supported by the current lens
…tings/button-rows
…tings/button-rows
… state adapter tests - Refactored the Quick Settings bottom sheet UI to a flat layout, replacing nested navigation and scrollable containers with direct option rows. - Updated Instrumented tests (BackgroundDeviceTest, CaptureModeSettingsTest, ConcurrentCameraTest, NavigationTest, SwitchCameraTest) and helper functions in ComposeTestRuleExt.kt to interact with the flat layout. - Added LocalDisableAnimations composition local support in PreviewScreen.kt and QuickSettingsModalBottomSheet to disable animations for faster, more reliable testing. - Refactored FlashModeUiState.Unavailable and HdrUiState.Unavailable from classes to objects and updated tests in FlashModeUiStateAdapterTest.kt and HdrUiStateAdapterTest.kt. - Dynamically update FlipCameraButton's content description based on current lens facing.
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.
Uh oh!
There was an error while loading. Please reload this page.