[PR #1733] [MERGED] Updated account switching menu UI #3081

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

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/1733
Author: @mpbw2
Created: 1/26/2022
Status: Merged
Merged: 1/28/2022
Merged by: @mpbw2

Base: accountswitchingHead: accountswitching-menu-ui


📝 Commits (5)

  • 7e49655 updated account switching menu UI
  • 110b13b additional changes
  • a7f428b Merge branch 'accountswitching' into accountswitching-menu-ui
  • 1c9c212 add key suffix to constant
  • 1ba4d77 GetFirstLetters method tweaks

📊 Changes

18 files changed (+227 additions, -62 deletions)

View changed files

📝 src/App/Controls/AccountViewCell/AccountViewCell.xaml (+67 -21)
📝 src/App/Controls/AccountViewCell/AccountViewCellViewModel.cs (+50 -3)
📝 src/App/Controls/AvatarImageSource.cs (+27 -9)
📝 src/App/Pages/Accounts/HomePage.xaml (+1 -1)
📝 src/App/Pages/Accounts/LockPage.xaml (+1 -1)
📝 src/App/Pages/Accounts/LockPage.xaml.cs (+1 -1)
📝 src/App/Pages/Accounts/LoginPage.xaml (+1 -1)
📝 src/App/Pages/BaseContentPage.cs (+6 -2)
📝 src/App/Pages/Vault/GroupingsPage/GroupingsPage.xaml (+1 -1)
📝 src/App/Resources/AppResources.Designer.cs (+24 -0)
📝 src/App/Resources/AppResources.resx (+12 -0)
📝 src/Core/Abstractions/IStateService.cs (+1 -1)
📝 src/Core/Constants.cs (+1 -1)
📝 src/Core/Enums/AuthenticationStatus.cs (+0 -1)
📝 src/Core/Models/Domain/Account.cs (+2 -0)
📝 src/Core/Models/View/AccountView.cs (+14 -2)
📝 src/Core/Services/AuthService.cs (+1 -0)
📝 src/Core/Services/StateService.cs (+17 -17)

📄 Description

Type of change

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

Objective

Incorporate latest adjustments to account switching menu appearance

Code changes

  • AccountViewCell.xaml/AccountViewCellViewModel.cs: Updated layout and bindings
  • AvatarImageSource.cs: Added support for username when parsing for color and chars
  • Home/Lock/Login/GroupingsPage.xaml: Tweaked RowHeight to support new ViewCell layout
  • LockPage.xaml.cs: Allow "Add Account" while on lock screen
  • BaseContentPage.cs: Send both name and email when constructing an avatar
  • AppResources.*: Account auth states for translation
  • AuthenticationStatus.cs: Removed Active as a status (mobile always has an active account to satisfy autofill, and the active account can also be in one of the remaining 3 AuthStatuses)
  • Account.cs: Added support for username
  • AccountView.cs: Added support for active state, username, and proper parsing of displayed hostname
  • AuthService.cs: Added username to new account construction
  • StateService.cs: Added support for username and updated RefreshAccountViewsAsync to support modified layout and authStatus/active state

Screenshots

Screen Shot 2022-01-26 at 12 10 31 PM

Testing requirements

This is part of account switching so same testing requirements apply

Before you submit

  • I have added unit tests where it makes sense to do so (encouraged but not required)
  • This change requires a documentation update (notify the documentation team)
  • 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/1733 **Author:** [@mpbw2](https://github.com/mpbw2) **Created:** 1/26/2022 **Status:** ✅ Merged **Merged:** 1/28/2022 **Merged by:** [@mpbw2](https://github.com/mpbw2) **Base:** `accountswitching` ← **Head:** `accountswitching-menu-ui` --- ### 📝 Commits (5) - [`7e49655`](https://github.com/bitwarden/android/commit/7e49655391810b426546daeaec3e298b615e2ed7) updated account switching menu UI - [`110b13b`](https://github.com/bitwarden/android/commit/110b13b56bebe55320c342b3ba1b9682ccb67cf3) additional changes - [`a7f428b`](https://github.com/bitwarden/android/commit/a7f428b138a73121525d1927614bfa804b401694) Merge branch 'accountswitching' into accountswitching-menu-ui - [`1c9c212`](https://github.com/bitwarden/android/commit/1c9c212eb847deaf0295fb8511a09e53233df865) add key suffix to constant - [`1ba4d77`](https://github.com/bitwarden/android/commit/1ba4d7718b1b6053e704620d912ff4bdc6855972) GetFirstLetters method tweaks ### 📊 Changes **18 files changed** (+227 additions, -62 deletions) <details> <summary>View changed files</summary> 📝 `src/App/Controls/AccountViewCell/AccountViewCell.xaml` (+67 -21) 📝 `src/App/Controls/AccountViewCell/AccountViewCellViewModel.cs` (+50 -3) 📝 `src/App/Controls/AvatarImageSource.cs` (+27 -9) 📝 `src/App/Pages/Accounts/HomePage.xaml` (+1 -1) 📝 `src/App/Pages/Accounts/LockPage.xaml` (+1 -1) 📝 `src/App/Pages/Accounts/LockPage.xaml.cs` (+1 -1) 📝 `src/App/Pages/Accounts/LoginPage.xaml` (+1 -1) 📝 `src/App/Pages/BaseContentPage.cs` (+6 -2) 📝 `src/App/Pages/Vault/GroupingsPage/GroupingsPage.xaml` (+1 -1) 📝 `src/App/Resources/AppResources.Designer.cs` (+24 -0) 📝 `src/App/Resources/AppResources.resx` (+12 -0) 📝 `src/Core/Abstractions/IStateService.cs` (+1 -1) 📝 `src/Core/Constants.cs` (+1 -1) 📝 `src/Core/Enums/AuthenticationStatus.cs` (+0 -1) 📝 `src/Core/Models/Domain/Account.cs` (+2 -0) 📝 `src/Core/Models/View/AccountView.cs` (+14 -2) 📝 `src/Core/Services/AuthService.cs` (+1 -0) 📝 `src/Core/Services/StateService.cs` (+17 -17) </details> ### 📄 Description ## Type of change - [ ] Bug fix - [X] New feature development - [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc) - [ ] Build/deploy pipeline (DevOps) - [ ] Other ## Objective <!--Describe what the purpose of this PR is. For example: what bug you're fixing or what new feature you're adding--> Incorporate latest adjustments to account switching menu appearance ## 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--> * **AccountViewCell.xaml/AccountViewCellViewModel.cs:** Updated layout and bindings * **AvatarImageSource.cs:** Added support for username when parsing for color and chars * **Home/Lock/Login/GroupingsPage.xaml:** Tweaked `RowHeight` to support new `ViewCell` layout * **LockPage.xaml.cs:** Allow "Add Account" while on lock screen * **BaseContentPage.cs:** Send both name and email when constructing an avatar * **AppResources.*:** Account auth states for translation * **AuthenticationStatus.cs:** Removed `Active` as a status (mobile always has an active account to satisfy autofill, and the active account can also be in one of the remaining 3 AuthStatuses) * **Account.cs:** Added support for username * **AccountView.cs:** Added support for active state, username, and proper parsing of displayed hostname * **AuthService.cs:** Added username to new account construction * **StateService.cs:** Added support for username and updated `RefreshAccountViewsAsync` to support modified layout and authStatus/active state ## Screenshots <!--Required for any UI changes. Delete if not applicable--> <img width="780" alt="Screen Shot 2022-01-26 at 12 10 31 PM" src="https://user-images.githubusercontent.com/59324545/151213522-106c8638-0fd6-45ce-8e2b-b9a2868176ba.png"> ## Testing requirements <!--What functionality requires testing by QA? This includes testing new behavior and regression testing--> This is part of account switching so same testing requirements apply ## Before you submit - [ ] I have added **unit tests** where it makes sense to do so (encouraged but not required) - [ ] This change requires a **documentation update** (notify the documentation team) - [ ] 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:28:03 -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#3081