mobile icon indicating copy to clipboard operation
mobile copied to clipboard

[PS-1352] Fix ignore diacritics in search

Open noncenz opened this issue 2 years ago • 1 comments

This change updates the search function to ignore diacritical marks in search results. Marks are stripped from both the search input and results.

Type of change

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

Objective

Fixes #2008

Search results should match on base characters, ignoring any accents or other glyphs applied to the search term or the stored data.

Code changes

/src/Core/Utilities/StringExtensions.cs - Added new file to contain String extension to normalize strings by removing diacritics.

/src/Core/Services/SerachService.cs - Applied String extension to search term, item name and item subtitle.

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)
  • [ ] This change requires a documentation update (notify the documentation team)
  • [ ] This change has particular deployment requirements (notify the DevOps team)

noncenz avatar Aug 22 '22 20:08 noncenz

Thank you for your contribution! We've added this to our internal Community PR board for review. ID: PS-1352

bitwarden-bot avatar Aug 22 '22 20:08 bitwarden-bot

Thank you for your contribution! We've added this to our internal Community PR board for review. ID: PS-1352

CLA assistant check
All committers have signed the CLA.

@noncenz thank you for your contribution. Your work is good to go. I've decided to just clean up the dev logging and add a validation. This will be included in a future mobile release.

aj-rosado avatar Jan 03 '23 11:01 aj-rosado