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

Closed
opened 2026-05-01 15:36:52 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/2616
Author: @fedemkr
Created: 7/13/2023
Status: Merged
Merged: 7/18/2023
Merged by: @fedemkr

Base: masterHead: vault/pm-2320/improve-block-uri-autofill


📝 Commits (6)

  • 75609dc PM-2320 Added new view for block autofill URIs on Android
  • cb12d85 Merge branch 'master' into vault/pm-2320/improve-block-uri-autofill
  • d543b33 PM-2320 Fix formatting
  • c99579c PM-2320 Improved validations on block autofill uris
  • 7dbc074 Merge branch 'master' into vault/pm-2320/improve-block-uri-autofill
  • e398279 PM-2320 Improved autofill block uris placeholder colors on different themes

📊 Changes

21 files changed (+783 additions, -100 deletions)

View changed files

📝 src/Android/Android.csproj (+12 -0)
📝 src/Android/Renderers/CustomLabelRenderer.cs (+18 -6)
src/Android/Resources/drawable/empty_uris_placeholder.xml (+35 -0)
src/Android/Resources/drawable/empty_uris_placeholder_dark.xml (+35 -0)
src/Android/Resources/layout/validatable_input_dialog_layout.xml (+27 -0)
📝 src/Android/Resources/values/dimens.xml (+3 -0)
📝 src/Android/Services/DeviceActionService.cs (+92 -4)
📝 src/App/Abstractions/IDeviceActionService.cs (+2 -0)
📝 src/App/App.csproj (+2 -0)
📝 src/App/Controls/CustomLabel.cs (+3 -3)
src/App/Pages/Settings/BlockAutofillUrisPage.xaml (+85 -0)
src/App/Pages/Settings/BlockAutofillUrisPage.xaml.cs (+44 -0)
src/App/Pages/Settings/BlockAutofillUrisPageViewModel.cs (+186 -0)
📝 src/App/Pages/Settings/OptionsPage.xaml (+7 -15)
📝 src/App/Pages/Settings/OptionsPage.xaml.cs (+1 -14)
📝 src/App/Pages/Settings/OptionsPageViewModel.cs (+8 -46)
📝 src/App/Resources/AppResources.Designer.cs (+126 -9)
📝 src/App/Resources/AppResources.resx (+46 -3)
📝 src/App/Styles/Base.xaml (+16 -0)
src/App/Utilities/Prompts/ValidatablePromptConfig.cs (+29 -0)

...and 1 more files

📄 Description

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

