zotero / zotero

Zotero is a free, easy-to-use tool to help you collect, organize, annotate, cite, and share your research sources.
https://www.zotero.org
Other
10.11k stars 746 forks source link

Refactor/rethink citing interface #1223

Open adomasven opened 7 years ago

adomasven commented 7 years ago

There's two parts to this: UI and aesthetics, and the codebase.

  1. We want to keep the quick format dialog, but add a toggle for library/collection tree browser view that would pop up, perhaps, at the top? I believe there are some corner-case features only supported in the classic dialog that need transferring too?
  2. Current code is super complicated for both the quick format and classic citing dialogs. We also want to display a progress bar, like we do for updating citations, when refreshing the whole doc, but current API is extremely inflexible in allowing that. The code may be a good candidate for immediate Reactification.

I don't think there's huge urgency for this, but feedback appreciated nonetheless.

bwiernik commented 7 years ago

I can comment on some of the UI/aesthetics bits.

The Classic editor currently has two features that that the Quick Citation window does not have:

  1. Text markup (bold, italics, etc.), though it is a bit buried in buttons. Users can add these by using HTML tags, but UI buttons (either that just insert the HTML tags for the user or, ideally, insert them behind the scenes and show a rich text preview).
  2. Much more important, the ability to browse a library and search within a specific collection. This feature is extremely important to many users, to the point that many libraries regularly instruct users to enable the "Use Classic Citation Dialog" option during trainings. The Quick Citation window should get an option to browse the Zotero library view. I think the best interface inspiration for this is the cell select dialog in Excel when inserting a plot or function. Basically, the user would click the "Browse" button and the Quick Citation window would collapse to just a Z icon or Okay button that would remain on top of the main Zotero library window. The user could then browse their groups, searches, collections, etc., select the desired item(s), and click Okay to insert them into the Quick Citation window. Typing Escape should return the user to the main Quick Citation view (not exit directly back to the document).

Two notes on the above browse feature. First, the user should be able to select multiple items and insert at once. Even the current Classic Dialog only lets one item be added to the citation field at a time. Second, there should be a special section shown in the Zotero collections pane (probably above My Library) listing the Cited Items from the current document. There has been long discussion about Document Collections on GitHub and elsewhere; adding a browse interface to the Quick Citation bar seems like it would be a good time to address this need as well.

