Re: hierarchical tags aka context

112 views
Skip to first unread message

adamsmith

unread,
Sep 27, 2012, 5:39:13 PM9/27/12
to zoter...@googlegroups.com
I don't make the calls on this type of thing, but it sure looks great to me. It'd be really neat to get this into Zotero.

On Thursday, September 27, 2012 3:04:31 AM UTC-6, Stefanie wrote:

Hi everybody, 

 

this proposal is a response to a feature request for hierarchical tags in the Zotero forum (http://forums.zotero.org/discussion/79/hierarchical-tags/#Item_26). In the course of working on my phd thesis I implemented a feature called context, that is basically similar to hierarchical tags for Zotero. 

 

I added a screenshot of my running system as attachment to describe how the feature has been implemented. 

 

The area marked as 'area 1' in the screenshot shows the additional context tab I added for a particular item: 

  • All contexts for an item are shown. 
  • To make use of the hierarchies and provide additional value, parents, siblings, and children of assigned contexts are shown.  
  • The hierarchies can be built and resolved using drag and drop.  
  • Just as for tags, the number of assigned contexts is shown and new contexts can be added. 
  • Assigned contexts are marked by a green icon in front; contexts only displayed due to their hierarchical relation to an assigned context are displayed with a grey icon in front. 
  • Displayed contexts can easily be assigned to or removed from an item by using the + or - icons at the end of the row. 
  • Renaming the context is possible by (1) clicking on the name of the context or (2) using a right click and selecting 'rename context' from the displayed menu. 
  • Deleting the context (from the whole system) is also possible using a right click and selecting ‘delete context’. 

The area marked as 'area 2' in the screenshot shows the context selector for the system (similar to the tag selector): 

  • All contexts in the system are shown.
  • Hierarchies can be changed.
  • Contexts can be renamed and deleted. 
  • An assignment of contexts to items is however not possible. 
  • The color of the icon in front of a context indicates if the context is assigned to an item. This information is always based on the current selection of items. Therefore starting the program it will usually be based on the whole collection.
  • If tags or collections are selected, the colors of the icons are updated based on the current selection. 
  • By clicking on an icon the context is selected as filter for items displayed in the main windows (just as for tags). 

Contexts are of course also available through search and as search condition. So far, there are however no general settings for contexts available for configuration throughout the system settings menu.

 

I hope this description delivers a good overview of the additional functionality I implemented.

If there is interest in adding this functionality to Zotero, I will be pleased provide a pull request with my source code. I understand that what happens next is, though, strongly depending on the quality and alignment of the source code I can provide. However, I’d appreciate a short feedback in advance.

 

Thanks, Stefanie

 

Aurimas Vinckevicius

unread,
Sep 27, 2012, 6:14:33 PM9/27/12
to zoter...@googlegroups.com
So besides the hierarchical ordering, is there any distinction between context and tag? I don't see this happening in addition to tags, but the hierarchical ordering code could be applied to tags.

An assignment of contexts to items is however not possible.
This is somewhat confusing to me. How does a context get assigned to an item?


--
You received this message because you are subscribed to the Google Groups "zotero-dev" group.
To view this discussion on the web visit https://groups.google.com/d/msg/zotero-dev/-/gMomXYMaHuYJ.

To post to this group, send email to zoter...@googlegroups.com.
To unsubscribe from this group, send email to zotero-dev+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/zotero-dev?hl=en.

adamsmith

unread,
Sep 27, 2012, 7:29:25 PM9/27/12
to zoter...@googlegroups.com, aurim...@gmail.com

An assignment of contexts to items is however not possible.
This is somewhat confusing to me. How does a context get assigned to an item?

Think of contexts as an ordering mode of tags. You can assign tags to a context. All items belonging to that tag will than also be part of the context.
I think that's quite nice conceptually.

 

Stefanie

unread,
Sep 28, 2012, 6:47:47 AM9/28/12
to zoter...@googlegroups.com, aurim...@gmail.com
Thanks for your feedback so far! 


So besides the hierarchical ordering, is there any distinction between context and tag? I don't see this happening in addition to tags, but the hierarchical ordering code could be applied to tags.

Basically the hierarchies are the additional benefit - together with the navigational possibilities they bring along. 
In my personal opinion, in particular in a learning context, it is useful to differentiate between hierarchical and non-hierarchical additional information (that is tags and context). Tags can be used for more general (learning) references such as singular personal anchors, whereas context can be used to assign hierarchical information such as spatial references, learning context, or other. 
 
An assignment of contexts to items is however not possible.
This is somewhat confusing to me. How does a context get assigned to an item?

A context can be assigned to an item using the tab in 'area 1'. 
The statement 'An assignment of contexts to items is however not possible.' refers to the functional description of the context selector in 'area 2'. 

Stefanie

Stefanie

unread,
Sep 28, 2012, 6:49:13 AM9/28/12
to zoter...@googlegroups.com, aurim...@gmail.com
PS: Adam's suggestion is actually a nice one and worth considering. So far, this is actually not how it works and contexts need to be assigned separately from tags. 

Aurimas Vinckevicius

unread,
Sep 27, 2012, 9:40:37 PM9/27/12
to zoter...@googlegroups.com
If contexts are merely a "folder" or "collection" for tags and cannot be assigned directly to items, then I do not understand the purpose of the additional tab in Area 1. It seems to me that the only way to get something added to that tab would be by first assigning a tag to the item in the tags tab. Then the only thing that could be done in the Context tab would be to remove a certain tag, which can already be done in the tags tab.

Here's another question. Can a single tag belong to more than one context? If so, assigning a tag, would assign both contexts to the item, which may or may not be correct and/or desired.


From my point of view, tags should be nested within other tags and any level of the hierarchy should be assignable to an item. For example I might want to assign "Programming/Languages" to an item that compares multiple programming languages, but "Programming/Languages/C++" to an article discussing C++.

I imagine that when you go to assign a tag on the tags tab, you start typing and you get suggestions from multiple levels of the hierarchy. For instance when you start typing "P", you should get suggestions for "Programming" and "Programming/Languages/Pascal". This would allow for a fairly quick assignment of deeply nested tags. We'd have to figure out how to prevent parent-child separator from clashing with characters within current tags. I have some ideas.

I think tag display should be able to toggle between flat and tree view. Tree view takes up a lot of space, so perhaps we could move tags to a different tab on the left pane. Have a Collections tab and Tags tab. While I know that this sort of change will receive a good amount of resistance, I think tree view would be a great way to organize tags themselves by moving them within the hierarchy.


I was looking around on the forums for some concrete use cases for the hierarchical tag system:

http://forums.zotero.org/discussion/79/hierarchical-tags/#Item_5
http://forums.zotero.org/discussion/700/equivalence-of-collections-and-tags/#Item_1
http://forums.zotero.org/discussion/700/equivalence-of-collections-and-tags/#Item_12

There are some other examples.

From reading the discussions, the requirements of this system would be as follows:
  1. Multiple levels of nesting
  2. Ability to search by any level of the hierarchy
  3. Easy tagging

From the example given with contexts, it's hard to say if contexts can be nested or whether this system provides only a single level to the hierarchy. If I'm understanding the description correctly, nesting is possible

From the description, searching by context is possible, so that satisfies (2).

I'm not so sure about (3). If we're just assigning tags, then it's simple. If tags are allowed in multiple contexts, then that might introduce problems. You may want to indicate which context you want the item to have.

I don't see much distinction between tags and contexts besides not being able to assign contexts to items.


Finally, I just want to say that with introduction of hierarchical tagging system, there remains very little distinction between tags and collections. I don't mean to say that this is a bad thing. I think it's great that Zotero introduces two dimensions to organize items. I, for instance, use collections to organize items based on the project I am working on. Tags are for subjects that span multiple projects or topics. For instance I would use tags to label an item as "protocol". What I do want to suggest, however, is that perhaps we should think of these two systems as practically equivalent and try to synchronize the features between them. With many questions being asked about finding the collections that an item belongs to, I've started thinking about adding a tab to the right item pane that would display a list of collections the item is assigned to. This would be a direct parallel to the tag tab.
To view this discussion on the web visit https://groups.google.com/d/msg/zotero-dev/-/uu4gYc8wH_QJ.

Stefanie

unread,
Sep 28, 2012, 11:34:23 AM9/28/12
to zoter...@googlegroups.com, aurim...@gmail.com

If contexts are merely a "folder" or "collection" for tags and cannot be assigned directly to items, then I do not understand the purpose of the additional tab in Area 1. It seems to me that the only way to get something added to that tab would be by first assigning a tag to the item in the tags tab. Then the only thing that could be done in the Context tab would be to remove a certain tag, which can already be done in the tags tab.
 
Sorry, obviously I did not manage to make an important point clear: contexts are not connected to tags. Both are completely interdependent concepts. 

 
From my point of view, tags should be nested within other tags and any level of the hierarchy should be assignable to an item. For example I might want to assign "Programming/Languages" to an item that compares multiple programming languages, but "Programming/Languages/C++" to an article discussing C++.

That is exactly how it works! 
 

I imagine that when you go to assign a tag on the tags tab, you start typing and you get suggestions from multiple levels of the hierarchy. For instance when you start typing "P", you should get suggestions for "Programming" and "Programming/Languages/Pascal". This would allow for a fairly quick assignment of deeply nested tags. We'd have to figure out how to prevent parent-child separator from clashing with characters within current tags. I have some ideas.

That would, indeed, be a necessary improvement. 
So far, I did however not manage to implement this feature since it is quite tricky for xul trees (which are the technical realisation of contexts). 



I think tag display should be able to toggle between flat and tree view. Tree view takes up a lot of space, so perhaps we could move tags to a different tab on the left pane. Have a Collections tab and Tags tab. While I know that this sort of change will receive a good amount of resistance, I think tree view would be a great way to organize tags themselves by moving them within the hierarchy.


I was looking around on the forums for some concrete use cases for the hierarchical tag system:

http://forums.zotero.org/discussion/79/hierarchical-tags/#Item_5
http://forums.zotero.org/discussion/700/equivalence-of-collections-and-tags/#Item_1
http://forums.zotero.org/discussion/700/equivalence-of-collections-and-tags/#Item_12

There are some other examples.

From reading the discussions, the requirements of this system would be as follows:
  1. Multiple levels of nesting
  2. Ability to search by any level of the hierarchy
  3. Easy tagging

From the example given with contexts, it's hard to say if contexts can be nested or whether this system provides only a single level to the hierarchy. If I'm understanding the description correctly, nesting is possible

From the description, searching by context is possible, so that satisfies (2).

I'm not so sure about (3). If we're just assigning tags, then it's simple. If tags are allowed in multiple contexts, then that might introduce problems. You may want to indicate which context you want the item to have.

In my opinion all of this works with the proposed context component. 
 

I don't see much distinction between tags and contexts besides not being able to assign contexts to items.


Point understood and taken ;-). 
 
