Closed rszwajko closed 6 months ago
Attention: Patch coverage is 31.57895%
with 13 lines
in your changes are missing coverage. Please review.
Project coverage is 42.13%. Comparing base (
b654645
) to head (527d6eb
). Report is 143 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Replace default alphabetical sort order (i.e. a, a11, a2)
with human friendly "natural" sort (i.e. a, a2, a11).
The change applies to all found cases of string sorting.
For convenience the comparator converts all values to strings (with
nulish values being converted to empty string).
In addition, the natural sort with string conversion (universal
comparator) was used as a replacement in sorting hooks. There a general sorting algorithm was implemented with type-specific comparators.
Benefits of universal comparator:
operators
Note that one functional change was introduced in the sorting hook: space removal logic was dropped as it creates visually confusing results for stable sorting.
Resolves: #1796
Reference-Url: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Less_than