Available for beta testing: Zotero Connector target selector

In the latest beta of the Zotero Connector for Firefox, it's now possible to choose which library or collection to save items to as well as add tags directly from the Zotero Connector, without switching to Zotero. You'll need the latest version of Zotero, 5.0.43, for full functionality.

This is what it looks like: https://www.dropbox.com/s/c8hkusi9ebxt015/target-selector.png?dl=0

The Connector will save to the selected collection in Zotero as before, but you can select a new destination from the popup to move the items there, which will also update the selection in Zotero (so that the next save will go to the same place by default). The popup appears collapsed initially, with recent save targets displayed in the drop-down menu. Clicking the disclosure button in the top-right will expand the popup to show your library/collection tree and also allow you to enter tags.

More details:

  • For single-item pages, once the popup closes, as long as you remain on the page and don't reload, clicking the save button again will simply reopen the popup and allow you to make further changes rather than saving another copy. If you choose a different translator or you're on a page with a folder icon, you'll get a new popup.

  • Syncing won't kick in as long as the popup is open, which should help prevent accidentally uploading items to the wrong library.

  • If items were originally saved to a library that doesn't allow files and you then select a library that does, the save will be performed again with file-saving enabled. If you go the other direction, the attachments will be removed.

  • If something goes wrong while updating the destination in Zotero (not unlikely in the beta), the popup will currently revert to a collapsed read-only view. (We can probably do something better than that.)

  • Some of the handling around multiple-item saves and save errors still needs to be improved.

  • We'll be making other improvements (a better drop-down with proper icons, +/- support for expanding/collapsing collections, maybe a collection search) in upcoming versions.

  • This currently only works when saving to Zotero, though a future version might work when saving to the online library.

