[PR #1882] [MERGED] SG-209 Account switching in autofill UI (Android) #3198

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

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/1882
Author: @mpbw2
Created: 4/15/2022
Status: Merged
Merged: 4/20/2022
Merged by: @mpbw2

Base: masterHead: feature-autofillaccountswitch


📝 Commits (1)

  • 3684aee account switching in autofill UI (Android)

📊 Changes

4 files changed (+106 additions, -10 deletions)

View changed files

📝 src/App/App.xaml.cs (+15 -2)
📝 src/App/Pages/Vault/AutofillCiphersPage.xaml (+23 -2)
📝 src/App/Pages/Vault/AutofillCiphersPage.xaml.cs (+45 -3)
📝 src/App/Pages/Vault/AutofillCiphersPageViewModel.cs (+23 -3)

📄 Description

Type of change

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

Objective

Added support for account switching within the autofill UI on Android

Code changes

  • AutofillCiphersPage.xaml: Added AvatarImageSource to toolbar, additional ShowNoData property (explained below), and AccountSwitchingOverlayView control to layout
  • AutofillCiphersPage.xaml.cs/AutofillCiphersPageViewModel.cs: Added avatar & overlay support, plus separate loading & "NoData" states to smooth out UX when switching accounts (previously "NoData" was simply the negated "HasData" resulting in "No Matches" being shown momentarily before showing the matches)
  • App.xaml.cs: Added additional condition for clearing Options.Uri upon exiting the autofill flow (required to prevent main app from falling back into "autofill matches" view when switching accounts, as that triggers the SetMainPageAsync() flow that shows autofill matches if Options.Uri has value)

Testing requirements

Testing should consist of three parts:

  1. Obvious: Trigger autofill, switch users, unlock if necessary, select matches
  2. Less Obvious: Make sure main app continues to behave normally after using autofill flow (including saving new creds during autofill)
  3. Not Remotely Obvious: File selection flow (via file attachments and file Sends)

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/1882 **Author:** [@mpbw2](https://github.com/mpbw2) **Created:** 4/15/2022 **Status:** ✅ Merged **Merged:** 4/20/2022 **Merged by:** [@mpbw2](https://github.com/mpbw2) **Base:** `master` ← **Head:** `feature-autofillaccountswitch` --- ### 📝 Commits (1) - [`3684aee`](https://github.com/bitwarden/android/commit/3684aeee281d29ac19451abdadb33490944509e8) account switching in autofill UI (Android) ### 📊 Changes **4 files changed** (+106 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `src/App/App.xaml.cs` (+15 -2) 📝 `src/App/Pages/Vault/AutofillCiphersPage.xaml` (+23 -2) 📝 `src/App/Pages/Vault/AutofillCiphersPage.xaml.cs` (+45 -3) 📝 `src/App/Pages/Vault/AutofillCiphersPageViewModel.cs` (+23 -3) </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--> Added support for account switching within the autofill UI on Android ## 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--> * **AutofillCiphersPage.xaml:** Added `AvatarImageSource` to toolbar, additional `ShowNoData` property (explained below), and `AccountSwitchingOverlayView` control to layout * **AutofillCiphersPage.xaml.cs/AutofillCiphersPageViewModel.cs:** Added avatar & overlay support, plus separate loading & "NoData" states to smooth out UX when switching accounts (previously "NoData" was simply the negated "HasData" resulting in "No Matches" being shown momentarily before showing the matches) * **App.xaml.cs:** Added additional condition for clearing `Options.Uri` upon exiting the autofill flow (required to prevent main app from falling back into "autofill matches" view when switching accounts, as that triggers the `SetMainPageAsync()` flow that shows autofill matches if `Options.Uri` has value) ## Testing requirements <!--What functionality requires testing by QA? This includes testing new behavior and regression testing--> Testing should consist of three parts: 1. **Obvious:** Trigger autofill, switch users, unlock if necessary, select matches 2. **Less Obvious:** Make sure main app continues to behave normally after using autofill flow (including saving new creds during autofill) 3. **Not Remotely Obvious:** File selection flow (via file attachments and file Sends) ## 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:29:34 -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#3198