Do

Item Act Merge

Registered by Jason Smith

To improve overall functionality and cohesiveness of Do, subclassing Act from Item allows for greater plugin flexability and new interactions. In (rare) cases of potential behavior conflict, the earliest panes take priority.

Blueprint information

Status:
Complete
Approver:
None
Priority:
Medium
Drafter:
Jason Smith
Direction:
Approved
Assignee:
Jason Smith
Definition:
Drafting
Series goal:
None
Implementation:
Implemented
Milestone target:
None
Started by
Jason Smith
Completed by
Chris Halse Rogers

Sprints

Whiteboard

Item/Act Merge Specification:

Summary: To improve overall functionality and cohesiveness of Do, subclassing Act from Item allows for greater plugin flexability and new interactions. In (rare) cases of potential behavior conflict, the earliest panes take priority.

New Hierarchy :
(Element, IItem) : Item : Act

Within the existing architecture, this presents no conflicts and requires minor logic changes to core functions. A search case is presented for each possibility on a per pane basis.

Shorthand:
 IsItem == item is Item
 IsSimpleItem == item is Item && !(item is Act) //!(item is Act) is enough
 IsAction == item is Act
 TPR == Third Pane Requires Search (supports mod items)

First Pane Behavior Spec:
 No behavior change required. Search is a raw search with no filters.

Second Pane Behavior Spec:
 case Pane 1 IsSimpleItem:
  Search for IsAction where support Pane 1

 case Pane 1 IsAction:
  Search for IsItem where Pane 2 supports OR IsAction where support Pane 1

Third Pane Behavior Spec:
 case a) Pane 1 IsSimpleItem, Pane 2 IsAction (!TPR):
  Do nothing

 case b) Pane 1 IsSimpleItem, Pane 2 IsAction (TPR):
  Search for IsItem where Pane 2 supports as ModItem to pane 1

 case c) Pane 1 IsAction (!TPR), Pane 2 IsAction (!TPR):
  (a)

 case d) Pane 1 IsAction (!TPR), Pane 2 IsAction (TPR), Pane 1 Supports Pane 2:
  (a)

 case e) Pane 1 IsAction (!TPR), Pane 2 IsAction (TPR), Pane 1 does not support Pane 2:
  Search for IsItem where pane 2 (action) supports as ModItem to pane 1 (item)

 case f) Pane 1 IsAction (TPR), Pane 2 IsAction (!TPR), Pane 1 Supports Pane 2:
  Search for IsItem where pane 1 (action) supports as ModItem to pane 2 (item)

 case g) Pane 1 IsAction (TPR), Pane 2 IsAction (!TPR), Pane 1 does not support Pane 2:
  (a)

 case h) Pane 1 IsAction (TPR), Pane 2 IsAction (TPR), Pane 1 Supports Pane 2:
  (f)

 case i) Pane 1 IsAction (TPR), Pane 2 IsAction (TPR), Pane 1 does not support Pane 2:
  (e)

Execution Behavior Spec:
Execution is done in the standard fashion. Action is picked as the left most pane which contains an action && supports the other pane as an item

Act action;
Item item;

// ORDER MATTERS
if (pane1 is Act && pane1.SupportsItem (pane2)) {
 action = pane1
 item = pane2
} else if (pane2 is Act && pane2.SupportsItem (pane1)) {
 action = pane2
 item = pane1
} else {
 throw error;
}

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.