- changed status to resolved
Improve sorting by group
A while a go a sort-index was added to groups in general. The index was used to sort elements in the list of selected list of elements.
The index should also be used to sort the tabs, thats currently not the case. Some of the groups do not need a individual index, but can be sorted by name or abbreviation only. For example the sorting of spell groups by index is
- Spell
- Rituals
- Everything else
- Cantrips
The the groups in the 3rd group can all have the same index and shoud be sorted by name/abbreviation within this group.
It might make sense to sort all lists in the rules store once after the rules have been created. The general order of sorting should be as follows although this will not always be what is needed.
- index
- abbreviation
- name
- ID
Sorting by name after abbreviation is needed because some groups have the same abbreviation but different names, All groups ‘Animistenkräfte' have the abbr ‘Animistenkräfte’ but the names include the type of Animist ('Animistenkräfte (Zauberschmiede)', ‘Animistenkräfte (Tierkrieger)’).
In some cases one would not want to sort by abbreviation first, but by name depending on what ist displayed to the user. In these cases it would still make sense to have a default sorting as described above as it prevents elements from being ‘sorted’ randomly in other places and a explicit call to the correct sort function would be needed anyway, no matter if the elements are unsorted or sorted the wrong way.
Comments (1)
-
reporter - Log in to comment
Resolved in commit 6a1dc35
The elements are now sorted by default like this.