Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add a enhancing mind map plugin #354

Merged
merged 3 commits into from
Jul 16, 2021
Merged

add a enhancing mind map plugin #354

merged 3 commits into from
Jul 16, 2021

Conversation

MarkMindCkm
Copy link
Contributor

[ ] I am submitting a new Community Plugin

Repo URL

https://github.com/MarkMindCkm/obsidian-enhancing-mindmap

Release Checklist

  • I have tested this on Windows, macOS, and Linux (if applicable)
  • Github release contains all required files
    • main.js
    • manifest.json
    • styles.css (optional)
  • Github release name matches the exact version number specified in my manifest.json (Note: Use the exact version number, don't include a prefix v)
  • The id in my manifest.json matches the id in the community-plugins.json file.
  • README clearly describes the plugins purpose and provides clear usage instructions.
  • I have added a license in the LICENSE file

@lishid
Copy link
Collaborator

lishid commented Jul 15, 2021

Sorry for the late review!

https://github.com/MarkMindCkm/obsidian-enhancing-mindmap/blob/e6a0f62308b4f72f34204d3d6755cdc420b0caef/src/main.ts#L62
Did you mean to detach these views on unload?

https://github.com/MarkMindCkm/obsidian-enhancing-mindmap/blob/e6a0f62308b4f72f34204d3d6755cdc420b0caef/src/main.ts#L213
This should be possible from the file-menu event, no?

https://github.com/MarkMindCkm/obsidian-enhancing-mindmap/releases/tag/0.0.5
Could reduce your bundle size from 2.5mb down to 1mb if you strip the sourcemaps for release. That'll help with memory usage :)

@MarkMindCkm
Copy link
Contributor Author

Sorry for the late review!

https://github.com/MarkMindCkm/obsidian-enhancing-mindmap/blob/e6a0f62308b4f72f34204d3d6755cdc420b0caef/src/main.ts#L62
Did you mean to detach these views on unload?

https://github.com/MarkMindCkm/obsidian-enhancing-mindmap/blob/e6a0f62308b4f72f34204d3d6755cdc420b0caef/src/main.ts#L213
This should be possible from the file-menu event, no?

https://github.com/MarkMindCkm/obsidian-enhancing-mindmap/releases/tag/0.0.5
Could reduce your bundle size from 2.5mb down to 1mb if you strip the sourcemaps for release. That'll help with memory usage :)

Thank you for your review, @lishid . It's very appreciated.

I have addressed the feedback in this commit:
MarkMindCkm/obsidian-enhancing-mindmap@a3514c6

@lishid
Copy link
Collaborator

lishid commented Jul 15, 2021

Nice, that's a good step.

You can get the leaf passed in from that menu instead of getting it from the activeLeaf (which is nullable!)
You might want to test the file-menu's source property for pane-more-options if you want to restrict the location of your menu.
MarkMindCkm/obsidian-enhancing-mindmap@a3514c6#diff-4fab5baaca5c14d2de62d8d2fceef376ddddcc8e9509d86cfa5643f51b89ce3dR141
This is the definition of the event:
https://github.com/obsidianmd/obsidian-api/blob/b0aa06eab03d8c39c0733949da5aa1edc2084b01/obsidian.d.ts#L3375

MarkMindCkm/obsidian-enhancing-mindmap@a3514c6#diff-4fab5baaca5c14d2de62d8d2fceef376ddddcc8e9509d86cfa5643f51b89ce3dR60
I think you can simplify this further if you wish by using Workspace.detachLeavesOfType.

@MarkMindCkm
Copy link
Contributor Author

Nice, that's a good step.

You can get the leaf passed in from that menu instead of getting it from the activeLeaf (which is nullable!)
You might want to test the file-menu's source property for pane-more-options if you want to restrict the location of your menu.
MarkMindCkm/obsidian-enhancing-mindmap@a3514c6#diff-4fab5baaca5c14d2de62d8d2fceef376ddddcc8e9509d86cfa5643f51b89ce3dR141
This is the definition of the event:
https://github.com/obsidianmd/obsidian-api/blob/b0aa06eab03d8c39c0733949da5aa1edc2084b01/obsidian.d.ts#L3375

MarkMindCkm/obsidian-enhancing-mindmap@a3514c6#diff-4fab5baaca5c14d2de62d8d2fceef376ddddcc8e9509d86cfa5643f51b89ce3dR60
I think you can simplify this further if you wish by using Workspace.detachLeavesOfType.

thanks , I have fix these issues:
MarkMindCkm/obsidian-enhancing-mindmap@62a6268

@lishid lishid merged commit d90eb81 into obsidianmd:master Jul 16, 2021
@danieltomasz
Copy link
Contributor

The plugin doesn't update to newer versions in the Obsidian community plugins MarkMindCkm/obsidian-enhancing-mindmap#14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants