Custom Theme Color Picker & Decoupled Player Theme - #47
Conversation
- Added `ColorPickerBottomSheet` with a split-circle visualizer for custom static themes. - Updated `AppearanceSettings` to include new theme controls: - "Dynamic Player Theme" (Album Art for Player) - "Dynamic App Theme" (Album Art for App, dependent on Player toggle) - "Use System Colors" (Material You, fallback from Dynamic) - "Custom Theme Color" (Static color picker, fallback from System) - Refactored `MainActivity` theme logic to support independent Player and App themes. - Wrapped `BottomSheetPlayer` in its own `MetrolistTheme` to respect the decoupled configuration. Co-authored-by: adrielGGmotion <200536612+adrielGGmotion@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Summary of ChangesHello @adrielGGmotion, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the application's theming capabilities by providing users with granular control over their visual experience. It introduces the ability to independently configure the player's dynamic theme, based on album art, from the overall application's theme. Furthermore, it integrates a custom color picker for static theme selection and supports system-level Material You theming, offering a flexible and personalized interface. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a great new feature for theme customization, allowing users to decouple the player's theme from the main app theme and select a custom static color using a new color picker. The implementation is solid, with clear logic for theme selection hierarchy.
I've found a few areas for improvement:
- A critical issue in
AppearanceSettings.ktthat will cause a build failure due to a missing string resource. - Several hardcoded strings in the settings screen that should be moved to
strings.xmlfor localization. - Some minor code cleanup opportunities, such as removing unused parameters/variables and refactoring duplicated code.
Overall, this is a well-executed feature addition. Addressing these points will make the code more robust and maintainable.
| add( | ||
| Material3SettingsItem( | ||
| icon = painterResource(R.drawable.palette), | ||
| title = { Text(stringResource(R.string.customize_colors)) }, |
There was a problem hiding this comment.
| Material3SettingsItem( | ||
| icon = painterResource(R.drawable.palette), | ||
| title = { Text(stringResource(R.string.enable_dynamic_theme)) }, | ||
| title = { Text("Dynamic player theme") }, |
There was a problem hiding this comment.
The title "Dynamic player theme" is hardcoded. This prevents localization. Please extract this and other new hardcoded strings ("Dynamic app theme" on line 883, "Use system colors" on line 909) into strings.xml and reference them using stringResource().
| title = { Text("Dynamic player theme") }, | |
| title = { Text(stringResource(R.string.dynamic_player_theme)) }, |
| MetrolistTheme( | ||
| darkTheme = useDarkTheme, | ||
| pureBlack = pureBlack, | ||
| themeColor = playerThemeColor, | ||
| ) { | ||
| BottomSheetPlayer( | ||
| state = playerBottomSheetState, | ||
| navController = navController, | ||
| pureBlack = pureBlack | ||
| ) | ||
| } |
There was a problem hiding this comment.
| onColorSelected: (Int) -> Unit, | ||
| onDismiss: () -> Unit |
There was a problem hiding this comment.
| Canvas(modifier = Modifier.fillMaxSize()) { | ||
| val width = size.width | ||
| val height = size.height | ||
| val center = Offset(width / 2, height / 2) |
- Decouple Player Theme (Dynamic) from App Theme (Dynamic/System/Static). - Add new keys: `UseSystemMaterialYouKey`, `ApplyDynamicThemeToAppKey`, `StaticThemeColorKey`. - Implement `ColorPickerContent` with a horizontal list of "split-circle" color swatches (Primary/Secondary/Tertiary) and a theme preview card. - Refactor `AppearanceSettings` to include the new toggles and display the Color Picker inline when custom colors are active. - Fix UI structure to ensure `Material3SettingsGroup` and inline content are rendered correctly. - Add localization strings. Co-authored-by: adrielGGmotion <200536612+adrielGGmotion@users.noreply.github.com>
Implemented a robust theme customization system allowing users to decouple the Player's dynamic theme (album art) from the App's theme. Added a custom Color Picker with a unique split-circle design and rainbow presets for static themes. The hierarchy is: Dynamic App > System Material You > Custom Static Color. The Player can independently remain dynamic.
PR created automatically by Jules for task 5078750370399123351 started by @adrielGGmotion