There is 1 update, 1 comment.
 
 
XWiki Platform / cid:jira-generated-image-avatar-5b7b174d-d36f-451a-bc99-5255c1deab96 XWIKI-13227 Open

Expand/Collapse all in DocumentTree

 
View issue   ·   Add comment
 

1 update

 
cid:jira-generated-image-avatar-786df775-8e4a-4636-a4ee-fcb2b0aa4f09 Changes by slauriere on 06/Sep/24 11:16
 
Component: Tree
 
 

1 comment

 
cid:jira-generated-image-avatar-786df775-8e4a-4636-a4ee-fcb2b0aa4f09 slauriere on 06/Sep/24 11:15
 

A frequent use case imho is the need to quickly view the global page hierarchy of a wiki, especially all visible nodes as you point out Vincent Massol: this significantly improves content discoverability and simplifies navigation.

I’ve noticed that XWiki’s competitors don’t seem to offer this feature out of the box though. Also, the Eclipse documentation has a "Collapse all" button, but no "Expand all".

I'm adding below a script that expands the visible nodes (can be used from the browser console). +1 for adding this feature by default, with an option in the Navigation Panel configuration to enable or disable the button?

jQuery('.xtree').jstree().get_json().each(function(item, index) { jQuery('.xtree').jstree().open_node(item.id)})

Also adding a link to the Documentation Application where the feature would be particularly useful.

cc Thiago Krieck