mobile
mobile copied to clipboard
[EC-295][BEEEP] Add Swipe to Copy on vault login items
Type of change
- [ ] Bug fix
- [X] New feature development
- [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc)
- [ ] Build/deploy pipeline (DevOps)
- [ ] Other
Objective
Add swipe to copy username/password as a shortcut on vault list login items. Swipe left to right to copy username and right to left to copy password.
Code changes
-
IconFontImageSource.cs:
FontImageSourcewith the correct font type applied -
CipherHelper.cs: Added this class to move the static
CipherListOptionsonAppHelpersto be here so the class can be injected, is better prepared for unit testing and also to reuse copy username/password; furthermore now the services are just resolved once instead of every time the method is called. Now is calledShowCipherOptionsAsync(...) -
GroupingsPage.xaml: Added
DataTemplatefor login cipher item to have the swipe behavior - GroupingsPage.xaml.cs: Added a helper property to calculate the threshold of the swipe depending on the width of the page.
- GroupingsPageListItemSelector.cs: Added logic to choose the swipe data template for login ciphers
-
GroupingsPageViewModel.cs: Added commands and behavior for copy username/password and updated code to use
ICipherHelpermethods instead ofAppHelpers -
AutofillCiphersPageViewModel.cs: Changed call to
AppHelpers.CipherListOptionsfor the new one onCipherHelper -
CiphersPageViewModel.cs: Changed call to
AppHelpers.CipherListOptionsfor the new one onCipherHelper -
AppHelpers.cs: Removed
CipherListOptions(...)given that now is onICipherHelper -
iOSCoreHelpers.cs: Register new
CipherHelper -
MainApplication.cs: Register new
CipherHelper -
ExtendedGrid.cs: Added
ApplyRippleflag to control whether the grid needs to apply ripple -
Android/Renderers/ExtendedGridRenderer.cs: Added check for
ApplyRippleif not it overrides the behavior of the swipe background
Screenshots
iOS Behavior: https://user-images.githubusercontent.com/15682323/177174276-6ee098b4-a936-4555-8e8b-66163fc81392.mov
iOS Dark Mode:

Before you submit
- [X] I have checked for formatting errors (
dotnet tool run dotnet-format --check) (required) - [ ] I have added unit tests where it makes sense to do so (encouraged but not required)
- [X] This change requires a documentation update (notify the documentation team)
- [ ] This change has particular deployment requirements (notify the DevOps team)