[PR #5507] [MERGED] [PM-21750] Only show dynamic colors option on Android 12+ #5825

Closed
opened 2025-11-27 00:14:56 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/5507
Author: @SaintPatrck
Created: 7/10/2025
Status: Merged
Merged: 7/10/2025
Merged by: @SaintPatrck

Base: mainHead: PM-21750/hide-dynamic-colors-option-if-not-supported


📝 Commits (2)

  • 26190eb [PM-21750] Only show dynamic colors option on Android 12+
  • 7e49d21 Formatting

📊 Changes

4 files changed (+85 additions, -20 deletions)

View changed files

📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/platform/feature/settings/appearance/AppearanceScreen.kt (+17 -15)
📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/platform/feature/settings/appearance/AppearanceViewModel.kt (+11 -5)
📝 app/src/test/kotlin/com/x8bit/bitwarden/ui/platform/feature/settings/appearance/AppearanceScreenTest.kt (+25 -0)
📝 app/src/test/kotlin/com/x8bit/bitwarden/ui/platform/feature/settings/appearance/AppearanceViewModelTest.kt (+32 -0)

📄 Description

🎟️ Tracking

PM-21750

📔 Objective

The dynamic colors option in Appearance settings will now only be displayed on devices running Android 12 (API 31) or higher, as this feature is not supported on older versions.

This change includes:

  • Updating AppearanceViewModel to check the Android build version and set an isDynamicColorsSupported flag in the state.
  • Conditionally rendering the "Dynamic colors" switch in AppearanceScreen based on the isDynamicColorsSupported flag.
  • Updating tests to reflect this new behavior.

📸 Screenshots

Before After
image image

Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/bitwarden/android/pull/5507 **Author:** [@SaintPatrck](https://github.com/SaintPatrck) **Created:** 7/10/2025 **Status:** ✅ Merged **Merged:** 7/10/2025 **Merged by:** [@SaintPatrck](https://github.com/SaintPatrck) **Base:** `main` ← **Head:** `PM-21750/hide-dynamic-colors-option-if-not-supported` --- ### 📝 Commits (2) - [`26190eb`](https://github.com/bitwarden/android/commit/26190eb9a94f2085adbf453511d308922cebe09f) [PM-21750] Only show dynamic colors option on Android 12+ - [`7e49d21`](https://github.com/bitwarden/android/commit/7e49d211950086961ad3a6a651ca0c60b2ea2527) Formatting ### 📊 Changes **4 files changed** (+85 additions, -20 deletions) <details> <summary>View changed files</summary> 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/platform/feature/settings/appearance/AppearanceScreen.kt` (+17 -15) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/platform/feature/settings/appearance/AppearanceViewModel.kt` (+11 -5) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/ui/platform/feature/settings/appearance/AppearanceScreenTest.kt` (+25 -0) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/ui/platform/feature/settings/appearance/AppearanceViewModelTest.kt` (+32 -0) </details> ### 📄 Description ## 🎟️ Tracking PM-21750 ## 📔 Objective The dynamic colors option in Appearance settings will now only be displayed on devices running Android 12 (API 31) or higher, as this feature is not supported on older versions. This change includes: - Updating `AppearanceViewModel` to check the Android build version and set an `isDynamicColorsSupported` flag in the state. - Conditionally rendering the "Dynamic colors" switch in `AppearanceScreen` based on the `isDynamicColorsSupported` flag. - Updating tests to reflect this new behavior. ## 📸 Screenshots | Before | After | |--------|--------| | <img width="365" alt="image" src="https://github.com/user-attachments/assets/c46c5303-f4f1-44d1-aad2-9da5f49145be" /> | <img width="365" alt="image" src="https://github.com/user-attachments/assets/226280dd-379f-49c0-93a6-bc57b21bb2e5" /> | ## ⏰ Reminders before review - Contributor guidelines followed - All formatters and local linters executed and passed - Written new unit and / or integration tests where applicable - Protected functional changes with optionality (feature flags) - Used internationalization (i18n) for all UI strings - CI builds passed - Communicated to DevOps any deployment requirements - Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team ## 🦮 Reviewer guidelines <!-- Suggested interactions but feel free to use (or not) as you desire! --> - 👍 (`:+1:`) or similar for great changes - 📝 (`:memo:`) or ℹ️ (`:information_source:`) for notes or general info - ❓ (`:question:`) for questions - 🤔 (`:thinking:`) or 💭 (`:thought_balloon:`) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion - 🎨 (`:art:`) for suggestions / improvements - ❌ (`:x:`) or ⚠️ (`:warning:`) for more significant problems or concerns needing attention - 🌱 (`:seedling:`) or ♻️ (`:recycle:`) for future improvements or indications of technical debt - ⛏ (`:pick:`) for minor or nitpick changes --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-27 00:14:56 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#5825