[PR #5574] [MERGED] [PM-23723] URI Matching detection layout updates on advanced options #5879

Closed
opened 2025-11-27 00:16:10 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/5574
Author: @aj-rosado
Created: 7/24/2025
Status: Merged
Merged: 8/13/2025
Merged by: @aj-rosado

Base: mainHead: PM-23723/autofill-settings-advanced-matching-layout


📝 Commits (10+)

  • 53d14ee Added section on UriMatchType dialog
  • ae11e91 added warning for advanced match selection on AutoFillScreen
  • 07d4611 added navigation to more about match detection uri
  • 8eae459 Added extra info on supporting text for match detection on autofill screen
  • 7968073 Added advanced options headed and warning for the MatchDetection on the VaultAddEditItem
  • 8b9b265 Added default uri match type information to the MatchType selection dialog on AddEdit item
  • 523a30f Merge branch 'main' into PM-23723/autofill-settings-advanced-matching-layout
  • 79ce952 Merge branch 'main' into PM-23723/autofill-settings-advanced-matching-layout
  • 5d7e4ae Improved code readability
  • 13d9c4d Removed link from match detection warning dialog

📊 Changes

18 files changed (+875 additions, -45 deletions)

View changed files

📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/platform/feature/settings/autofill/AutoFillScreen.kt (+205 -11)
📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/platform/feature/settings/autofill/AutoFillViewModel.kt (+15 -0)
📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/platform/feature/settings/autofill/handlers/AutoFillHandlers.kt (+2 -0)
📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/platform/feature/settings/autofill/util/UriMatchTypeExtensions.kt (+12 -0)
📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/addedit/VaultAddEditItemContent.kt (+3 -0)
📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/addedit/VaultAddEditLoginItems.kt (+4 -0)
📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/addedit/VaultAddEditScreen.kt (+5 -0)
📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/addedit/VaultAddEditUriItem.kt (+187 -17)
📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/addedit/VaultAddEditViewModel.kt (+21 -0)
📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/addedit/handlers/VaultAddEditLoginTypeHandlers.kt (+6 -0)
📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/addedit/model/UriMatchDisplayType.kt (+8 -14)
📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/addedit/util/UriMatchDisplayTypeUtil.kt (+30 -0)
📝 app/src/test/kotlin/com/x8bit/bitwarden/ui/platform/feature/settings/autofill/AutoFillScreenTest.kt (+111 -0)
📝 app/src/test/kotlin/com/x8bit/bitwarden/ui/platform/feature/settings/autofill/AutoFillViewModelTest.kt (+13 -0)
📝 app/src/test/kotlin/com/x8bit/bitwarden/ui/platform/feature/settings/autofill/util/UriMatchTypeExtensionsTest.kt (+28 -0)
📝 app/src/test/kotlin/com/x8bit/bitwarden/ui/vault/feature/addedit/VaultAddEditScreenTest.kt (+196 -1)
📝 app/src/test/kotlin/com/x8bit/bitwarden/ui/vault/feature/addedit/VaultAddEditViewModelTest.kt (+18 -0)
📝 ui/src/main/res/values/strings.xml (+11 -2)

📄 Description

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-23723

📔 Objective

Changes on layouts to warn the users of the risks when selecting "regular expression" or "starts with" option.

BitwardenMultiSelectButton:

  • Added capability to have a sub section
  • Changed supporting text to be annotated text in order to support bolded text and updated calls to it
  • Created a new method for the Dialog content, as it can be reused by AddEditScreen ( should this have its own class?)

AutoFillScreen:

  • Using the new sub section from BitwardenMultiSelectButton for the Uri Match dialog
  • Added a new warning dialog that shows up when the user selects one of the "advanced type" (Regular expression or Start With) from the Match type selection dialog.
  • The new warning dialog should only proceed with the change if the user confirms
  • Passing an annotated string with an link for the Uri Match Detection helpcenter page on the BitwardenTwoButtonDialog
  • Added new event to navigate to the Uri Match Detection helpcenter page
  • Updated supporting text on the UriMatchSelectionButton to have a warning message when an advanced type is selected

UriMatchTypeExtensions:

  • Added method to verify if that MatchType is of an "advanced type" (Regular expression or Start With)

BitwardenTwoButtonDialog:

  • Added capability to receive an annotated string as title or message. Created new method for this effect as it had multiple calls, should change to make this be similar to BitwardenMultiSelectButton (or the other way around)

AutoFillViewModel:

  • Added a new MoreAboutMatchDetection Action that sends the NavigateToMatchDetectionInfo event

AutoFillHandlers:

  • Handler for MoreAboutMatchDetectionClick that tries to send the MoreAboutMatchDetection action

AddEditUriItem:

  • Using the BitwardenMultiSelectDialog to display the Match Detection Dialog content
  • Added the Warning Dialog like on AutoFillScreen:

UriMatchDisplayTypeUtil:

  • Added method to verify if that UriMatchDisplayType is of an "advanced type" (Regular expression or Start With)
  • Added method to build the DisplayLabel for UriMatchDisplayType in order to allow extra info on the Text

VaultAddEditViewModel:

  • Passing the default uri match type on the State not sure if there is a better place to put this as it only affects Logins, although this looked like where made more sense to me.

📸 Screenshots

New

new Add edit displaying warning for regular expression new Add edit displaying warning for starts with new Add edit displaying URI match selector options new Autofill settings screen are you sure to use regex dialog are you sure to use starts with dialog keep your credential secure dialog

Old

Old Add edit displaying URI match selector options old Autofill settings screen old Autofill settings URI match selector options

Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

🔄 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/5574 **Author:** [@aj-rosado](https://github.com/aj-rosado) **Created:** 7/24/2025 **Status:** ✅ Merged **Merged:** 8/13/2025 **Merged by:** [@aj-rosado](https://github.com/aj-rosado) **Base:** `main` ← **Head:** `PM-23723/autofill-settings-advanced-matching-layout` --- ### 📝 Commits (10+) - [`53d14ee`](https://github.com/bitwarden/android/commit/53d14ee0fa49b4e8f542f76a758d473819ed3e33) Added section on UriMatchType dialog - [`ae11e91`](https://github.com/bitwarden/android/commit/ae11e9193d384aa20f3291b90fc088e192800ec5) added warning for advanced match selection on AutoFillScreen - [`07d4611`](https://github.com/bitwarden/android/commit/07d4611046e2e0b195cbed1fc25f1b7cae462182) added navigation to more about match detection uri - [`8eae459`](https://github.com/bitwarden/android/commit/8eae459c2e6efc8861f4683faa9943c89517fb46) Added extra info on supporting text for match detection on autofill screen - [`7968073`](https://github.com/bitwarden/android/commit/79680737c89749703d699e04f3616ca019d6cf69) Added advanced options headed and warning for the MatchDetection on the VaultAddEditItem - [`8b9b265`](https://github.com/bitwarden/android/commit/8b9b2651b49a5eba8f76f045e3dd551d7a72f9d6) Added default uri match type information to the MatchType selection dialog on AddEdit item - [`523a30f`](https://github.com/bitwarden/android/commit/523a30f6ebe299696d8395077da8cf35adbe283f) Merge branch 'main' into PM-23723/autofill-settings-advanced-matching-layout - [`79ce952`](https://github.com/bitwarden/android/commit/79ce952bb6ff880d05ef0d2232c04c3e8e47d3c0) Merge branch 'main' into PM-23723/autofill-settings-advanced-matching-layout - [`5d7e4ae`](https://github.com/bitwarden/android/commit/5d7e4ae417061f8eb1e3510e77d0313337333c78) Improved code readability - [`13d9c4d`](https://github.com/bitwarden/android/commit/13d9c4d1a87a02ca4ab9b31c42a4bf1e5b3e0bb7) Removed link from match detection warning dialog ### 📊 Changes **18 files changed** (+875 additions, -45 deletions) <details> <summary>View changed files</summary> 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/platform/feature/settings/autofill/AutoFillScreen.kt` (+205 -11) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/platform/feature/settings/autofill/AutoFillViewModel.kt` (+15 -0) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/platform/feature/settings/autofill/handlers/AutoFillHandlers.kt` (+2 -0) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/platform/feature/settings/autofill/util/UriMatchTypeExtensions.kt` (+12 -0) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/addedit/VaultAddEditItemContent.kt` (+3 -0) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/addedit/VaultAddEditLoginItems.kt` (+4 -0) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/addedit/VaultAddEditScreen.kt` (+5 -0) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/addedit/VaultAddEditUriItem.kt` (+187 -17) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/addedit/VaultAddEditViewModel.kt` (+21 -0) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/addedit/handlers/VaultAddEditLoginTypeHandlers.kt` (+6 -0) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/addedit/model/UriMatchDisplayType.kt` (+8 -14) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/addedit/util/UriMatchDisplayTypeUtil.kt` (+30 -0) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/ui/platform/feature/settings/autofill/AutoFillScreenTest.kt` (+111 -0) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/ui/platform/feature/settings/autofill/AutoFillViewModelTest.kt` (+13 -0) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/ui/platform/feature/settings/autofill/util/UriMatchTypeExtensionsTest.kt` (+28 -0) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/ui/vault/feature/addedit/VaultAddEditScreenTest.kt` (+196 -1) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/ui/vault/feature/addedit/VaultAddEditViewModelTest.kt` (+18 -0) 📝 `ui/src/main/res/values/strings.xml` (+11 -2) </details> ### 📄 Description ## 🎟️ Tracking https://bitwarden.atlassian.net/browse/PM-23723 ## 📔 Objective Changes on layouts to warn the users of the risks when selecting "regular expression" or "starts with" option. **BitwardenMultiSelectButton:** - Added capability to have a sub section - Changed supporting text to be annotated text in order to support bolded text and updated calls to it - Created a new method for the Dialog content, as it can be reused by AddEditScreen (❓ should this have its own class?) - **AutoFillScreen:** - Using the new sub section from BitwardenMultiSelectButton for the Uri Match dialog - Added a new warning dialog that shows up when the user selects one of the "advanced type" (Regular expression or Start With) from the Match type selection dialog. - The new warning dialog should only proceed with the change if the user confirms - Passing an annotated string with an link for the Uri Match Detection helpcenter page on the BitwardenTwoButtonDialog - Added new event to navigate to the Uri Match Detection helpcenter page - Updated supporting text on the UriMatchSelectionButton to have a warning message when an advanced type is selected **UriMatchTypeExtensions:** - Added method to verify if that MatchType is of an "advanced type" (Regular expression or Start With) **BitwardenTwoButtonDialog:** - Added capability to receive an annotated string as title or message. Created new method for this effect as it had multiple calls,❓ should change to make this be similar to **BitwardenMultiSelectButton** (or the other way around) **AutoFillViewModel:** - Added a new MoreAboutMatchDetection Action that sends the NavigateToMatchDetectionInfo event **AutoFillHandlers:** - Handler for MoreAboutMatchDetectionClick that tries to send the MoreAboutMatchDetection action **AddEditUriItem:** - Using the BitwardenMultiSelectDialog to display the Match Detection Dialog content - Added the Warning Dialog like on **AutoFillScreen:** **UriMatchDisplayTypeUtil:** - Added method to verify if that UriMatchDisplayType is of an "advanced type" (Regular expression or Start With) - Added method to build the DisplayLabel for UriMatchDisplayType in order to allow extra info on the Text **VaultAddEditViewModel:** - Passing the default uri match type on the State ❓ not sure if there is a better place to put this as it only affects Logins, although this looked like where made more sense to me. ## 📸 Screenshots ### New <img width="314" height="2424" alt="new Add edit displaying warning for regular expression" src="https://github.com/user-attachments/assets/833980b9-41b7-4e3e-ac73-d8b08636e627" /> <img width="314" height="2424" alt="new Add edit displaying warning for starts with" src="https://github.com/user-attachments/assets/55385ebc-90a8-49f0-9e39-e35ef4fee758" /> <img width="314" alt="new Add edit displaying URI match selector options" src="https://github.com/user-attachments/assets/7047934e-1de4-4dae-ae3f-2316e17aad2a" /> <img width="314" alt="new Autofill settings screen" src="https://github.com/user-attachments/assets/dd44a085-eb12-4669-a7f0-11fd8c1ed0c3" /> <img width="314" alt="are you sure to use regex dialog" src="https://github.com/user-attachments/assets/3b6ac3e4-2336-4913-be1e-d57196fc18b1" /> <img width="314" alt="are you sure to use starts with dialog" src="https://github.com/user-attachments/assets/d1201cd2-9249-4774-861f-74a33915d3cf" /> <img width="314" alt="keep your credential secure dialog" src="https://github.com/user-attachments/assets/4d7801a6-e019-4639-8ef4-82bd7d824696" /> ### Old <img width="314" alt="Old Add edit displaying URI match selector options" src="https://github.com/user-attachments/assets/245d6634-bb05-4ff1-a165-573b32ad39e1" /> <img width="314" alt="old Autofill settings screen" src="https://github.com/user-attachments/assets/d204ef06-45f4-456a-893b-c3e89ece70bb" /> <img width="314" alt="old Autofill settings URI match selector options" src="https://github.com/user-attachments/assets/11ea39c1-687a-462c-b00f-1eb62ebf655e" /> ## ⏰ Reminders before review - Contributor guidelines followed - All formatters and local linters executed and passed - Written new unit and / or integration tests where applicable - Protected functional changes with optionality (feature flags) - Used internationalization (i18n) for all UI strings - CI builds passed - Communicated to DevOps any deployment requirements - Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team ## 🦮 Reviewer guidelines <!-- Suggested interactions but feel free to use (or not) as you desire! --> - 👍 (`:+1:`) or similar for great changes - 📝 (`:memo:`) or ℹ️ (`:information_source:`) for notes or general info - ❓ (`:question:`) for questions - 🤔 (`:thinking:`) or 💭 (`:thought_balloon:`) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion - 🎨 (`:art:`) for suggestions / improvements - ❌ (`:x:`) or ⚠️ (`:warning:`) for more significant problems or concerns needing attention - 🌱 (`:seedling:`) or ♻️ (`:recycle:`) for future improvements or indications of technical debt - ⛏ (`:pick:`) for minor or nitpick changes --- <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-27 00:16:10 -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#5879