pashashocky / obsidian-note-gallery

A masonry note gallery for obsidian.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[FR] Support Dendron style "path"

StefanoRausch opened this issue · comments

I have not installed the plugin, but I am intrigued.

I save most of my notes and assets in one folder.

Would it be possible to support a Dendron styled path, e.g., user.script.daily-notes, which displays all files with that prefix, e.g., user.script.daily-notes.quick-switcher.mjs.md and user.script.daily-notes.dates-database.mjs.md?

Cheers

commented

Sure, I'll look into it! I've never heard of Dendron, but it looks interesting. Mind talking a little bit more about what you find the benefits are of using it?

Have you tried or do you use this plugin, does it work well?

So, just to summarize you have something like this?

/dendron
/dendron/user.script.daily-notes.2023-10-10.md
/dendron/user.script.daily-notes.quick-switcher.mjs.md
/dendron/python.library.pandas.md

you'd like path to be set to:

path: /dendron/user.script.daily-notes

to show

/dendron/user.script.daily-notes.2023-10-10.md
/dendron/user.script.daily-notes.quick-switcher.mjs.md

Sorry for the late reply.

Yes, I have the Dendron Tree and Structured Plugin plugins installed and they complement each other.

If possible, could we define the root folder as a folder as well? I have my scripts in the root folder and, e.g., business-related notes in a separate folder.

  1. /user.script.daily-notes ...
  2. /calendar/2023-11-12.md
  3. /areas/business/some.business.notes.md

Correct you are regarding the display -- all files:

  1. /user.script.daily-notes. ...
  2. /calendar/ ...
  3. /areas/business/ ... or even /areas/busines/some.busines. ...

Does it make sense?

The benefits of using the Dendron style are:

  • I can minimise the usage of folders.
  • Every portion of the Dendron path is a folder and can be a folder note without additional "hacks" or plugins. /areas/business.md for a birds-eye view, /areas/business/clients.md for a list or MOC of all clients, /areas/business/clients.clientX.md all specifics regarding client X, /areas/business/clients.clientX.projectY.md overview of the specific project Y for client X etc.
  • Automatic correct grouping and sorting of all notes.

And last but not least, I like the idea and simplicity of this type of information organisation.

My goal is to move all my notes, which are still organised under folders, to the Dendron path style.

commented

Nice! Interestingly enough I just started refactoring and re-organizing my notes as I got into Obsidian, partly why I started building out this plugin. Dendron sounds interesting so I'll explore it as I build out this feature.

I have one thing on my priority - specifically, a caching layer for rendered markdown which would speed up rendering and large vaults. After that's complete I can look into this.

The plugins current functionality is if you set path: / it will search notes recursively and also display /folder/file.md.

  • Are you intending to set path: / AND dendronPath: user?
    • Should this also display /calendar/user.note.md?
  • I guess the simple solution would be to treat a dendron /user.scripts.daily-note.day.md as /user/scripts/daily-onte/day.md?

Sorry, I'm not super familiar with Dendron, so happy for you to weigh in on UX here...

I have one thing on my priority - specifically, a caching layer for rendered markdown which would speed up rendering and large vaults. After that's complete I can look into this.

Great and thank you!

Are you intending to set path: / AND dendronPath: user?

I think this should be an option for users, like me who are "refactoring" their structure.

I guess the simple solution would be to treat a dendron /user.scripts.daily-note.day.md as /user/scripts/daily-onte/day.md?

This looks like the most straightforward approach if you are thinking about the internal representation for uniform handling.

Sorry, I'm not super familiar with Dendron, so happy for you to weigh in on UX here...

Not at all! I am grateful that you are prepared to look into it.

commented

Heya, I've been busy recently working on #6, would appreciate if you take a look at the conversation as this is also related...

  • Does the dendron plugin integrate nicely with native search?
  • How do you currently search/filter through your vault?
  1. It does as well as with the https://github.com/Quorafind/Obsidian-Float-Search plugin, which is really only an extension of the native search functionality.
  2. Both with the Quick switcher and the Float search plugins. It's such a breeze to use.

I don't use any of the other community plugins like Omnisearch etc. Reason: The native search is so powerful and meets my needs perfectly.

I will look at #6 later this evening and come back to you.

commented

