U4-3442 - tree sync doesn't work for nodes that are not loaded

Created by Shannon Deminick 07 Nov 2013, 06:50:30 Updated by Per Ploug 12 Nov 2013, 09:33:22

Is duplicated by: U4-3390

The problem is that :

  • Let say you load a path like:/#/content/content/edit/1063 and the node with 1063 is 3 levels deep
  • The tree only currently has loaded one level
  • Inside the treeSync call, a call is made to treeService.getChildNode
  • An exception is thrown because treeNode.children is undefined

What needs to happen is we need to detect there is no children assigned and then go load them and then continue. This means that most of this stuff needs to be wrapped in promises.

Comments

Shannon Deminick 07 Nov 2013, 06:53:50

Better yet, we'll make the getChildNode method work the way it currently is - it will search for loaded children, we'll change it to throw an exception if the children are not loaded. Then in the treeSync method, we can do all of the async processing that we need.


Shannon Deminick 08 Nov 2013, 00:48:16

Fixed in 7664cec0d33630012981fc58c4adfc0e6af3257b


Shannon Deminick 08 Nov 2013, 00:55:33

To demonstrate this, here's a screencast, we load in a path and the tree syncs to that node and fetches/follows the path for any unloaded tree data http://screencast.com/t/JN5MdTfo


Priority: Normal

Type: Bug

State: Fixed

Assignee: Shannon Deminick

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions: 7.0.0

Due in version: 7.0.0

Sprint:

Story Points:

Cycle: