atomic-server
atomic-server copied to clipboard
Sorting doesn't work consistently across datatypes
Sorting by string works pretty well, but:
- Boolean sort doesn't work (0 1 0 0)
- resource array is weird (should check length, I think?)
- Integer doesn't work (what?)
- Sorting by relation should sort by URL
Looks like all of this is fixed in #114
Sorting in collections does not work correctly on the following types:
- Integers and floats get sorted alphabetically (
0 > 100 > 15) - Timestamps seem to work fine most of the time but not when old dates are mixed in (
03/01/1970 > 31/05/2023 > 14/03/2023). Maybe these are also sorted alphabetically. - Resource Arrays seem to be sorted only on length but should probably also be sorted alphabetically within each length group (preferably on the Resource title but at the very least on its subject).
I should probably use https://docs.rs/lexical-sort/latest/lexical_sort/ or similar in Atom::to_sortable_string