DavidMStraub / gramps-webapp

Genealogical progressive web app based on Gramps
GNU General Public License v3.0
18 stars 4 forks source link

Sorting by date does not work as expected #2

Closed DavidMStraub closed 5 years ago

DavidMStraub commented 5 years ago

Sorting by data in the events view actually sorts by the date's string representation. This is bad for several reasons:

To solve this, there needs to be

  1. a unique timestamp for each event in the API response (can Gramps do that, actually?)
  2. sorting by the timestamp when actually displaying the date string (can vaadin-grid do that, actually?)
DavidMStraub commented 5 years ago

Turned out to be trivial thanks to Gramps' DateObject.get_sort_value().

Implemented in 0c68234ed02098fff85ab7b1b424591b14b14cfd and https://github.com/DavidMStraub/gramps-webapp-frontend/commit/48c21774722e01e56a6a7afb40917aecc272b24c for the events view (not yet family and person views).