Beyond these, a few thoughts on the general interface for the Quick Citation box:

  1. It would be nice if prefix and suffix fields would expand to multiple lines, rather than overflowing into a horizontal scroll (https://forums.zotero.org/discussion/27588/quick-format-citation-size-of-the-prefix-suffix-fields).
  2. Similarly, it would be nice if it were easier to drag-reorder citations within the Quick citation box when there are long affixes. A box that were quicker to enlarge itself or the ability to manually resize the window would be nice here.

Finally, three additional functions that would really nice to see:

  1. An option to merge two adjacent Zotero citations into one combined field. Endnote has this functionality (it does it automatically, which I don't think Zotero should do), and there are a fair number of users who are confused by its absence and/or vocally miss it.
  2. Options to set a citation field-level prefix and suffix (rather than only item-level affixes, as is currently the case). This is useful for including things like "e.g.," without have to move the affix around as the items in the citation field change.
  3. A button in the word processor plugin to "Insert currently selected items" from Zotero. This would then insert a (combined) citation to all of the items that are currently selected in the Zotero window. This may be less necessary if the Quick Citation window gets a "browsing mode" like I described above.
fbennett commented 7 years ago
  1. Options to set a citation field-level prefix and suffix (rather than only item-level affixes, as is currently the case). This is useful for including things like "e.g.," without have to move the affix around as the items in the citation field change.

Would definitely be good for UX, but I'll note in passing that the input structures for citeproc-js don't have a way of expressing this. I assume that it could be implemented on Zotero-side, without reference to the processor?

bwiernik commented 7 years ago

Would definitely be good for UX, but I'll note in passing that the input structures for citeproc-js don't have a way of expressing this. I assume that it could be implemented on Zotero-side, without reference to the processor?

Ah, I had misremembered. I thought that citeproc-js had a mechanism for this which Zotero just didn't use.

rmzelle commented 7 years ago

Some minor nitpicks (screenshot is Zotero plugin in Word 2010 on Windows 7):

image

bwiernik commented 7 years ago

"Keep items sorted" is definitely needed. For example, APA requires that sources generally be alphabetically sorted, but one can deviate from that if you have annotations (Smith et al., 1998; but cf. Albert et al., 2002). "Disable item sorting" would probably be less confusing and make more sense, as the option would then default to unchecked.

janbaykara commented 7 years ago

It would be great if brackets could optionally be omitted. For example, one would still want "Fukuyama in 1989 said..." to be linked to Zotero citations, and referenced in the bibliography. But at the moment you need to manually remove the brackets, and do so again every time the citations refresh.

adomasven commented 7 years ago

We should make sure there's a way to delay search results for people with large dbs.

adomasven commented 7 years ago

Another thing that has come up a couple of times is that people find completing the action with ESC/Enter in the citation dialog confusing:

dstillman commented 7 years ago

prompt about using ESC/Enter

I don't think it needs to get into that, just resolve the current problem: "You’ve made unsaved changes to another citation. Do you want to keep your changes?” [Discard] [[Keep]]

bwiernik commented 7 years ago

The confusion about how to save inserting citations comes up on the forums about once every 2-3 weeks, so some form of discoverability might be nice. Perhaps Finish and Cancel buttons that appear on the right side on mouseover or similar? (Or, perhaps a green check and red x icons?)

KarlHegbloom commented 7 years ago

I think that the expected behaviour is that when per clicks the editCitation button (or keybinding), when the dialog is already open for a previous one that has not been finalized by either Esc or Enter, then Zotero should behave as though Esc was pressed followed by calling the normal editCitation code. If the cursor in the document has been moved, it will pick up the citation where the cursor is or give the error about having to have the cursor in the citation field.

Or maybe when the dialog is open, the editor plugin can disallow moving the cursor out of the citation cluster field? But if it can do that, then it can also just cancel the dialog, assuming there's a new integration command we make for that purpose... "cancel" but sent by the editor plugin; or it could just find that window and send a simulated Esc key push...

But sometimes I want to finish my sentence before I forget what I was about to say, leaving the citation dialog aside for a second... or I think of something while searching for the citation and want to move the cursor out of the citation field to jot it before I forget; but then when I press Enter in the dialog, the editor plugin needs to remember what citation field it was in and move back there during the automatic edits done by the plugin; and after that move the cursor to where I just was again? (with a mark stack, like Emacs, right?)

Maybe ghost buttons or a help balloon that can be shut off? When I click on the editor, when the editcitation dialog is open, maybe instead of just ending up hidden behind the editor, it ought to get out of the way but stay stacked on top, and allow moving it with the mouse? (There's a mode in Emacs that makes the mouse pointer slide out of the way when the text cursor approaches it.) And when the dialog is moved manually to a certain screen location, I want it to keep appearing there when it pops back up.

It would be cool if the dialog was sort of bound to the editor and the Zotero app, so it only appears on top of or near either of them, but if those are minimized or pushed to the back, the dialog goes with them? Most people probably don't have keys to push windows back, but some do. I guess this kind of functionality is really the window manager's domain though.

On Mon, Jul 17, 2017, 07:22 bwiernik notifications@github.com wrote:

The confusion about how to save inserting citations comes up on the forums about once every 2-3 weeks, so some form of discoverability might be nice. Perhaps Finish and Cancel buttons that appear on the right side on mouseover or similar?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/zotero/zotero/issues/1223#issuecomment-315753969, or mute the thread https://github.com/notifications/unsubscribe-auth/AACsllDiY1LTLnhe-iBCQXzsdu-QjBbiks5sO2AwgaJpZM4NPXfF .

--

Karl.Hegbloom@gmail.com

dstillman commented 7 years ago

If the cursor in the Word doc moves somewhere else and Add/Edit Citation is pressed, we should discard the dialog and prompt

But if changes haven't been made to the previous citation, we don't need to prompt and can just show the new citation.

adomasven commented 7 years ago

Another long-time request is displaying a collection of items cited in the document in Zotero client. Makes sense to make it part of this update.

See https://github.com/zotero/zotero/issues/21

mdingemanse commented 6 years ago

This seems the most general discussion of recent changes to the citing interface, so let me just flag a fresh issue that seems to be a regression introduced not too long ago (around the introduction of Z 5?). To do with search in Quick Format Interface giving counterintuitive results. See thread on zotero forums. (Maybe needs to be its own issue.)

dstillman commented 3 years ago

In addition to searching by identifier, there've been a couple recent requests to search/filter by tag.