View Single Post
Old 10-10-2023, 06:25 PM   #1
kjdavies
Zealot
kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.
 
Posts: 112
Karma: 53342
Join Date: Jun 2013
Device: Sony PRS-600
Sorting hierarchical tags

I love that the tag browser supports hierarchical tags. Tags make it much easier for me to organize my books, and hierarchical tags make it much easier for me to organize my tags.

I notice that the tags/categories appear to be sorted before adding to the tag browser. On the face of it I think this is a sound design decision... but I see a possible improvement.

Hierarchical tags use the period ('.', 0x2e) as the level delimiter. This character is almost immediately before the digit characters (0 is 0x30) and after many other characters such as space (' ', 0x20), hyphen ('-', 0x2d), and comma (',', 0x2c). This means when my library has 'RPG.D&D', 'RPG.Pathfinder', 'RPG unsorted', and 'RPG-new', they show up in the following order:
  • RPG unsorted
  • RPG-new
  • RPG
    • D&D
    • Pathfinder

I suggest, before sorting the strings, replacing '.' (0x2e) with tab (0x09 -- which does not appear in tag text as best I can see). Then split on tab instead of period to populate the tag browser (applying the original strings -- periods rather than tabs -- so the existing tag filtering works). This would cause the tag browser to look like:
  • RPG
    • D&D
    • Pathfinder
  • RPG unsorted
  • RPG-new

I think this is a more obvious and user-friendly layout, in this scenario. In my example I obviously could change the tag strings (replace 'RPG unsorted' and 'RPG-new' with other values), but that approach isn't always available.
kjdavies is offline   Reply With Quote