Refactor Settings UI: decouple Compose slots and simplify UI state - #563
Open
temcguir wants to merge 10 commits into
Open
Refactor Settings UI: decouple Compose slots and simplify UI state#563temcguir wants to merge 10 commits into
temcguir wants to merge 10 commits into
Conversation
This introduces a robust Compose slot architecture for the Settings view natively inside Jetpack Camera App. Rather than hardcoding the menu options, feature plugins and custom apps can inject custom nodes using the slot properties exposed on the SettingsScreen node, while retaining fully featured state hoisting for isolated UI previews. Tests have been updated to reflect the ability to inject the generic UI.
Contributor
There was a problem hiding this comment.
Code Review
This pull request refactors the settings screen by decomposing the monolithic settings list into modular slots and introducing default stateful and stateless implementations for camera, recording, and app settings. It also adds a new JcaEffectsSetting component to manage camera effects. The review feedback suggests restricting the visibility of these new composables to internal to follow proper visibility guidelines, and simplifying the type-checking and casting logic of SettingsUiState using Kotlin's idiomatic as? and Elvis operator.
…tings-compose-slots # Conflicts: # app/build.gradle.kts
davidjiagoogle
approved these changes
Aug 26, 2026
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
This pull request introduces a robust Compose slot architecture for the Settings view natively inside the Jetpack Camera App. Rather than hardcoding the menu options, external feature plugins and custom apps can now safely inject custom nodes using the slot properties exposed on the
SettingsScreennode, while still retaining fully featured state hoisting for isolated UI previews.Key Changes
SettingsScreento accept custom Compose slots (likecameraSettingsSlot,recordingSettingsSlot, etc.) allowing granular layout modifications.DefaultCameraSettings,DefaultRecordingSettings,DefaultAppSettings) aspublicso external developers can selectively reuse them within their customized overrides.