[PR #2209] [MERGED] [PS-1707] improve dark layout colors #3429

Closed
opened 2025-11-26 23:32:40 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/2209
Author: @aj-rosado
Created: 11/29/2022
Status: Merged
Merged: 12/2/2022
Merged by: @aj-rosado

Base: masterHead: feature/PS-1707-Improve-dark-layout-colors


📝 Commits (4)

  • a66cd10 [PS-1707] Changed the callout color to a Theme Color
  • 156c9ef [PS-1707] Changed color defaults to defined colors
  • c961041 [PS-1707] Added an effect to change the switch hint color to a theme color
  • 7e42f04 [PS-1707] Removed HintColorSwitchEffect and added the content to the CustomSwitchRenderer to affect all switches and update on theme change

📊 Changes

14 files changed (+23 additions, -22 deletions)

View changed files

📝 src/Android/Renderers/CustomSwitchRenderer.cs (+1 -0)
📝 src/Android/Utilities/ThemeHelpers.cs (+1 -1)
📝 src/App/Controls/CircularProgressbarView.cs (+3 -3)
📝 src/App/Controls/ExtendedSlider.cs (+1 -1)
📝 src/App/Controls/ExtendedStepper.cs (+2 -2)
📝 src/App/Pages/Accounts/SetPasswordPage.xaml (+2 -2)
📝 src/App/Pages/Accounts/UpdateTempPasswordPage.xaml (+2 -2)
📝 src/App/Pages/Generator/GeneratorPage.xaml (+2 -2)
📝 src/App/Pages/Send/SendAddEditPage.xaml (+2 -2)
📝 src/App/Pages/Send/SendAddOnlyPage.xaml (+2 -2)
📝 src/App/Pages/Send/SendGroupingsPage/SendGroupingsPage.xaml (+1 -1)
📝 src/App/Pages/Settings/ExportVaultPage.xaml (+1 -1)
📝 src/App/Pages/Settings/SettingsPage/SettingsPage.xaml (+2 -2)
📝 src/App/Pages/Vault/CipherAddEditPage.xaml (+1 -1)

📄 Description

Type of change

  • Bug fix
  • New feature development
  • Tech debt (refactoring, code cleanup, dependency upgrades, etc)
  • Build/deploy pipeline (DevOps)
  • Other

Objective

The color of callouts and switch hints (for android) weren't using theme colors, instead were using the platform defined color for light or dark theme and now they are using Theme Colors.
The switch hint text on Android wasn't visible when using a dark Bitwarden theme on a Light OS Theme.
Changed the Color.Default to defines colors as they weren't returning always the expected color and this will be an obsolete feature for MAUI.

Code changes

  • SetPasswordPage.xaml,UpdatePasswordPage.xaml, GeneratorPage.xaml, SendAddEditPage.xaml, SendAddOnlyPage.xaml, ExportVaultPage.xaml, SettingsPage.xaml, CipherAddEditPage.xaml: Changed Accent color to use the PrimaryColor from DynamicResources.

  • CircularProgressbarView.cs, ExtendedSlider.cs, ExtendedStepper.cs: Changed Color.Default to a defined color as Color.Default wasn't returning a color that would keep layout integrity.

  • GeneratorPage.xaml: Added effect to change the switch hint color

  • ThemeHelpers.cs: Validation for dark themes was missing the SolarizedDark theme

  • HintColorSwitchEffect.cs: Effect that changes the hint color of a switch to the Theme MutedColor

Screenshots

Android:
Screenshot_1669748794

iOS:
Simulator Screen Shot - iPhone SE (3rd generation) - 2022-11-29 at 19 05 49

Before you submit

  • Please check for formatting errors (dotnet format --verify-no-changes) (required)
  • Please add unit tests where it makes sense to do so (encouraged but not required)
  • If this change requires a documentation update - notify the documentation team
  • If this change has particular deployment requirements - notify the DevOps team

🔄 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/2209 **Author:** [@aj-rosado](https://github.com/aj-rosado) **Created:** 11/29/2022 **Status:** ✅ Merged **Merged:** 12/2/2022 **Merged by:** [@aj-rosado](https://github.com/aj-rosado) **Base:** `master` ← **Head:** `feature/PS-1707-Improve-dark-layout-colors` --- ### 📝 Commits (4) - [`a66cd10`](https://github.com/bitwarden/android/commit/a66cd10f90181d5f4bd3b4e6a416aea68dca71cb) [PS-1707] Changed the callout color to a Theme Color - [`156c9ef`](https://github.com/bitwarden/android/commit/156c9efd0a2eff5addf14d9fefcec4a632aaa4e8) [PS-1707] Changed color defaults to defined colors - [`c961041`](https://github.com/bitwarden/android/commit/c9610410bfb1018987815dbe1748b062ba03689e) [PS-1707] Added an effect to change the switch hint color to a theme color - [`7e42f04`](https://github.com/bitwarden/android/commit/7e42f047f6741937547e0b0969153f4952297c52) [PS-1707] Removed HintColorSwitchEffect and added the content to the CustomSwitchRenderer to affect all switches and update on theme change ### 📊 Changes **14 files changed** (+23 additions, -22 deletions) <details> <summary>View changed files</summary> 📝 `src/Android/Renderers/CustomSwitchRenderer.cs` (+1 -0) 📝 `src/Android/Utilities/ThemeHelpers.cs` (+1 -1) 📝 `src/App/Controls/CircularProgressbarView.cs` (+3 -3) 📝 `src/App/Controls/ExtendedSlider.cs` (+1 -1) 📝 `src/App/Controls/ExtendedStepper.cs` (+2 -2) 📝 `src/App/Pages/Accounts/SetPasswordPage.xaml` (+2 -2) 📝 `src/App/Pages/Accounts/UpdateTempPasswordPage.xaml` (+2 -2) 📝 `src/App/Pages/Generator/GeneratorPage.xaml` (+2 -2) 📝 `src/App/Pages/Send/SendAddEditPage.xaml` (+2 -2) 📝 `src/App/Pages/Send/SendAddOnlyPage.xaml` (+2 -2) 📝 `src/App/Pages/Send/SendGroupingsPage/SendGroupingsPage.xaml` (+1 -1) 📝 `src/App/Pages/Settings/ExportVaultPage.xaml` (+1 -1) 📝 `src/App/Pages/Settings/SettingsPage/SettingsPage.xaml` (+2 -2) 📝 `src/App/Pages/Vault/CipherAddEditPage.xaml` (+1 -1) </details> ### 📄 Description ## Type of change - [x] Bug fix - [ ] New feature development - [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc) - [ ] Build/deploy pipeline (DevOps) - [ ] Other ## Objective The color of callouts and switch hints (for android) weren't using theme colors, instead were using the platform defined color for light or dark theme and now they are using Theme Colors. The switch hint text on Android wasn't visible when using a dark Bitwarden theme on a Light OS Theme. Changed the Color.Default to defines colors as they weren't returning always the expected color and this will be an obsolete feature for MAUI. ## Code changes <!--Explain the changes you've made to each file or major component. This should help the reviewer understand your changes--> <!--Also refer to any related changes or PRs in other repositories--> * **SetPasswordPage.xaml,UpdatePasswordPage.xaml, GeneratorPage.xaml, SendAddEditPage.xaml, SendAddOnlyPage.xaml, ExportVaultPage.xaml, SettingsPage.xaml, CipherAddEditPage.xaml:** Changed Accent color to use the PrimaryColor from DynamicResources. * **CircularProgressbarView.cs, ExtendedSlider.cs, ExtendedStepper.cs:** Changed Color.Default to a defined color as Color.Default wasn't returning a color that would keep layout integrity. * **GeneratorPage.xaml:** Added effect to change the switch hint color * **ThemeHelpers.cs:** Validation for dark themes was missing the SolarizedDark theme * **HintColorSwitchEffect.cs:** Effect that changes the hint color of a switch to the Theme MutedColor ## Screenshots Android: ![Screenshot_1669748794](https://user-images.githubusercontent.com/109146700/204626514-8e94cc72-8751-4f12-bb34-a3597908acbd.png) iOS: ![Simulator Screen Shot - iPhone SE (3rd generation) - 2022-11-29 at 19 05 49](https://user-images.githubusercontent.com/109146700/204626669-175a992e-63db-40dc-8c00-f6bcf35f391a.png) ## Before you submit - Please check for formatting errors (`dotnet format --verify-no-changes`) (required) - Please add **unit tests** where it makes sense to do so (encouraged but not required) - If this change requires a **documentation update** - notify the documentation team - If this change has particular **deployment requirements** - notify the DevOps team --- <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-26 23:32:40 -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#3429