markmap / markmap-vscode

Integrate markmap into VSCode
https://marketplace.visualstudio.com/items?itemName=gera2ld.markmap-vscode
MIT License
219 stars 21 forks source link

FR: Collapse all branches #19

Open aspiers opened 3 years ago

aspiers commented 3 years ago

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.

CleoQc commented 2 years ago

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

harrybou commented 2 years ago

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 commented 2 years ago

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'.

jawspeak commented 1 year ago

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). :-)

gera2ld commented 1 year ago

image

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

jawspeak commented 1 year ago

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 commented 1 year ago

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