| 1 | WCKER tree editing behaviour spec. v0.2 2005-03-17 |
|---|
| 2 | |
|---|
| 3 | Preable |
|---|
| 4 | ======= |
|---|
| 5 | Some of the decisions here are sub-optimal so far as usability goes, but they're a solid place to start and to improve upon in the next version of WCKER. |
|---|
| 6 | Suggestions to improve clarity are needed and would be apprieciated. |
|---|
| 7 | |
|---|
| 8 | |
|---|
| 9 | |
|---|
| 10 | |
|---|
| 11 | Relationship to Reload |
|---|
| 12 | ====================== |
|---|
| 13 | Where possible and relevant, WCKER tree editing should follow that of Reload tree editing. However, differences in the approaches taken by Reload and WCKER will require some divergence. |
|---|
| 14 | |
|---|
| 15 | To put it another way: we should do what Reload does, unless we've got a good reason not to. |
|---|
| 16 | |
|---|
| 17 | |
|---|
| 18 | |
|---|
| 19 | |
|---|
| 20 | The tree |
|---|
| 21 | ======== |
|---|
| 22 | * The tree may contain container items (e.g. units) and pages. |
|---|
| 23 | * At its most permissive, all containers in the tree may hold pages and other containers. |
|---|
| 24 | * More restrictive configurations may be defined in the structure section of the wizard.wsi file. |
|---|
| 25 | * The restrictions can limit the contents of containers at specific depths to only pages, or only containers. |
|---|
| 26 | |
|---|
| 27 | |
|---|
| 28 | |
|---|
| 29 | |
|---|
| 30 | The buttons |
|---|
| 31 | =========== |
|---|
| 32 | There are three groups of buttons relating to editing the tree: |
|---|
| 33 | 1) The heirarchical tree widget and editing icons |
|---|
| 34 | 2) The Input fields (e.g. title, author, course aim) |
|---|
| 35 | 3) The Previous item and Next item buttons |
|---|
| 36 | |
|---|
| 37 | (see http://waterbuck.conted.ox.ac.uk/cgi-bin/trac.cgi/wiki/GuiPrototype#Customise-course-step-course-level) |
|---|
| 38 | |
|---|
| 39 | |
|---|
| 40 | |
|---|
| 41 | For 1) |
|---|
| 42 | ~~~~~~ |
|---|
| 43 | (Ignoring drag-and-drop as we probably don't have time to implement it.) |
|---|
| 44 | There are two major parts to this group: the tree and the editing icon buttons. |
|---|
| 45 | |
|---|
| 46 | _The tree_ |
|---|
| 47 | |
|---|
| 48 | The tree is a heirarchy of nodes representing containers and pages, with exactly one root node. The root node relates to the "organization" element on the IMSCP manifest file. |
|---|
| 49 | |
|---|
| 50 | Any one of the tree's nodes can be selected at a time. Doing so creates a "selection context" which will affect what actions are available to the user. (There may or may not be code forming selection context explicitly, that's an implementation detail.) |
|---|
| 51 | |
|---|
| 52 | A selection context describes: |
|---|
| 53 | * What node is selected (there must be a way to relate that to the part of the IMS manifest it represents) |
|---|
| 54 | * Which of the editing icons' actions can be performed on the node, determined by: |
|---|
| 55 | |
|---|
| 56 | a) Whether the node can accept container nodes as children. True if all of the following are true: |
|---|
| 57 | * node is a container |
|---|
| 58 | * the wizard.wsi structure section allows child containers |
|---|
| 59 | |
|---|
| 60 | b) Whether the node can accept page nodes as children. True if all of the following are true: |
|---|
| 61 | * node is a container |
|---|
| 62 | * the wizard.wsi structure section allows child pagess |
|---|
| 63 | |
|---|
| 64 | c) Whether the node can be deleted. True if all of the following are true: |
|---|
| 65 | * node is not the root node |
|---|
| 66 | * node is not marked as indestructable in the wizard.wsi structure section (not implemented) |
|---|
| 67 | |
|---|
| 68 | d) Whether the node can moved up. True if all of the following are true: |
|---|
| 69 | * node is not the root node |
|---|
| 70 | * node is not the first child of the root node |
|---|
| 71 | * node is not the first instance of that type of node at that tree depth |
|---|
| 72 | |
|---|
| 73 | e) Whether the node can moved down. True if all of the following are true: |
|---|
| 74 | * node is not the root node |
|---|
| 75 | * node is not the last node in a depth first linearisation of the tree |
|---|
| 76 | * node is not the last instance of that type of node at that tree depth |
|---|
| 77 | |
|---|
| 78 | NB. Adding siblings will not be allowed in this version of WCKER. |
|---|
| 79 | |
|---|
| 80 | |
|---|
| 81 | _The editing icon buttons_ |
|---|
| 82 | |
|---|
| 83 | These buttons are enabled/disabled according to the selection context. |
|---|
| 84 | |
|---|
| 85 | Behaviour when activated: |
|---|
| 86 | * Add container |
|---|
| 87 | * If only one type of container may be legally inserted as a child of the selected node, it is inserted as the last child of the node. |
|---|
| 88 | * If there are more than one type of container item which may be legally inserted as a child of the selected node, a list of allowed containers should popup, allowing the user to choose which type to add. On selection of a container type, it is inserted as the last child of the node. (The initial version of WCKER may not include this functionality.) |
|---|
| 89 | |
|---|
| 90 | * Delete container |
|---|
| 91 | * Removes the container and all its childeren from the tree. |
|---|
| 92 | |
|---|
| 93 | * Add Page |
|---|
| 94 | * Adds a page as the last child of the selected node. |
|---|
| 95 | |
|---|
| 96 | * Delete Page |
|---|
| 97 | * Removes the page from the tree. |
|---|
| 98 | |
|---|
| 99 | * Move selected up |
|---|
| 100 | * Moves the selected item to the first available preceding location. Non-exhaustive examples: |
|---|
| 101 | a) A page with another page immediately preceding it - would moved above the preceding page (or be swapped with it, depending on how you think about it). |
|---|
| 102 | b) A page with no sibling pages immediately preceding it, where pages are legal at any point preceeding the page - would be moved to the first legal point found when looking backwards through a depth first linearisation of the tree, starting at the selected node. |
|---|
| 103 | c) A container with another container immediately preceding it - would moved above the preceding container (or be swapped with it, depending on how you think about it). |
|---|
| 104 | |
|---|
| 105 | |
|---|
| 106 | * Move selected down |
|---|
| 107 | * Moves the selected item to the first available following location. Non-exhaustive examples: |
|---|
| 108 | a) A page with another page immediately following it - would moved below the preceding page (or be swapped with it, depending on how you think about it). |
|---|
| 109 | b) A page with no sibling pages immediately following it, where pages are legal at any point following the page - would be moved to the first legal point found when looking forwards through a depth first linearisation of the tree, starting at the selected node. |
|---|
| 110 | c) A container with another container immediately following it - would moved below the preceding container (or be swapped with it, depending on how you think about it). |
|---|
| 111 | |
|---|
| 112 | NB: The move up and move down actions keep a node as the same node type, at the same hierarchical depth. A later version of WCKER might include functionality to promote/demote nodes up and down the tree, and to convert between node types. |
|---|
| 113 | |
|---|
| 114 | |
|---|
| 115 | |
|---|
| 116 | For 2) |
|---|
| 117 | ~~~~~~ |
|---|
| 118 | A number of fields used to input data relating to the selected node. |
|---|
| 119 | When the Title field is edited, the changes should appear in the corresponding part of the tree widget (on keypress). |
|---|
| 120 | No fields other than the title are represented on the tree widget, so changes to them are of no consequence to the tree widget. |
|---|
| 121 | |
|---|
| 122 | |
|---|
| 123 | |
|---|
| 124 | For 3) |
|---|
| 125 | ~~~~~~ |
|---|
| 126 | These buttons should change the node selected in the tree widget, stepping back and forth through the course structure hierarchy using a depth first linearisation. |
|---|
| 127 | Activating the "Previous item" should move the selection one node back (ie up the screen). |
|---|
| 128 | Activating the "Next item" should move the selection one node forward (ie down the screen). |
|---|
| 129 | |
|---|
| 130 | "Previous item" is disabled if the selected node is the root node. |
|---|
| 131 | "Next item" is disabled if the selected node is the last node in the linearisation. |
|---|
| 132 | |
|---|
| 133 | |
|---|
| 134 | |
|---|
| 135 | |
|---|