Expand All in DITA Map Side-View

Are you missing a feature? Request its implementation here.
dreifsnider
Posts: 165
Joined: Thu Aug 30, 2018 10:06 pm

Expand All in DITA Map Side-View

Post by dreifsnider »

Hi,

My team has asked for the ability to expand all topic hierarchies in the DITA Map side-view. We see that there is currently a Collapse All option, but for many of our DITA Maps, we have multiple layers of hierarchy and expanding all these layers can be very tedious.

Additionally, we've extended the DITAMapNodeCustomizerRendered to show a badge next to each topic in the DITA Map that contains tracked changes and/or comments. It would be very valuable for our users to be able to quickly expand all topics in the DITA Map to be able to quickly see which topics have a badge next to them.

We're envisioning something like this:
image.png
image.png (17.57 KiB) Viewed 636 times
Is it possible to extend this menu to customize it? What would it take to add this action to this menu?

Thank you!

Daniel
Bogdan Dumitru
Site Admin
Posts: 170
Joined: Tue Mar 20, 2018 5:28 pm

Re: Expand All in DITA Map Side-View

Post by Bogdan Dumitru »

Hello Daniel,

Unfortunately, there's no API available to add custom actions to the DITA Map tree context menu, but we can add the Expand All action. However, we're concerned that it may not work as you expect. While all nodes would expand instantly, the titles (including any custom badges) will be populated lazily.

If you're looking to identify all topics that need to be reviewed—such as those with badges for tracked changes or comments—how about adding a dedicated view that lists only the topics in the map with the badges? This might be more efficient than scanning the entire map tree to find the ones with badges.
Bogdan Dumitru
http://www.oxygenxml.com
dreifsnider
Posts: 165
Joined: Thu Aug 30, 2018 10:06 pm

Re: Expand All in DITA Map Side-View

Post by dreifsnider »

Hi Bogdan,

Thank you for your reply and for agreeing to add the Expand All action to the context menu.

As for your comment about the titles:
the titles (including any custom badges) will be populated lazily.
We previously noticed how topic titles are populated lazily and this was the primary reason why we started using navtitle in our DITA Maps so that topic titles are populated instantly. We also understand that the badges will be populated lazily, but we still think it will be valuable to our users to let them expand the entire DITA Map.

As for your suggestion:
If you're looking to identify all topics that need to be reviewed—such as those with badges for tracked changes or comments—how about adding a dedicated view that lists only the topics in the map with the badges? This might be more efficient than scanning the entire map tree to find the ones with badges.
We also really like this idea and will start investigating adding this view. Do you have any advice or suggestions on how we might implement this? We are currently extending the DITAMapNodeRendererCustomizer to add the badge. Is there anyway we can collect the list of topics have a badge added?

Thanks!
Bogdan Dumitru
Site Admin
Posts: 170
Joined: Tue Mar 20, 2018 5:28 pm

Re: Expand All in DITA Map Side-View

Post by Bogdan Dumitru »

Hello,

Since you use navtitle it won't take long to compute all the titles. Ok, we will add the Expand All function for the next version..

Regarding the dedicated view to present just the topics with "badges" (that I think are the topics you consider to be changed, or something like this), you cannot use DITAMapNodeRendererCustomizer. You can access the URL of the DITA Map in JS like this: "workspace.getEditingContextManager().getDitaContext().ditamapUrl" and you have to cache somewhere the topicrefs referenced by this map, and the for each use the same logic you have in your DITAMapNodeRendererCustomizer extension.

To show a side-view see this tutorial: https://www.oxygenxml.com/maven/com/oxy ... mview.html
Bogdan Dumitru
http://www.oxygenxml.com
Post Reply