link-map icon indicating copy to clipboard operation
link-map copied to clipboard

[Feature Request] Expand/Collapse/Shrink Nodes

Open staalman opened this issue 2 years ago • 3 comments
trafficstars

The standard Expand and Collapse Function open, respectively close ALL links under a Node. I would like to see a third option added, which is Shrink, which remembers which Nodes were already collapsed and which weren't, and when do an ' Unshrink' restores the previous state of expanded and closed Notes: Expands previously shown Nodes again, and leave the collapse Nodes collapsed.

This is useful as often, you hardly want to expand all tabs, unless you need to do a full text search (at least, like in TO) and unless the Search is going to also search in the collapsed Nodes and Expands those Nodes in which you have a Search Result, this Shrink/UnShrink option helps to keep the tree collapse where not needed, and expanded only in those area where you're actively using the links in the Node[s].

staalman avatar May 07 '23 22:05 staalman

Hi @staalman, I think I know what you mean. I will add shrink in as a selection, it sounds good.

And I gave the search function some adjustment in v1.1.0. It will look like this: 屏幕录制2023-05-09 10 28 17

In the gif above, when the search has finished, all the expand/collapse state will be recovered. Just like shrink, you mentioned.

GarinZ avatar May 09 '23 02:05 GarinZ

That's excellent! You make it auto-expand on a search performed; we never had that before! Does this then also work in general, without performing a search? For example, when you collapse a large sub sub tree, but leave the sub tree open. If you collapse the tree, and then expand the tree again, will it show the sub tree content (desired behaviour, because it remembers at what level what nodes were expanded before the collapse), or the sub sub tree content (not desired (or alternative option) expand 'ALL' behaviour) ?

staalman avatar May 17 '23 09:05 staalman

Hi, this new feature is awesome and (almost) exactly what I'm looking for!

I also noticed the node expands when I'm in the active window, and it stays expanded. Does this new feature keep the node collapsed?

Lastly, may I ask which version would this be part of? I'm using v1.1.6 and I don't see this function

noobida avatar Jul 11 '24 01:07 noobida