atomic-server icon indicating copy to clipboard operation
atomic-server copied to clipboard

Sorting doesn't work consistently across datatypes

Open joepio opened this issue 4 years ago • 3 comments

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

joepio avatar Jun 27 '21 08:06 joepio

Looks like all of this is fixed in #114

joepio avatar Mar 23 '22 21:03 joepio

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).

Polleps avatar Jun 26 '23 11:06 Polleps

I should probably use https://docs.rs/lexical-sort/latest/lexical_sort/ or similar in Atom::to_sortable_string

joepio avatar Jan 08 '24 11:01 joepio