chrisbenincasa / teletracker

Apache License 2.0
0 stars 0 forks source link

Ensure lists are presented in a stable sort #814

Open chrisbenincasa opened 3 years ago

chrisbenincasa commented 3 years ago

We should make sure lists are always returned and presented in the same order

Additionally, we should explore sorting lists by "last updated" so that you're most 'interacted with' lists appear at the top when adding new items, etc

markdavella commented 3 years ago

Confirming the sort on lists currently uses the same sortBy on both locations it's present onsite.

e.g.

_.sortBy(
      lists,
      list => (list.createdAt ? -new Date(list.createdAt) : null),
      list => (list.legacyId ? -list.legacyId : null),
      'id',
    );

I checked Add to List Dialog & the Drawer List view. I think that is the only two places we present that list. Once we have a "last updated" from the DB, we can def sort by that instead!