Open pelegm opened 4 months ago
That's a really cool idea. How do you foresee the syntax for these properties? Making a generic rules mechanism for properties is probably far more excessive than for tags. Making a property for the icon is very easy, but might not be flexible enough for some users.
Thanks for the feedback!
I would probably not try to reinvent the wheel but instead use Obsidian's basic query rules. E.g.,
The [properyname:propertyvalue]
syntax returns every note whose propertyname
either equals propertyvalue
or contains it as an element in a list. It also ignores the square brackets and is case-insensitive by default.
Oh nice. I knew somewhere in the back of my head it exists but never tried it. Will look into it.
By the way, I would apply the same concept for filters - you already allow there most of what Obsidian's search allows. Shall I open a distinct issue for that?
Unfortunately mimicking Obsidian's search is a pain. I discussed with the Obsidian developers years ago to provide an API to the search capabilities, they agree with the need but never came to it. So Map View has its own query mechanism, and if you think of other operators that could be useful, I prefer to cherry pick them than to play catch-up. (Regardless, to my understanding this is about to change soon, as Obsidian is about to introduce its own querying mechanism based on Data View. I'm hopeful it will have a formal API and Map View can plug into that.)
Sounds good. Thank you again so much! (bought you a coffee). I'll open a distinct issue for filtering in map view in terms of properties.
The current marker rules only read note tags. In my workflow, I don't usually use tags, but rather properties (e.g., instead of
tags:\n - campingsite
I usetypes:\n - "[[Camping site]]"
). To have special icons for various note types, I now add tags, but this duplicates some of my work. Is there any chance to support general properties in a future release?