Option to disable libraries

It would be nice if libraries could be disabled. A library could be disabled and enabled with the context menu. When disabled, a library would not be available in the word processor plugin and would not be synchronized to Zotero server.

This has at least two use cases

1) I am using a slow internet connection and would like to save bandwidth by synchronizing only the group library that I am using for the paper that I am writing currently.

2) I am writing with a someone else and want to ensure that all the references that we are using in the paper are in the group library that we are using. Currently I must either check each citation manually or use another user account to check the document.

Disabling a library would not have any other effect. That is I would still be able to copy items from a disabled library. Another alternative could be that the disabled library would become read only.
«1
  • I think some version of, at a minimum, restricting the word processor plugin to one library is highly desirable, yes.
  • In my books, disabling syncing would be just a small added bonus. Restricting the word processor plugin is the main deal here.
  • Maybe the insert bar could get an "library" icon on the right end, with a dropdown allowing the user to filter the results by library ("All Libraries", "My Library", "All Group Libraries", "Group Library A", "Group Library B", etc.)?
  • Rintze's suggestion would not really solve the first use case in the initial post. If you want to restrict to using just items from one library when inserting a citation, switching to the classic interface solves the problem. However, it does not solve the problem of ensuring that all citations in a document are using only one library.

    That being said, being able to easily choose the library in the insert bar would be nice.
  • I had some free time today and decided to implement this. You can disable and enable collections so that they are not visible to the word processor plugin.

    http://imageshack.us/photo/my-images/855/screenshot20110827at182.png/
  • That's a good patch, but if this were implemented, that's not the phrasing we would use, nor would that be where it would go. "Enabled"/"Disabled" is way too broad for something specific to word processor plugins that not everyone uses, and, by the same token, they wouldn't belong in the context menu for the library in the main view.

    But to step back a bit, is there really any case for citing from multiple libraries? If not, it should just limit it to whatever library was first used and store that in the document. (This also needs a QuickFormat solution anyway. More on that in http://forums.zotero.org/discussion/19337/)
  • I agree that the terminology could be better and this might not be the best place to put the icons. This was just something that I put together to solve a problem that I face occasionally.

    I do not think that there is a use case where multiple libraries are needed, but there are three related use cases to which this or a similar change would help.

    Case 1) I start writing a paper myself with "My Library" but later decide to invite a coauthor and start using group library instead. In this case I need a way to invalidate all the existing references from my library and restrict using only the group library.

    Case 2) Similar, but instead of my library I am using a group library that I am not allowed to invite new members to

    Case 3) Copy-pasting material from other documents that use a different library

    Locking to a particular library on a document level would be an alternative solution, but being able to change the library that is used is necessary.
  • I gave this a little bit of though and at least for me there is a use case for using several libraries in a single document. For example, we have a group library that contais articles about research method and articles that are quite general to our subject area. This library has around 15 users. When I am writing a paper, I generally use this group library because I do not want to maintain duplicates of those articles that already exist in the group library. However, sometimes I need to cite an article that I know I will cite only once and that no-one else in my research group is interested in. In this case I would like to do this using My Library.

    One way to go with this Enable/Disable library idea is to make a more general implementation. At least these come in mind:
    1) A disabled library would be always collapsed in the user interface and would not show any items inside the library
    2) A disabled library could not be used as a target for drag and drop
    3) Trying to import items into a disabled library would create an error prompt and the item would not be imported
    4) The only context menu item for a disabled library would be "Enable" so that the library must be enabled before any other actions can be done
    5) Items in a disable library would be purged from the Zotero cache to save memory and increase speed
    6) A disabled library would not be synchronized online

    I think that 1-4 would be quite easy to implement. 5 and 6 might not be difficult either, but I have not digged sufficiently deep into the code to know how this would be done.

    Is there something that I might have missed in the list?
  • Implemented 1-4 and posted a patch to the dev-list.
  • Case 1) I start writing a paper myself with "My Library" but later decide to invite a coauthor and start using group library instead. In this case I need a way to invalidate all the existing references from my library and restrict using only the group library.
    Simon can confirm, but I believe the latest version of Zotero and the plugins automatically include URIs for all inter-library-linked items in documents, so I'm not sure this is even much of a problem. And with embedded metadata support in 3.0, it's even less of one.

    As for the general idea of enabling/disabling libraries, I'm not sure it's worth the added complexity, and it's far from a common user request. (I can't recall any other requests for it, though there might have been some.)

    For what it's worth, #6 can't be done until there's per-library syncing.
  • "I'm not sure it's worth the added complexity, and it's far from a common user request. (I can't recall any other requests for it, though there might have been some.)"

    well - this started coming up with the new word processor integration, but both Mark and mronkko independently had very similar suggestions.
  • I mean the notion of enabling/disabling libraries in the main interface as a general feature of Zotero, not for word processor integration.
  • edited August 28, 2011
    Simon can confirm, but I believe the latest version of Zotero and the plugins automatically include URIs for all inter-library-linked items in documents, so I'm not sure this is even much of a problem. And with embedded metadata support in 3.0, it's even less of one.
    Wouldn't the URIs only work if the library was public? Embedded metadata with the 3.0. will help some of these problems, but not all. It would be useful to have a way to enforce that citations in a particular document all come from the same library.

    I thought about implementing this as a feature to the document settings dialog of the word processor plugin, but this has two difficulties

    1) When I send a document that is restricted to a particular library to a colleaque, it is not apparent for him that there is such restriction.

    2) It does not solve the problem of accidentally adding items to wrong library.


    I would like to package my copy of the Zotero source as an xpi so that this can be tested by others as well. However, for some reason the xpi does not work but Firefox tells that it is corrupted.

    Is there anything else that needs to be done to create an xpi from the zotero source besides running this in the root of the local copy

    zip -r ~/Documents/DropBox/Public/zotero-disable-libraries.xpi * --exclude *.svn* --exclude repotime.txt
  • Wouldn't the URIs only work if the library was public?
    Why? URIs in documents aren't related to accessibility via the web. If you drag an item from your personal library to a group library and cite the one from your personal library, anyone who gets the document who's a member of that group library will get the version in the group library, because they'll have all possible URIs (and that's ignoring embedded metadata).

    Obviously at some point we'll need to deal with reconciling different versions of items between libraries, but that's a totally separate issue.
    I would like to package my copy of the Zotero source as an xpi so that this can be tested by others as well.
    You're on your own for that, and I'd discourage it. Screenshots seem perfectly adequate for a feature discussion, and anyone not capable of applying a patch probably shouldn't be installing an unofficial XPI of Zotero.
  • The URIs are not a perfect solution because the items in the different libraries are not necessarily copies, but can be different imports. Also if you have a document with a large number of references, checking that each one of them exists in the group library is frustrating and takes a lot of time.

    On Friday, I spent a considerable amont of time trying to fix a document so that it would work "off the box" for a coauthor. What I ended up doing was to create another user account and sharing one group library with that account and then checking with that account which citations were "broken" and then adding these to the group library using my main account and then using the other account again to refresh the document and replace missing citations. After a couple of iterations, I could use the other account to refresh the document citations.

    This made me thinking that the entire process would be much more simple if I could just disable the libraries that the coauthor does not have access to.

    Here are a couple of screenshots of the disable-enable function:
    http://imageshack.us/photo/my-images/585/screenshot20110828at205.png/
    http://imageshack.us/photo/my-images/18/screenshot20110828at205.png/
  • edited August 28, 2011
    So this is a tricky issue, but here's some quick thoughts:

    As I mentioned on the dev list, I'm not convinced this (the disable library approach) is the best solution to real problems. If we just look at the collaboration scenario, for one thing, we need to consider a wider realm than Zotero. Given that both Zotero and Mendeley are now embedding the same basic metadata in documents, this is not an unreasonable design requirement.

    So then consider the use case of two users collaborating on a document: one with Zotero, and the other with Mendeley.

    Goal: users can add citations within their respective apps without worrying about any permission issues (whether, in Zotero, an item is in a personal library or a private group) and it "just works."

    Issues:

    1) how to avoid duplicates
    2) how to know the correct item

    I have the hunch that the idea of requiring group libraries to do collaboration was a mistake, that if possible should be undone.

    Instead, you just embed the metadata in the document, and allow users receiving that document to import those items if they don't already have it.

    Whether you share those references in a group is a separate matter.

    For possible comparison, here is how an engineer at Mendeley explains their approach:

    https://github.com/citation-style-language/schema/issues/70#issuecomment-1755138

    On conflict resolution point, one thought is you privilege those items that have different created and updated date-times (e.g. they've been edited).
  • I personally like that the group libraries are required for collaboration. I used to have EndNote that used to store the citation data in the document. This had one issue: The citation metadata was read-only for a persons other than the one inserting the citation. I do not know how this is solved in more recent versions of EndNote or the upcoming Zotero, but I much prefer having one source of citation data to a document to the EndNote traveling library approach.

    Another advantage of using group library means that I always have access to PDF files of all the citations. When I combine this with ZoteroQuickLook (dev version) that shows PDFs when I move a cursor over a citation and use a key board shortcut, this makes a very useful feature.


    I agree that there are use cases where not everyone who participates in writing a paper uses Zotero, and for those the approach of storing metadata in the document would be better than having to rely on group libraries. But I see the ability of being able to restrict which libraries are used as complementary to storing metadata in the document. In the ideal world both (or similar) approaches would be available and the user could choose which one he uses.



    The disable library-approach also makes it a bit harder to accidentally import an item to an incorrect library, but this is a less important issue.
  • I have the hunch that the idea of requiring group libraries to do collaboration was a mistake, that if possible should be undone.
    From the 3.0 changelog:
    Documents can now be shared with users of Zotero and other compatible software without using Zotero groups
    Allowing people to import data into Zotero from documents is the obvious next step. It just hasn't happened yet.
  • This had one issue: The citation metadata was read-only for a persons other than the one inserting the citation.
    No reason that has to be the case here though; the idea is not inspired by Endnote, but rather just an analysis of the problem of sharing.

    Aside: I helped design the metadata system that is in ODF 1.2, and one of the use cases was in fact citations. In that case, data would be stored in an RDF graph in the file package. But alas, that's hard to round-trip with Word. The idea here is broadly similar though.

    So, for sake of argument, maybe by default they're always read-write, but that a preference option (embedded in the document) might be able to toggle that?
    But I see the ability of being able to restrict which libraries are used as complementary to storing metadata in the document. In the ideal world both (or similar) approaches would be available and the user could choose which one he uses.
    So I understand better where you're coming from, why do you say this? From my POV, it makes no difference where the data comes from: if I cite it, then it should be available to anyone I'm collaborating with. Moreover, if this was the case, then I can't see any value in restricting "which libraries are used"? You're still forcing users to have to do the mental and organizational work of figuring out the relationships among citation item metadata, libraries, and collaborative documents; work I don't think they should need to do.
  • In my opinion, it should not make a difference where the data comes from either. I agree that in an ideal case, if I cite an item, that item should be available to my coauthors as well. This would include the ability to easily edit the item and to view the PDFs of the item. The implementation of this ideal case might not be possible, though.

    Let me describe how I use Zotero to show why I think that restricting which libaries are used is a good idea. First, do not fix the citation metadata when I import items but only right before submitting a paper. So when I write a paper the last step to do is to go through the reference list and fix the metadata in Zotero. This is typically done by one of the authors for all references regardless of who inserted the references.

    If all the citations were from the same library, fixing metadata is a fairly simple task. Duplicates in different libraries can probably be handled efficiently some time in the future as well so that I just need to locate one copy of an item in any of my libraries and the item is automatically fixed in all libraries.

    A problem arises if an item is not based on any of the items in my Zotero libaries, but metadata stored in the citation field. Because these items are not stored in Zotero, how would I fix it? Editing the items in my Zotero libraries would not cause the metadata to change, so I would need to do something else. EndNote solves this problem by allowing you to import metadata from the document. Then you would edit the citation metadata in the imported copy and replace every copy of the old citation with the new copy. How would I know that I need to do this? Doing this for multiple citations is certainly more trouble than simply disabling the libraries that you do not intent to use to restrict to only using items from a group library.

    Another thing that embedded metadata does not solve is linking from the citations to PDS. We have an unofficial policy that all items in the group library should contain the PDFs. If a coauthor inserts a citation that I am not familiar with, I can use the group library to view the PDFs in a second or two using ZoteroQuickLook. This is because I know that the citation is correctly linked to the group library and the group library will contain the PDF. This video shows what I mean http://www.youtube.com/watch?v=SVe4fKY_Fe4

    Finally, I think that embedded metadata is a much needed feature because it avoids the problem of documents where Zotero does not work because of a missing item. However, I still think that the best way to use Zotero when collaborating with others is to have a group library and using only items from this library when writing.
  • On this (I'll get to the other issues later):
    A problem arises if an item is not based on any of the items in my Zotero libaries, but metadata stored in the citation field. Because these items are not stored in Zotero, how would I fix it? Editing the items in my Zotero libraries would not cause the metadata to change, so I would need to do something else. EndNote solves this problem by allowing you to import metadata from the document. Then you would edit the citation metadata in the imported copy and replace every copy of the old citation with the new copy. How would I know that I need to do this? Doing this for multiple citations is certainly more trouble than simply disabling the libraries that you do not intent to use to restrict to only using items from a group library.
    These are details that are important, but not essential to the basic question of how to address this problem. But ...

    If an item gets imported into my library via a document and I edit that item, then I expect the WP plug-in to overwrite all document citations without my input (maybe with a preference item to prompt me to confirm if I'm worried about this; perhaps the same preference can determine whether item data gets automatically imported, or perhaps it'd be a different preference item).

    So I don't see this as a problem. but all of this would depend on good duplicate handling.
  • edited August 29, 2011
    With very good duplicate handling and automatic import to libraries would address most of the metadata problems. It might be possible to design use cases where this was not the optimal way, but for general use it probably would be a good solution.

    However, this would not address the issue of ensuring that everyone has access to the PDF files used in the document. Also perfect duplicate handling is probably still some time in the future. So there is some value in being able to restrict a document to a particular library.

    I gave some though about this today and would like to return the discussion to Dan's comment:
    But to step back a bit, is there really any case for citing from multiple libraries? If not, it should just limit it to whatever library was first used and store that in the document. (This also needs a QuickFormat solution anyway. More on that in http://forums.zotero.org/discussion/19337/)
    Both of these problems would be solved if it was possible to set a preferred library (or a preferred collection too) to a document using the document settings. What this could do is to restrict the new QuickFormat citation dialog to pulling items from just this library. If a user wanted to add items from other libraries, this could be done using the classic view. When adding an item outside the preferred library, these items would be copied to the preferred library first and then the citation would be linked to the item in the preferred library. Refreshing the document would cause all items that do not exist in the preferred library to be copied (or even imported) there and then citations fixed to point to the copy in the preferred library. Copying the attachments could be an option that can be turned on or off in the preferences.

    This would solve all the problems that I wanted to solve by the disable/enable libraries and at least one of the problems described in this QuickFormat tread http://forums.zotero.org/discussion/19337/
  • edited August 30, 2011
    Here is a screenshot of what the preferences window would look like if it contained a section for selecting a preferred collection

    http://imageshack.us/photo/my-images/828/screenshot20110829at232.png/

    It gets a bit crowded, so it would make sense to separate the content in tabs.

    Edit: With tabs, the preference dialog would look like this

    http://imageshack.us/photo/my-images/546/screenshot20110830at102.png/
  • On PDFs (getting to it now):
    Another thing that embedded metadata does not solve is linking from the citations to PDS. We have an unofficial policy that all items in the group library should contain the PDFs. If a coauthor inserts a citation that I am not familiar with, I can use the group library to view the PDFs in a second or two using ZoteroQuickLook. This is because I know that the citation is correctly linked to the group library and the group library will contain the PDF.
    But again: isn't this really a separate issue? Couldn't you have an extension or some other code that simply looks for a PDF link in a personal library and then copies it over to the group library?

    I don't know; this still seems to me a pretty idiosyncratic solution, and as an author, I don't know that I'd be happy using it. Hopefully others will chime in though.
  • Sharing PDFs and synchronizing citation data are related because the solution to these issues is currently (Zotero 2.*) the same: group libraries.

    I do not see how the suggestion in your post this could be implemented as a plugin to Zotero. It would require that there is a reliable way to identify duplicates between libraries and also assumes that all items from personal libraries that are used in a document would be in the group library as well. This second assumption is something that I would like to enforce.


    But now that I have given this more though, I think that the "preferred library" preference for documents would be a better option than disabling libraries. I would appreciate any comments on that idea.
  • Would the preferred library option include a default save location?
  • If the default save location mean a default location where the imported items go, the answer would be no. This would not affect Zotero in any other way expect by automatically assigning the references that are used in a document to a particular library and collection and restricting the QuickFormat bar to that collection.

    The fact that the disable library approach would prevent accidentally items to a wrong library would in my opinion just be an added bonus of that approach. I do not see it an issue that should receive much focus on its own.
  • What do you mean by "automatically assigning the references that are used in a document to a particular library and collection"?
  • I mean this: When I cite an item outside the preferred collection (using the classic view), Zotero would add this item to the preferred collection. If the item did not already exist in the preferred library, it would be copied there to make this possible. Also in this case, the citation field in the word document would be written so that it points to this copy instead of the originally chosen item that was outside the preferred library.
Sign In or Register to comment.