Skip to content

Implement markmap folding commands - #103

Open
jawspeak wants to merge 3 commits into
lynchjames:mainfrom
jawspeak:implement-markmap-folding-commands
Open

jawspeak wants to merge 3 commits into
lynchjames:mainfrom
jawspeak:implement-markmap-folding-commands

Conversation

@jawspeak

@jawspeak jawspeak commented Nov 24, 2022 •

Copy link
Copy Markdown

Implements fold and unfold. See screenshots for keyboard shortcut examples (which is how I have been using this locally for rapid navigation).

I have found my use cases to be:

  1. writing / editing a markdown and seeing it realtime update in the mind map (it updates about every second based on the mindmap-view.ts's registerActiveLeafUpdate())
  2. viewing a mindmap and jumping to a specific fold level by keyboard shortcut
  3. exploring in an ad-hoc way using my mouse and clicking nodes.

As a design decision / consideration, I did not implement expand / fold next level, because when I mapped to the keyboard shortcuts in the screenshot given, it was very nice for me to jump to a specific fold level, or unfold all. That provided me a muscle memory indication (specific key shortcuts) of exactly which level I was reading, which would not be possible if I was implementing an "increase fold" or "decrease fold" shortcut.

Upgrade breaking changes had to resolve:
- replace transformer with Transformer
- no longer create IMarkmapOptions, but merge with Markmap.defaultOptions
  (In doing this we no longer get the font, due to this commit which removed that option markmap/markmap@7f52fdc)
…outReady(), also makes rendering more responsive
…dmap.

This feature makes it easy for someone to write their mindmap and quickly toggle the level of branch expansion.
Was tested with a big mindmap markdown file (259kb) and it was responsive, though that's not a common size mindmap.
@jawspeak

Copy link
Copy Markdown
Author

Ping @lynchjames please (:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant