Feature request: Hierarchical tags 'lite' ?

edited August 9, 2023
Requests for hierarchical tagging have come up regularly since the early days of Zotero (again today). Its continuing absence suggests that it's hard to implement fully and/or has not been requested often enough in relation to other development priorities.

Perhaps it would be useful if proponents of hierarchical tags could write some design notes on how they would like to see it implemented within Zotero. To save Zotero developers having to do all the design work.

When I have thought about this, it has occurred to me that one could implement a form of hierarchical tags within the *current* tag system, perhaps with a few minor Zotero tweaks to ease that process (that would also aid non-hierarchical tag use) - basically hierarchical tags 'lite'. That would *not* involve changing the Zotero database to have intrinsically hierarchical tags (which is possibly that hard part ?). I do admit that I do not work in a field that has an accepted formal hierarchy/ontology. So I don't fully appreciate how such formal systems work in practice. I would be devising my own hierarchical tags for my personal use only.

Some tedium would be involved in entering an entire tags hierarchy into Zotero in the first place. Without a 'built-in' hierarchical tag structure, one would have to type in the full hierarchy (ParentTag - SubTag1 - SubTag2 - SubTag3 etc) for every single new sub-tag. One would have to type in full tags for each of the following for example:
ParentTag1
ParentTag1-SubTag1a
ParentTag1-SubTag1b
ParentTag1-SubTag1a-SubTag2a
ParentTag1-SubTag1b-SubTag2a
ParentTag1-SubTag1b-SubTag2a-SubTag3a
ParentTag1-SubTag1b-SubTag2a-SubTag3b
etc etc
There are already several useful tags addons (zotero-tag, zutilo), but they do not provide hierarchical tags. However zotero-tag does apparently offer tags import from CSV file. A tags hierarchy (with the full typed hierarchy for every single tag as above) could more easily be created in a spreadsheet or text editor, with cut and paste/less typing. And then be imported into Zotero via CSV file. It looks like it would also allow replacement of each tag in an existing non-hierarchical tag set with a hierarchical tag.

One difficulty with the current tags interface is that it is in a small window down in the bottom left corner. And one has to balance the space allocated to tags versus collections; the collections pane is probably prioritized by most people. Somewhat paradoxically, if one turns off the collections pane under View, one also loses the tags pane (but not vice-versa). It would help if the tags pane could occupy the whole left pane at times. And show the tags list one-line-per-tag if desired.

When adding tags to an item under the Tags tab, some aspects of the existing automatic drop-down list tag lookup would work quite well with hierarchical tags. For example, as soon as you type the parent tag in a hierarchy, every tag under that parent tag would appear as suggestions in the drop-down list. But then selecting more than one tag in a hierarchy at once is not currently possible (maybe the left tags pane is the best way to do this). And if instead you start to type in a sub-tag that exists under/within a parent tag, its full hierarchical tag would not appear in the list. So auto tag searching would need to search for sub-tag text under/within other tags (the search bar in the left tags pane already works in that way). Also, the width of the drop-down list would be insufficient for long hierarchical tags (auto left-expansion of long tags in the drop-drop down list would deal with this).

Dragging an item (or multiple items) to a single tag in the left pane of course already works. The ability to apply multiple tags at once would be good, which would perhaps best work by adding the ability to drag selected tags onto an item. 'Inheritance' of higher-level tags when a sub-tag is assigned would perhaps be hard to make automatic - you would need to select tags at all levels of a single tag's hierarchy if that's what you really want to assign (with the downside of some tag redundancy, or tag 'bloat'). In any case, ctrl-click selection of tags in the left tags pane for dragging onto an item would facilitate those assignments.

So in summary, tweaks for hierarchical tags 'lite' (and tag use in general) would be:
- enhanced Tags pane layout options (full pane, one line per tag option)
- same tags search functionality under the Tags tab as already in the Tags pane search bar (embedded text search)
- auto left-expansion of Tags tab drop-down search list for long tags
- enhanced two-way tags<->items dragging to/from left tags pane
- probably a few other useful tweaks I haven't thought of ;)
Sign In or Register to comment.