If you try this out, let us know how it works for you and if you run into any trouble.
  • Just a quick try, FF 58.0.2. on Ubuntu 16.04, Zotero 5.0.43 -- this isn't working for me so far.

    Trying to save from
    https://www.nytimes.com/2018/04/01/technology/blockchain-uses.html?hp&action=click&pgtype=Homepage&clickSource=story-heading&module=second-column-region&region=top-news&WT.nav=top-news


    - verified that this saving with the regular connector works on this setup
    - when I click the URL bar icon, two translator icons appear (see screenshot: https://imgur.com/a/NcFZ8). I think that's because the NY Times translator errors and it then tries EM
    - When I try to select a collection by clicking on the arrow to the right it briefly shows the collections but I can't actually select one
    - nothing saves

    Debug ID for clicking the translator icon D248299838

  • Type error for parameter details (Unexpected property "firstPartyDomain") for cookies.getAll
    @adamsmith: Oh, that's mostly unrelated to this (other than what I said about error handling needing work). It looks like my First-Party Isolation fix in the beta broke saving in Firefox 58. I'll fix that, but try in 59 if you can.
  • 5.0.36beta3 fixes saving in Firefox 58 and earlier.

    It looks like save errors aren't being displayed properly in the popup, so we'll fix that as well.
  • Thanks. Looks like it's working now.

    I know you're working on this, but just confirming that multiples are confusing -- it's unclear which dialog I should start with and then the collection selection one can vanish if I don't get to it quickly enough. Also agree that UI isn't ideal yet.

    And just to confirm I'm seeing intended behavior in general -- the dialog should stick around for ~5secs and then disappear (having saved to the collection currently selected in Zotero)?
  • I know you're working on this, but just confirming that multiples are confusing -- it's unclear which dialog I should start with and then the collection selection one can vanish if I don't get to it quickly enough.
    Yep. (For now, as long as you make your item selections first, it should work as intended.)
    And just to confirm I'm seeing intended behavior in general -- the dialog should stick around for ~5secs and then disappear
    The popup will stay open as long as your mouse is over it. Once you leave it, it will close after 2.5 seconds. You can click Done in the expanded view to close it immediately. Some of the behavior around closing probably requires tweaking — e.g., it shouldn't save 2.5 seconds after the cursor leaves if it's still in the process of saving.
  • Display of error messages is fixed in 5.036beta4.
  • Great ! :)
    I've a question: does it mean that such a library and collection menu allow us to add references without having Zotero effectively opened ?
  • @archi02: You can still save directly to the online library, as before, but to use the target selector (and for the best saving results) Zotero needs to be open. But that's what I'm referring to above when I say that in a future version it may be possible to use this when saving directly to the online library.
  • No. Currently it requires Zotero to be open, but you don’t have to switch windows to select the collection. On Mac, you can close the Zotero window with the red button and keep it running in the background.
  • Quickly tested here, everything works globally great (Ubuntu 16.04.4, Firefox 59.0.2 64bits, Zotero 5.0.43). I really appreciate the ability to reopen the connector after an import to change the location of the reference !

    However, I don't quite understand how the importing panel is supposed to close. There are cases when a outside click doesn't close it, so I frequently have to pull down the menu to reach the Done button. Another thing that is confusing: is it normal that the panel remains open after I've switched to another tab ?

    Another question : is it normal if the connector isn't already translated (here, in French) ? I suppose so, but just in case I prefer to ask.
  • edited April 5, 2018
    @archi02: There was a bug in the latest beta version that prevented the panel from closing automatically. In 5.0.36beta6 it should close on its own more or less the same way that the previous popup did, with the main difference being that, if your mouse is over the popup (to interact with the target selector), it won't close. We may make some additional changes to allow you to close the collapsed popup manually.
    Another thing that is confusing: is it normal that the panel remains open after I've switched to another tab ?
    With that bug fix, it should close as long as you don't your mouse over the tab and then switch to another tab with the keyboard (but we'll fix that too).
    Another question : is it normal if the connector isn't already translated (here, in French) ?
    Yeah, the target selector is part of the connector, which isn't currently localized. But there's obviously more UI to interact with now, we're going to try to localize at least the target selector soon.
  • Quickly tested the beta7 this morning. All right, the popup close much better. Its behaviour seems now totally normal.

    Other question, which isn't crucial, but it hurt my eyes (!) : the font used for displaying the titles of personal collections and libraries are slightly different than the one used for the labels of the popup (the latter being properly the one used for all Firefox menus). In the specific area of the personal collections list, the font seems to be a 'condensed' one. Is it intentional ?
  • Tested singles on this Chromium, with Zotero 5.0.44:

    Version 65.0.3325.181 (Official Build) Built on Ubuntu , running on Ubuntu 16.04 (64-bit)

    I find myself craving a little more control. Rolling the cursor off the popup allows the download to go forward, but there doesn't seem to be any way to cancel. I kind of expected the Enter key to force the download, and Esc to cancel.
  • We've made a number of improvements in recent betas:

    1) The popup is now hidden when the Select Items window is displayed.

    2) We've fixed various bugs with the drop-down at the top for choosing among recent targets.

    3) The target selector is now localized in a number of languages (including French).

    4) The whole popup now uses the system font, which should match the rest of the browser UI. (Previously, only the tree did.)
  • edited April 16, 2018
    It works great for me in general! One glitch I encountered with FF 60, Zotero 5.0.36beta11: When I closed Zotero and click on the Zotero button in Firefox, nothing happens. There is _no_ "Is Zotero running?" for me. AFAIK I translated these strings yesterday for German, but I would expect to use the English ones instead, if they are not yet ready.
  • @zuphilip: I'm not sure I'm understanding. Do you mean there's no "Is Zotero running?" for you? (And absence of localized strings shouldn't have any effect on functionality.) If you mean that you're not getting the usual dialog, can we see a Report ID from the Connector?
  • edited April 16, 2018
    Oh, I can reproduce that, though. We might have broken that in a recent beta. We'll take a look.
  • Okay, thanks, yes, that is the problem. (Sorry for the confusion, I forgot the "no" first in my description.)
  • I've received a fault report against the HeinOnline translator, using the new target-selector connector in Juris-M. I've confirmed that:

    (1) The fault (below) manifests with the new connector version in Zotero; and
    (2) The fault does not manifest with the old connector version.

    So it looks like a bug in the new connector, not in the translator code itself. Steps to reproduce:

    1. Run Z/JM client.
    2. Open browser with appropriate (new/beta) connector.
    3. Search on HeinOnline,
    4. Click through to an article found by the search.
    5. Click icon to save the article. This works fine. The article is saved.
    6. In the journal-issue ToC shown in the left-side panel, select another article.
    7. Click icon to save the article.

    Expected: The second article is also saved.
    Result: The second article title does not show in the connector popup, and the item is not saved.

    As far as I can tell, it looks like the connector itself is not invoking the translator on the second attempt:

    Connector Debug ID: D427097405
    Zotero Client Debug ID: D1072334924

    I've noticed that the connector doesn't save duplicates if the icon is clicked twice in the same page view (before refresh). If it is permitting only one save per DOM load, that might be causing the problem -- navigation in the left ToC listing of the HeinOnline site updates the PDF view of the selected article and some elements of the page with Ajax, and the URL does not change.

  • @fbennett: Yeah, so that's really a problem with the site itself — and at least for me it was already broken in a different way.

    As you say, we reopen the popup on the same page, as long as 1) the last save attempt succeeded, 2) there hasn't been a refresh, 3) the translator is the same, 4) it's not a 'multiple' (folder) result, and 5) the URL is the same. Their updating the page without a reload is OK, but they should be using history.pushState() to update the URL when they do that to indicate that it's a new resource. This isn't just a problem for Zotero: currently, if you click on another entry and then reload the page, it'll revert to your original selection, which obviously shouldn't happen.

    Our options here are pretty limited. We could have a save from the context menu always trigger a resave, but that's not very discoverable and, if you used a secondary translator to begin with, not necessarily what you want. We could find a place for a resave button in the popup, but there's no good place for it at the moment and I don't think it's worth making space for that option alone, since this is mostly only relevant on sites that aren't behaving correctly. We could blacklist reopening on such sites, either in the translator or just in the connector, but then as a user you wouldn't ever know whether a second click would resave or reopen the popup.

    But also, if I try this with version 5.0.35 of the connector in Firefox, while it resaves, it actually just resaves the original item. (Search for "test", click the first result, click save and get "Test, The Chapter X". Click on "Task at Paris, The Chapter I" and click save again. For me it just resaves "Test, The Chapter X".) I haven't looked to see whether they're not updating the DOM properly or this is a bug in the translator, but until it's fixed any fix for this would just replicate the same behavior.

    In any case, they should really fix this on their end.
  • @dstillman Thank you very much for this, it is hugely helpful. We will contact the site maintainers. If things are resolved I'll post a word back here.
  • I've created a ticket for the translator issue, which is a separate issue. There's no particular reason to think that problem is on their end — the query parameters might just have changed — so I'd focus on the URL/Reload problem if you do contact them.
  • The target selector is now available in Zotero Connector 5.0.37 for all browsers. Thanks to everyone who helped test it out.
  • Hi,

    I'm using the new Zotero Connector in Chrome to capture PDFs, was wondering why this new version requires an extra click (I have to select the library collection twice). Here are the steps I am taking:
    1) Click Zotero Connector
    2) Hit enter (preferred collection is already selected from drop down)
    3) Second floating pop up box appears requiring you to hit enter again

    I have some screen shots is you would like me to send them
  • @terra.ierasts: So, first, you don't have to press Enter — while you can certainly do that to dismiss the popup immediately, it will go away on its own.

    But I'm also not seeing the behavior you're describing. If I click the button to save a PDF and then press Enter, the dialog simply goes away.

    The one exception is if the PDF is large and takes longer than 15 seconds to download, in which case the popup is reappearing after 15 seconds with an error ("An error occurred while saving this item…"), even though it actually did save in Zotero. The popup reappearing on an error is correct, though in that case there shouldn't be an error.

    If you're seeing something else, can you 1) provide a Debug ID from the connector for a save where this happens and 2) link to some screenshots (e.g., on Dropbox) that show what you're describing, just to make sure we're talking about the same thing?
  • Hi @dstillman

    This is happening every time so I don't think it is a longer download. I ran the debug, here is the Debug ID D260694257

    Also here are two screen shoots (not the screenshots are for a different file than the debug as I took them earlier when I first posted about the issue)

    https://www.dropbox.com/s/t7vddbq7wjmpk4q/Zotero_ScreenClip1.PNG?dl=0
    https://www.dropbox.com/s/p74ibpg0ino6amt/Zotero_ScreenClip2.PNG?dl=0
  • Ah, OK, that appears to be a weird bug on Windows. (It doesn't happen on macOS.) We'll see what we can do to fix it. In the meantime you can just let the dialog close on its own or press Esc.
  • edited May 7, 2018
    OK, that's fixed in the latest Zotero Connector beta (Firefox only). If you can reproduce this in Firefox, you can try it out there with the beta. If all goes well, we'll push that out as the release version in the next couple days. Thanks for reporting.
This discussion has been closed.