curationexperts / trove

Digital Image Library based on Tufts repository models
0 stars 2 forks source link

Collections: nesting insert behavior #68

Closed mark-dce closed 10 years ago

mark-dce commented 10 years ago

Basically, moved collections should be inserted immediately after the drop target and before any successive images in the collection.

  1. Newly created curated collections should be added as the first item in the root list i.e. they should show up at the top of the 'Course Collections' or 'My Collections' pane
    root.members = [new_collection] + root.members
  2. Curated collections dragged immediately below a higher level collection should be placed first in that containing collection parent_collection.members = [moved_collection] + parent_collection.members

3. Curated collections dragged after another sub collection at the same level should be inserted immediately after the target sibling parent_collection.members = parent_collection.members.insert_after(target_sibling, moved_collection) (#2 might just be handled as a special case of this where there is no preceding sibling)

  1. Curated collections dragged out of a collection should be deleted from their origination collection. The order of other items in the original collection should be maintained.

nesting inserts - 68 nesting inserts - 68b nesting inserts - 68c

mark-dce commented 10 years ago

@jcoyne - let me know if you think there are any cases I missed here - I think the rules really cover everything.

jcoyne commented 10 years ago

How about reordering subcollections within a parent collection?

old: a - b1
       \ b2

new: a - b2
       \ b1

How about when adding, removing and reordering:

old: a - b1
       \ b2
       \ b3

new: a - b4
       \ b3
       \ b5
       \ b1