Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#260 closed enhancement (fixed)

Add auto-complete to search window

Reported by: dstillman Owned by: dstillman
Priority: minor Milestone: 1.0 Beta 2
Component: interface Version: 1.0
Keywords: Cc:

Description

Fields should auto-complete like in iTunes

Change History (3)

comment:1 Changed 10 years ago by dstillman

(In [650]) Closes #259, auto-complete of tags
Addresses #260, Add auto-complete to search window

  • New XPCOM autocomplete component for Zotero data -- can be used by setting the autocompletesearch attribute of a textbox to 'zotero' and passing a search scope with the autocompletesearchparam attribute. Additional parameters can be passed by appending them to the autocompletesearchparam value with a '/', e.g. 'tag/2732' (to exclude tags that show up in item 2732)
  • Tag entry now uses more or less the same interface as metadata -- no more popup window -- note that tab isn't working properly yet, and there's no way to quickly enter multiple tags (though it's now considerably quicker than it was before)
  • Autocomplete for tags, excluding any tags already set for the current item
  • Standalone note windows now register with the Notifier (since tags needed item modification notifications to work properly), which will help with #282, "Notes opened in separate windows need item notification"
  • Tags are now retrieved in alphabetical order
  • Scholar.Item.replaceTag(oldTagID, newTag), with a single notify
  • Scholar.getAncestorByTagName(elem, tagName) -- walk up the DOM tree from an element until an element with the specified tag name is found (also checks with 'xul:' prefix, for use in XBL), or false if not found -- probably shouldn't be used too widely, since it's doing string comparisons, but better than specifying, say, nine '.parentNode' properties, and makes for more resilient code

A few notes:

  • Autocomplete in Minefield seems to self-destruct after using it in the same field a few times, taking down saving of the field with it -- this may or may not be my fault, but it makes Zotero more or less unusable in 3.0 at the moment. Sorry. (I use 3.0 myself for development, so I'll work on it.)
  • This would have been much, much easier if having an autocomplete textbox (which uses an XBL-generated popup for the suggestions) within a popup (as it is in the independent note edit panes) didn't introduce all sorts of crazy bugs that had to be defeated with annoying hackery -- one side effect of this is that at the moment you can't close the tags popup with the Escape key
  • Independent note windows now need to pull in itemPane.js to function properly, which is a bit messy and not ideal, but less messy and more ideal than duplicating all the dual-state editor and tabindex logic would be
  • Hitting tab in a tag field not only doesn't work but also breaks things until the next window refresh.
  • There are undoubtedly other bugs.

comment:2 Changed 10 years ago by dstillman

  • Resolution set to fixed
  • Status changed from new to closed

(In [704]) Closes #260, Add auto-complete to search window

And fixed a bug that caused the text of some search conditions to not display when editing a previously saved search

Also added autocomplete to more fields in metadata pane:

  • creator
  • publisher
  • place
  • publicationTitle
  • journalAbbreviation
  • seriesTitle
  • seriesText

It should also do the type and medium fields, but they need to be separated out first--e.g. artworkType, interviewMedium--since they're describing different data

comment:3 Changed 10 years ago by dstillman

(In [705]) A rather important part of the last commit

Refs #260

Note: See TracTickets for help on using tickets.