markmap-vscode icon indicating copy to clipboard operation
markmap-vscode copied to clipboard

FR: Collapse all branches

Open aspiers opened this issue 4 years ago • 7 comments

Thanks for this great extension. When opening a large mind-map, it is hard to navigate because it is so huge. It would be really helpful if there was a way to collapse all branches in one go, and even better if this was optionally done when first rendering the map.

aspiers avatar Apr 06 '21 15:04 aspiers

Yes please! I have a pretty large mindmap too, and I'm trying to figure out if this has been implemented?

CleoQc avatar Mar 16 '22 20:03 CleoQc

Absolutely essential, I reckon. Would be nice to be able to specify the level to open to. Also, if root level could be level 0 rather than at the top of level 1.

harrybou avatar Jun 09 '22 06:06 harrybou

One other thing. It would also be nice if when you open a level, only that level opens, not all higher levels For example if you are on level two, and click on a 'dot' only level three opens, not level three to 'x'.

harrybou avatar Jun 09 '22 06:06 harrybou

Curious the usability how folks would want this, because I'm interested also in this.

  1. One idea is to try and listen to command-shift-p commands to fold / unfold similar to how you can in code, and keep the markmind map in sync with the code folding level. OR, have another set of shortcut commands for just the mindmap: image
image
  1. Another idea is to have buttons in the markmap control in the bottom right of the window image

  2. Is there another user experience folks would be interested in?

I'm interested in trying a PR of this, just seeking some feedback @markmap of the best UX (and also pointers for implementation). :-)

jawspeak avatar Nov 23 '22 14:11 jawspeak

image

This button is used to fold/unfold the next node and its children recursively. Maybe it was a bad UX 😂

gera2ld avatar Nov 23 '22 21:11 gera2ld

Ohhh interesting, thank you so much. I don't think I figured out how to use that when I tried (macOS Chrome) in https://markmap.js.org/repl Clicking that nothing happened. I'm not sure where the state of the current node is indicated to recursively toggle from.

jawspeak avatar Nov 24 '22 06:11 jawspeak

I implemented a keyboard level version of this in another library today which possibly we could share inspiration from / etc. https://github.com/lynchjames/obsidian-mind-map/pull/103

jawspeak avatar Nov 24 '22 07:11 jawspeak