🔄 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/2616 **Author:** [@fedemkr](https://github.com/fedemkr) **Created:** 7/13/2023 **Status:** ✅ Merged **Merged:** 7/18/2023 **Merged by:** [@fedemkr](https://github.com/fedemkr) **Base:** `master` ← **Head:** `vault/pm-2320/improve-block-uri-autofill` --- ### 📝 Commits (6) - [`75609dc`](https://github.com/bitwarden/android/commit/75609dc2f2a87e67f39e33691588d0de420cdda2) PM-2320 Added new view for block autofill URIs on Android - [`cb12d85`](https://github.com/bitwarden/android/commit/cb12d85d4dabe8f626998f823b6b1efd8ac8e376) Merge branch 'master' into vault/pm-2320/improve-block-uri-autofill - [`d543b33`](https://github.com/bitwarden/android/commit/d543b33e61b004786e72b4386e42790a8b6c2294) PM-2320 Fix formatting - [`c99579c`](https://github.com/bitwarden/android/commit/c99579c5680eb02a1478304e0d7d820260c082fb) PM-2320 Improved validations on block autofill uris - [`7dbc074`](https://github.com/bitwarden/android/commit/7dbc0749c4e3e4f01bf7d9f0d9ee57851649be66) Merge branch 'master' into vault/pm-2320/improve-block-uri-autofill - [`e398279`](https://github.com/bitwarden/android/commit/e3982797947dd91dff17cbcfe3f67c9971e16232) PM-2320 Improved autofill block uris placeholder colors on different themes ### 📊 Changes **21 files changed** (+783 additions, -100 deletions) <details> <summary>View changed files</summary> 📝 `src/Android/Android.csproj` (+12 -0) 📝 `src/Android/Renderers/CustomLabelRenderer.cs` (+18 -6) ➕ `src/Android/Resources/drawable/empty_uris_placeholder.xml` (+35 -0) ➕ `src/Android/Resources/drawable/empty_uris_placeholder_dark.xml` (+35 -0) ➕ `src/Android/Resources/layout/validatable_input_dialog_layout.xml` (+27 -0) 📝 `src/Android/Resources/values/dimens.xml` (+3 -0) 📝 `src/Android/Services/DeviceActionService.cs` (+92 -4) 📝 `src/App/Abstractions/IDeviceActionService.cs` (+2 -0) 📝 `src/App/App.csproj` (+2 -0) 📝 `src/App/Controls/CustomLabel.cs` (+3 -3) ➕ `src/App/Pages/Settings/BlockAutofillUrisPage.xaml` (+85 -0) ➕ `src/App/Pages/Settings/BlockAutofillUrisPage.xaml.cs` (+44 -0) ➕ `src/App/Pages/Settings/BlockAutofillUrisPageViewModel.cs` (+186 -0) 📝 `src/App/Pages/Settings/OptionsPage.xaml` (+7 -15) 📝 `src/App/Pages/Settings/OptionsPage.xaml.cs` (+1 -14) 📝 `src/App/Pages/Settings/OptionsPageViewModel.cs` (+8 -46) 📝 `src/App/Resources/AppResources.Designer.cs` (+126 -9) 📝 `src/App/Resources/AppResources.resx` (+46 -3) 📝 `src/App/Styles/Base.xaml` (+16 -0) ➕ `src/App/Utilities/Prompts/ValidatablePromptConfig.cs` (+29 -0) _...and 1 more files_ </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--> Improve current way to block Auto-fill URIs. This is an Android feature. ## 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--> * **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 <!--Required for any UI changes. Delete if not applicable--> ### Options Block autofill light <img width="314" alt="Options Block autofill light" src="https://github.com/bitwarden/mobile/assets/15682323/0da929c3-cf22-467f-80a1-06be59779353"> ### Options Block autofill dark <img width="314" alt="Options Block autofill dark" src="https://github.com/bitwarden/mobile/assets/15682323/4ca32460-4323-4239-b360-f1ef3ffaf397"> ### Block autofill empty light <img width="314" alt="Block autofill empty light" src="https://github.com/bitwarden/mobile/assets/15682323/95dacda8-6b57-4ed1-9ee1-c84d5584eefe"> ### Block autofill empty dark <img width="314" alt="Block autofill empty dark" src="https://github.com/bitwarden/mobile/assets/15682323/e1cf5fef-25b5-4976-bb39-bca850b92b3c"> ### Block autofill multiple items light <img width="314" alt="Block autofill multiple items light" src="https://github.com/bitwarden/mobile/assets/15682323/9f8bce05-950c-4848-a455-04a64d77690e"> ### Block autofill multiple items dark <img width="314" alt="Block autofill multiple items dark" src="https://github.com/bitwarden/mobile/assets/15682323/c99cbc0c-e101-4959-8484-af87fa724dd9"> ### Block autofill new uri <img width="314" alt="Block autofill new uri" src="https://github.com/bitwarden/mobile/assets/15682323/7c5f3123-833d-483d-a3c6-08b364e78e55"> ### Block autofill new uri error <img width="314" alt="Block autofill new uri error" src="https://github.com/bitwarden/mobile/assets/15682323/d8a1a07d-28b3-43b4-a8be-0a3753a577f9"> ### Block Autofill edit uri <img width="314" alt="Block Autofill edit uri" src="https://github.com/bitwarden/mobile/assets/15682323/c917ad8b-b7ce-46b5-85f4-310595699308"> ## 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 2026-05-01 15:36:52 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#51899