The way I'm implementing my query for native search is both similar and a little different to obsidian float search from Boninall... the complexity is in the wrapper but the search functionality will be identical... It's likely that this issue might be solved by #6 once I finish it....

I hope Boninall will give this a proper code review as well at some point.

commented

@StefanoRausch I just released 0.0.34 which has access to native obsidian search, just like float-search... Give this a go and maybe this will resolve your issue too, if not I'm still happy to go down the dendron rabbit hole. Let me know how you get on, it's documented in the README.

I have tried the following alternatives:

query: "/(Regex: user.script.*)/"
sort: desc

and

query: "/user.script.*/"
sort: desc

with single or double quotes and I get Note Gallery: Loading...

The plugin is stuck at that step.

commented

@StefanoRausch hmm that's interesting - the loading should disappear once the cache database is populated.

  • do you see anything in the top right corner saying it's indexing your vault?
  • do you have any errors in the console? ctrl+alt+i or cmd+alt+i or View -> Toggle Developer Tools.
  • you can also try From command pallete Drop all cache and re-initialize db.
  • did you restart/reload app after the update?

Separately, you can try your query first in the regular obsidian search, once you are happy with the results you can move it over. I'd recommend using ' instead of " especially for regex.

  1. No indexing takes place.
  2. No errors in the developer console.
  3. Drop all cache and re-initialized db worked once. Afterwards, the plugin is stuck again.
  4. Yes, I relaunched Obsidian.

The native search for /user.script.*/ works as expected and is fast.

What I am noticing is the following:

  • Obsidian gets unresponsive for a while if the search involves hundreds of files: the native search finds 178 references for my specific case.

image

image

  • Disabling the plugin, relaunching Obsidian, and re-enabling the plugin (with or without dropping all cache...) works with the first attempt. The rendering of the single notes takes quite a while, with my 178 files' search case.
  • Most of the time, I need to force-quit Obsidian. Hence, I am disabling the plugin for the time being.

I see lots of value in your plugin. Let me know how I can help to narrow down the issue. It might be that other plugins I have installed are impacting the performance / usability. I will test further, but I can only look into it next week.

commented

Curiosity peaks, I'll debug on my side as well - 178 references is not a lot - here's an example of 35K matches running on my system: https://dropover.cloud/5a48ed

Latest version is 0.0.38 so please make sure you're using that one, that fixed a bug that wouldn't show anything.
This is pretty new and complex functionality, so bugs are expected - appreciate you trying to debug :)

Worth trying to get it to render some simple queries where you know the output will be 1-2 notes first and try the plugin in isolation in a new vault but with your existing notes copied over...

If you'd like to chat live - find me on discord.

commented

@StefanoRausch pushed a few more optimizations, bug fixes and cache updating to 0.0.41.
Fixed an issue that was not de-bouncing the updates...
Please run command Drop all cache and re-initialize database, hope we're getting closer :)

commented

Checking in, we went from 0.0.34 to 0.0.46 pretty quickly.

Fixed a lot of issues, specifically with recursion and continuous renders - please, let me know if you're still having issues.

commented

@StefanoRausch coming back to check in on you and wondering if you could give this another go, we should be much more stable now after a good amount of bug fixes :)

Hi @pashashocky, it is getting better, but we are still not where we want to be:

  • I didn't have time to test your plugin with a fresh / new vault. I will do that and keep you in the loop.
  • With a specific search (see below), the rendering takes several seconds and then the Obsidian main window goes "black", i.e., I can't see anything and must kill the application. Restarting the application shows the note "... indexing database", and nothing happens. Closing the note and reopening starts the cycle again.
```note-gallery
query: '/user.script.*/'
path: /
recursive: false
sort: desc
```

Cheers

commented

@StefanoRausch funky, by the sounds of it this testing happened on mobile?

Happens on a Windows 11 laptop, @pashashocky.

commented

@StefanoRausch hey, hope you're doing well, I'm curious to see if we can resolve these issues you're having. If you get sometime could you maybe test dendron use-case with a clean vault?

I'm happy to give this a go too, but haven't had the chance to look into dendron yet, it would help me if you could provide a simple reproducible scenario with a tree view of how you create your notes?

I am back from Mozambique, @pashashocky,

And I will test the Dendron use case in the next few days and let you know.