[PR #2304] [MERGED] [SG-516] Additional forwarded email providers for username generator - mobile #3494

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

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/2304
Author: @andrebispo5
Created: 1/18/2023
Status: Merged
Merged: 1/26/2023
Merged by: @andrebispo5

Base: masterHead: feature/SG-516-email-providers


📝 Commits (8)

  • 1eabebc [SG-516] Added DuckDuckGo provider
  • bb33cb6 [SG-516] Add Fastmail as generator provider
  • 71d0949 [SG-516] code clean up
  • 3c2871a [SG-516] Default to service empty if first time on screen. Order services by alphabetic order.
  • 827536e [SG-516] Removed unnecessary prop.
  • d18db8c [PS-2278] Fixed inverted eye bug.
  • 3985e58 [SG-516] Add icon glyph converter
  • 90fd7e8 [SG-516] Fixed enum default value and ordering

📊 Changes

9 files changed (+263 additions, -25 deletions)

View changed files

📝 src/App/Pages/Generator/GeneratorPage.xaml (+47 -4)
📝 src/App/Pages/Generator/GeneratorPageViewModel.cs (+60 -19)
📝 src/App/Resources/AppResources.Designer.cs (+18 -0)
📝 src/App/Resources/AppResources.resx (+8 -0)
📝 src/App/Utilities/IconGlyphExtensions.cs (+1 -1)
📝 src/Core/Enums/ForwardedEmailServiceType.cs (+5 -0)
📝 src/Core/Models/Domain/UsernameGenerationOptions.cs (+6 -1)
📝 src/Core/Services/ApiService.cs (+95 -0)
📝 src/Core/Services/UsernameGenerationService.cs (+23 -0)

📄 Description

Type of change

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

Objective

Add option to select Fastmail and Duck Duck Go as options in the forwarded email alias providers.
Default to none-selected if this is the first use of the screen. Otherwise default to the last selected.

Code changes

src/App/Pages/Generator/GeneratorPage.xaml:
New UI views to hold api keys for new services added. (This can be refactored in the future to avoid having multiple views)
src/App/Pages/Generator/GeneratorPageViewModel.cs:
Add new entries for Fastmail and Duck Duck Go to ForwardedEmailServiceTypeOptions.
Added properties to bind to the UI for Api Keys and Visibility.
src/Core/Enums/ForwardedEmailServiceType.cs:
Reorder the enum with added values. Added none to be defaulted the first the user sees the screen, after that it will always have a value saved.
src/Core/Services/ApiService.cs:
HandleFastMailResponse logic was copied from the other clients.
CreateFastmailRequest gets the necessary accountId value through a get call, after that builds a JSON object that will be used to perform the actual call to get a generated email.

Screenshots

First time on screen, default service to empty:

https://user-images.githubusercontent.com/4648522/213505609-ced1e223-9cb0-4a2b-b42d-7756f6d71f3b.mov

Subsequent screen landings, generate new emails from Fastmail and Duck Duck Go:

https://user-images.githubusercontent.com/4648522/213505852-1f347a6d-578c-4a61-9278-541369a07fe3.mov

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/2304 **Author:** [@andrebispo5](https://github.com/andrebispo5) **Created:** 1/18/2023 **Status:** ✅ Merged **Merged:** 1/26/2023 **Merged by:** [@andrebispo5](https://github.com/andrebispo5) **Base:** `master` ← **Head:** `feature/SG-516-email-providers` --- ### 📝 Commits (8) - [`1eabebc`](https://github.com/bitwarden/android/commit/1eabebc8010f792de9e4c55220ce58829271737f) [SG-516] Added DuckDuckGo provider - [`bb33cb6`](https://github.com/bitwarden/android/commit/bb33cb65f921ecb3436027e7b534bedcb87e0d64) [SG-516] Add Fastmail as generator provider - [`71d0949`](https://github.com/bitwarden/android/commit/71d09490a95bd1becc82f791cf9437710cd2f4ad) [SG-516] code clean up - [`3c2871a`](https://github.com/bitwarden/android/commit/3c2871a4a16ba463f421c3a8f33b35dd32e5350b) [SG-516] Default to service empty if first time on screen. Order services by alphabetic order. - [`827536e`](https://github.com/bitwarden/android/commit/827536e424d62cd6eb90f8593d2ad58432836aaf) [SG-516] Removed unnecessary prop. - [`d18db8c`](https://github.com/bitwarden/android/commit/d18db8cd668c8e77212f2b006fa9c43a5aca2b12) [PS-2278] Fixed inverted eye bug. - [`3985e58`](https://github.com/bitwarden/android/commit/3985e58f0b6bcbca93170b7c4227c3e3ef7e76b0) [SG-516] Add icon glyph converter - [`90fd7e8`](https://github.com/bitwarden/android/commit/90fd7e8df49d4db12c0872201f9c2ace891b005d) [SG-516] Fixed enum default value and ordering ### 📊 Changes **9 files changed** (+263 additions, -25 deletions) <details> <summary>View changed files</summary> 📝 `src/App/Pages/Generator/GeneratorPage.xaml` (+47 -4) 📝 `src/App/Pages/Generator/GeneratorPageViewModel.cs` (+60 -19) 📝 `src/App/Resources/AppResources.Designer.cs` (+18 -0) 📝 `src/App/Resources/AppResources.resx` (+8 -0) 📝 `src/App/Utilities/IconGlyphExtensions.cs` (+1 -1) 📝 `src/Core/Enums/ForwardedEmailServiceType.cs` (+5 -0) 📝 `src/Core/Models/Domain/UsernameGenerationOptions.cs` (+6 -1) 📝 `src/Core/Services/ApiService.cs` (+95 -0) 📝 `src/Core/Services/UsernameGenerationService.cs` (+23 -0) </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--> Add option to select Fastmail and Duck Duck Go as options in the forwarded email alias providers. Default to none-selected if this is the first use of the screen. Otherwise default to the last selected. ## 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--> [src/App/Pages/Generator/GeneratorPage.xaml](https://github.com/bitwarden/mobile/pull/2304/files#diff-6646362e986f583f0da02c8c01fad244607c0d4dd38e211dd22f7d7ac64664dd): New UI views to hold api keys for new services added. (This can be refactored in the future to avoid having multiple views) [src/App/Pages/Generator/GeneratorPageViewModel.cs](https://github.com/bitwarden/mobile/pull/2304/files#diff-06d6f35a0e203bdae8fe03dade2ef549a73850f02dde233ac921a0fd7214dbc5): Add new entries for Fastmail and Duck Duck Go to `ForwardedEmailServiceTypeOptions`. Added properties to bind to the UI for Api Keys and Visibility. [src/Core/Enums/ForwardedEmailServiceType.cs](https://github.com/bitwarden/mobile/pull/2304/files#diff-5c4fbe584a9869f63822190a1d2af12cad7f0f18caadb45a6da61cc65841b380): Reorder the enum with added values. Added none to be defaulted the first the user sees the screen, after that it will always have a value saved. [src/Core/Services/ApiService.cs](https://github.com/bitwarden/mobile/pull/2304/files#diff-5b9bd6e62fd23e1f8dbc2fd0b883357945eae927d73e88753478e3f7c2de2638): `HandleFastMailResponse` logic was copied from the other clients. `CreateFastmailRequest` gets the necessary `accountId` value through a get call, after that builds a JSON object that will be used to perform the actual call to get a generated email. ## Screenshots <!--Required for any UI changes. Delete if not applicable--> First time on screen, default service to empty: https://user-images.githubusercontent.com/4648522/213505609-ced1e223-9cb0-4a2b-b42d-7756f6d71f3b.mov Subsequent screen landings, generate new emails from Fastmail and Duck Duck Go: https://user-images.githubusercontent.com/4648522/213505852-1f347a6d-578c-4a61-9278-541369a07fe3.mov ## 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:33:32 -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#3494