Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#362 closed enhancement (fixed)

Support abstracts

Reported by: dstillman Owned by: dstillman
Priority: major Milestone: 1.0 Beta 3
Component: interface Version: 1.0
Keywords: Cc: dcohen, simon

Description

We never entirely reached a decision on this, though we came close before we were distracted by a bumblebee or something.

Some things I believe we've decided:

  • They should probably be displayed like notes, though possibly with a different icon
  • They need to be editable, since parent items are editable
  • There's not a great place in the interface to let users add them

Also note Simon's BC post.

One option would be to have them essentially be notes, stored, displayed and edited in the same way, and have a "Set as abstract" context menu option to designate/switch user-created notes as the item's abstract and set a custom icon. (It'd be a little cleaner in terms of data structure to have them in itemData, since most notes won't be abstracts, but it's probably worth the extra bit or whatever per non-abstract note row to not add the extra code to support that.)

Change History (3)

comment:1 Changed 10 years ago by dstillman

  • Status changed from new to assigned

Plan:

  1. Add abstract column to itemNotes table
  2. Add abstract parameter to Item.updateNote(text)
  3. (Parent)Item.setAbstract(itemID) or blank to clear
  4. (Parent)Item.getAbstract() to get itemID of abstract note or false if none
  5. (Child)Item.isAbstract() -- UI code will use the parent's getAbstract(), but something will probably need this
  6. setSource() to another itemID or to set as independent item will make note not abstract

Parent item should probably also be marked as modified when abstract changes, since it's essentially a property of the parent item.

comment:2 Changed 10 years ago by dstillman

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

(In [920]) Closes #362, Support abstracts

N.B.: Some changes from plan on ticket

New methods:

Item.setAbstract(true|false) -- make a note an abstract (and clear existing abstract if there is one for source item) or clear abstract status
Item.isAbstract() -- returns true if note is an abstract, false if not
Item.getAbstract() - get itemID of child abstract note or false if none
ZoteroPane.toggleAbstractForSelectedItem()

Changed methods:

Item.updateNoteCache(text, isAbstract)
Notes.add(note, sourceItemID, isAbstract)
Item.setSource() -- moving abstract note to another source with an existing abstract or setting as an independent note will make note not abstract

Other changes:

  • Context menu options in items pane: "Set note as abstract" and "Unset note as abstract"
  • Child notes are now displayed before child attachments so that abstract will be first

comment:3 Changed 10 years ago by dstillman

(In [921]) Refs #362, Support abstracts

Forget changed userdata schema

Note: See TracTickets for help on using tickets.