Finally, I just want to say that with introduction of hierarchical tagging system, there remains very little distinction between tags and collections. I don't mean to say that this is a bad thing. I think it's great that Zotero introduces two dimensions to organize items. I, for instance, use collections to organize items based on the project I am working on. Tags are for subjects that span multiple projects or topics. For instance I would use tags to label an item as "protocol". What I do want to suggest, however, is that perhaps we should think of these two systems as practically equivalent and try to synchronize the features between them. With many questions being asked about finding the collections that an item belongs to, I've started thinking about adding a tab to the right item pane that would display a list of collections the item is assigned to. This would be a direct parallel to the tag tab.
 
To me a collection is different organizing component on an independent level; also because it can be shared and worked on together. 
But this might, of course, just be a personal matter of organizing things. 


Is providing a pull request still something anyone will benefit from? Or is it best to just leave things the way they are? 

Thanks again for all your suggestions and feedback! 
Stefanie 

Stefanie

unread,
Oct 23, 2012, 7:16:59 AM10/23/12
to zoter...@googlegroups.com
Hi everyone, 

I don't want to reopen the discussion on hierarchical tags...
... however for those I attached the xpi including my implementation of hierarchical tags aka context for testing. 

I recommend using an additional Firefox profile for testing the plugin. Language files are included for English and German. 
Due to the changed data structure you have to make sure that the auto update is disabled for the Zotero plugin. Otherwise the 3.0.8 Zotero update crashes the installation. 

If anyone is interested, I can also provide the code for the Standalone version. 

The implementation also includes a translator for Moodle pages. 

Regards, 
Stefanie

zotero-3.0.7.xpi

Maria _10

unread,
Mar 2, 2017, 4:11:04 PM3/2/17
to zotero-dev, stefani...@gmail.com
Hi,

I'm new to Zotero and have just been exploring the latest stable version (4.0) and the beta version (5.0) as well. I'm also interested in hierarchical tagging. I've been looking at the documentation and searching the web for ways to do this in Zotero. However, I have not found one so far. But, maybe I'm just missing something. Is this feature now included in the latest or beta version? If not, does anyone know if there is a plan for supporting this feature?

Thanks,
Maria

Bruce D'Arcus

unread,
Mar 3, 2017, 6:45:49 AM3/3/17
to zotero-dev, stefani...@gmail.com

Haven't followed this, but FWIW, Adobe Lightroom has a simple, well-implemented, hierarchical tags UI.


--
You received this message because you are subscribed to the Google Groups "zotero-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zotero-dev+...@googlegroups.com.

To post to this group, send email to zoter...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages