bitwarden / authenticator-android

Bitwarden Authenticator mobile app for Android.
https://bitwarden.com
GNU General Public License v3.0
354 stars 24 forks source link

[BWA-65] Sort items alphabetically with special char precedence #190

Closed SaintPatrck closed 1 month ago

SaintPatrck commented 1 month ago

๐ŸŽŸ๏ธ Tracking

https://bitwarden.atlassian.net/browse/BWA-65

Closes #167

๐Ÿ“” Objective

Adds a new comparator to sort items alphabetically, giving precedence to special characters over letters and digits. This comparator is used to sort items in the item search screen and the main item listing screen.

The comparator also gives priority to lowercase letters when comparing equal letters (e.g., 'a' comes before 'A').

๐Ÿ“ธ Screenshots

Before After
image image
image image

โฐ Reminders before review

๐Ÿฆฎ Reviewer guidelines

github-actions[bot] commented 1 month ago

Logo Checkmarx One โ€“ Scan Summary & Details โ€“ fcaf5747-af71-40b0-8912-688cc5fd19e3

No New Or Fixed Issues Found

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 74.35897% with 10 lines in your changes missing coverage. Please review.

Project coverage is 6.35%. Comparing base (06d742b) to head (dc2a205). Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...uthenticator/feature/search/ItemSearchViewModel.kt 40.00% 5 Missing and 1 partial :warning:
...atform/util/SpecialCharWithPrecedenceComparator.kt 84.00% 1 Missing and 3 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #190 +/- ## ======================================== + Coverage 2.31% 6.35% +4.03% ======================================== Files 90 92 +2 Lines 4357 4390 +33 Branches 500 513 +13 ======================================== + Hits 101 279 +178 + Misses 4239 4078 -161 - Partials 17 33 +16 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.