levirs565 / obsidian-dendron-tree

MIT License
33 stars 3 forks source link

Add Reveal in Dendron Tree to file menu #6

Closed tgrosinger closed 1 year ago

tgrosinger commented 1 year ago

Just like how you can reveal the current file in the built-in navigation, it would be helpful if you can reveal it in the Dendron Tree plugin instead.

Alternatively, you could also make the Dendron Tree always focus on the active file, just like how the Explore sidebar in VS-Code functions.

Screenshot 2023-06-01 124214

Thanks!

levirs565 commented 1 year ago

I have a question while implementing this feature. When running "Reveal in Dendron Tree", do you think it is better to use scroll with animation (smooth scrolling) or without animation? This feature have been implemented in latest commit but not released yet. Currently "Reveal in Dendron Tree" will smooth scroll into target note. In comparison, VS Code uses scroll without animation.

tgrosinger commented 1 year ago

Wow, thanks for adding this so quickly!

I would probably try to maintain consistency with the built-in file explorer view. It looks like it jumps directly to the note with no scrolling.

levirs565 commented 1 year ago

Newer version of Dendron Tree is released. This release bring "Reveal in Dendron Tree" to file menu and automatically reveal file in tree when opening file.