Skip to content

[PM-2320] Improve Android block Auto-fill URIs#2616

Merged
fedemkr merged 6 commits intomasterfrom
vault/pm-2320/improve-block-uri-autofill
Jul 18, 2023
Merged

[PM-2320] Improve Android block Auto-fill URIs#2616
fedemkr merged 6 commits intomasterfrom
vault/pm-2320/improve-block-uri-autofill

Conversation

@fedemkr
Copy link
Member

@fedemkr fedemkr commented Jul 13, 2023

Type of change

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

Objective

Improve current way to block Auto-fill URIs. This is an Android feature.

Code changes

  • BlockAutofillUrisPage.xaml: New view to display blocked autofill URIs.
    • BlockAutofillUrisPage.xaml.cs: New view to display blocked autofill URIs. Added this as theme dirtable to change the placeholder corresponding to the current app theme.
  • BlockAutofillUrisPageViewModel.cs: New view model to handle the logic for blocked autofill URIs and also validation on input.
  • OptionsPage.xaml: Changed UI to be simpler and just navigate to the new view
  • OptionsPage.xaml.cs: Removed old blocked Uris logic
  • OptionsPageViewModel.cs: Removed old blocked Uris logic and added navigation to new view
  • DeviceActionService.cs: Added new DisplayValidatablePromptAsync(...) method that shows a custom alert dialog with a custom view that has validations and execute the validations when pressing save. The dialog is dismissed on save only when all validations are valid. Also, added a few improvements for accessibility.
  • validatable_input_dialog_layout.xml: Custom dialog view to display input that can be validated
  • dimens.xml: Custom dimensions for validatable_input_dialog_layout.xml
  • CustomLabel.cs: Added ability to change the font weight
  • CustomLabelRenderer.cs: Added ability to change the font weight on API 28+
  • ValidatablePromptConfig.cs: Config parameters for DeviceActionService.DisplayValidatablePromptAsync. Chose struct over method parameters to have more flexibility and because they are a lot.
  • empty_uris_placeholder.xml: New icon to be displayed when there are no Uris in the list
  • empty_uris_placeholder_dark.xml: New icon to be displayed when there are no Uris in the list on dark themes (transparent fill color)

Screenshots

Options Block autofill light

Options Block autofill light

Options Block autofill dark

Options Block autofill dark

Block autofill empty light

Block autofill empty light

Block autofill empty dark

Block autofill empty dark

Block autofill multiple items light

Block autofill multiple items light

Block autofill multiple items dark

Block autofill multiple items dark

Block autofill new uri

Block autofill new uri

Block autofill new uri error

Block autofill new uri error

Block Autofill edit uri

Block Autofill edit uri

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

@fedemkr fedemkr requested review from a team July 13, 2023 18:05
@fedemkr fedemkr changed the title [PM-2320] Improve block Auto-fill URIs [PM-2320] Improve Android block Auto-fill URIs Jul 13, 2023
@bitwarden-bot
Copy link

bitwarden-bot commented Jul 13, 2023

Logo
Checkmarx One – Scan Summary & Details7fd8f784-d68c-4418-8a62-7d93421ba181

No New Or Fixed Issues Found

@danielleflinn
Copy link

@Federico-Maccaroni is there a way to embed the color variables from the theme file into the SVG? That way it will appear nicely in each theme.
If so, MutedColor could be used for the darker outline color and the ListHeaderBackgroundColor for the lighter fill color.

LRNcardozoWDF
LRNcardozoWDF previously approved these changes Jul 17, 2023
Copy link
Member

@LRNcardozoWDF LRNcardozoWDF left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job @fedemkr, LGTM.

@fedemkr fedemkr merged commit dd52ff0 into master Jul 18, 2023
@fedemkr fedemkr deleted the vault/pm-2320/improve-block-uri-autofill branch July 18, 2023 14:25
<data name="NewBlockedURI" xml:space="preserve">
<value>New blocked URI</value>
</data>
<data name="URISaved" xml:space="preserve">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fedemkr Sorry I missed this, looks like URISaved made it in twice (see line 2674 below)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch @mpbw2 , will have a PR ready right away

@fedemkr fedemkr mentioned this pull request Jul 21, 2023
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants