U4-8395 - Expand icon doesnt show up in tree when creating content

Created by Claus Jensen 03 May 2016, 08:10:20 Updated by Sebastiaan Janssen 25 Jul 2018, 06:23:49

Duplicates: U4-10499

  • Create a node
  • Right click it and create a child-node
  • Child-node is created and the "structure" is unfolded to show it, but the little arrow you can click to expand/collapse on the parent node, doesnt show up until you refresh

1 Attachments

Comments

Jez Watts 22 Jun 2016, 01:39:16

This also affects grand-parent nodes and is a considerable usability issue with sizeable content trees such as ours


Nathan Woulfe 07 Jul 2016, 01:35:01

Not entirely sure why this is happening, but I think it's related to the menu object fluctuating while the tree items are rendered - the umbTreeItem directive removes the arrow element when hasChildren is false, but if that value later becomes true, the element can't be redisplayed.

I've patched this locally by modifying the umbTreeItem directive as follows:

Adding the ng-show attribute to the ins element in the template at ln5883: '<ins ng-class="{\'icon-navigation-right\': !node.expanded, \'icon-navigation-down\': node.expanded}" ng-show="node.hasChildren" ng-click="load(node)">&nbsp;</ins>' +

and removing the .remove() call at ln5923

Seems a bit strange that some of the DOM management uses show()/hide(), but this case uses remove()


Murray Roke 10 Aug 2016, 01:54:33

I have also found the expand icons go missing when you refresh the back office. The expand icons go missing from all ancestor nodes of the current node, Except the top level expand icon never goes missing. The current node expand icon never goes missing either (if it has children).

Just checked a random sample of our sites and see the issue in Umbraco versions 7.4.3, 7.2.8, 7.2.5, 7.2.4


Nathan Woulfe 16 Aug 2016, 01:19:31

Looks like @Bjarne.Fyrstenborg fixed this one -> https://github.com/umbraco/Umbraco-CMS/commit/233e3d9387f2022f524fd981cb74e9fa1fb1e029. Should be in 7.5


Claus Jensen 16 Aug 2016, 08:37:09

@madsrasmussen Could you check if this issue has been fixed by the code you already pulled in here: https://github.com/umbraco/Umbraco-CMS/pull/1201


Sebastiaan Janssen 16 Aug 2016, 11:45:31

@claus @madsrasmussen In beta2 this is still an issue.


Eike Hanus 17 Aug 2016, 17:36:55

We just looked into this issue during the Frankfurt umbraco Hackathon. We figured out that the problem does not seem to originate in the umbtreeitem.directive.js but rather in the data that is provided to it. The code handling the visibility of the arrow checks the hasChildren attribute of the nodes. These are not correct for some of the nodes. Even ones already existing when they are a parent to the selected node.

A deeper look into the updating of the data contained in scope is recommended.


Umbraco 10 Oct 2016, 12:07:10

@pploug Can you have a look at this?


René Pjengaard 06 Dec 2016, 21:10:57

I have the same problem. Seems kind of random when it happens. Umbraco version 7.5.4.


Tony Fletcher 08 Feb 2018, 10:17:26

I also have this problem in Umbraco 7.5.4, I assume there is still no fix for this?


Luke Phelan 22 Feb 2018, 06:38:23

We had another look at this at the Gold Coast Hackathon. We didn't much further, but can confirm the expand icon will only be visible for the current node and its children (and their children) on page load. Eg. if you load the dashboard at the root level, all the expand items will be visible for any children (until a new page is created). If you go a level below root to a node that has children and refresh, the expand icon will be visible for the selected node and its children, but not its parent.

Can also confirm the problem doesn't seem to be related to the setupNodeDom function in umbtreeitem.directive.js, however the data passed into that function elsewhere in the node object. We ran out of time to find out where that data is coming from.


JP McAveney 28 Mar 2018, 21:08:02

The issue here is that the call to remove the child nodes explicitly sets .hasChildren to false and then the UI for the parent node is updated but is never updated again after the child data is returned from the api controller. That's in the tree.service.js.

Adding this to the getChildren().then inside of loadNodeChildren funcition seems to fix the issue: if (angular.isFunction(args.node.updateNodeData)) { args.node.updateNodeData(); }

I'll see about adding a PR (first one!) for this, hopefully there's not something I'm missing.


JP McAveney 28 Mar 2018, 21:27:00

PR is here https://github.com/umbraco/Umbraco-CMS/pull/2551


Sebastiaan Janssen 25 Jul 2018, 06:23:49

This is fixed in U4-10499


Priority: Normal

Type: Bug

State: Duplicate

Assignee:

Difficulty: Very Difficult

Category:

Backwards Compatible: True

Fix Submitted: Pull request

Affected versions: 7.2.4, 7.2.5, 7.2.8, 7.4.3, 7.5.14, 7.6.3, 7.10.0

Due in version:

Sprint:

Story Points:

Cycle: