Skip to content

Refactor Quick Settings UI - #530

Open
Kimblebee wants to merge 80 commits into
mainfrom
kim/refactor/quickSettings/button-rows
Open

Refactor Quick Settings UI#530
Kimblebee wants to merge 80 commits into
mainfrom
kim/refactor/quickSettings/button-rows

Conversation

@Kimblebee

@Kimblebee Kimblebee commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator
Screenshot 2026-07-29 at 10 22 23 AM Screenshot 2026-07-29 at 10 21 33 AM

Kimblebee added 30 commits April 8, 2026 19:12
- 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.
Base automatically changed from kim/hdr/decouple-capture-modes to main July 7, 2026 23:06
Comment thread ui/components/capture/src/main/res/values/strings.xml Outdated
- 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
Kimblebee force-pushed the kim/refactor/quickSettings/button-rows branch from 9216e74 to 2370297 Compare July 29, 2026 17:36
@Kimblebee
Kimblebee force-pushed the kim/refactor/quickSettings/button-rows branch from 2370297 to bfd867e Compare July 29, 2026 17:41
Comment thread ui/components/capture/src/main/res/values/strings.xml Outdated
-adjust letter capitalization for quick settings title
- hide settings that arent supported by the current lens
… 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.
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