mdelobelle / metadatamenu

For data management enthusiasts : type and manage the metadata of your notes.
https://mdelobelle.github.io/metadatamenu
MIT License
524 stars 27 forks source link

Metadata Menu ignores existing front matter when updating properties for existing notes #712

Open oakla opened 2 months ago

oakla commented 2 months ago

If I have some note with a fileClass property (in this case fileClass: PTM/Project), and I try to make changes to that note's properties via Metadata Menu I get some strange behavior unless I first force Metadata Menu to 'properly activate itself' in the note.

For example, I have this note: image

You can see that only the core property type icons are present, and the Metadata Menu icons are absent.

If I try to update the front-matter image

...added fields displace the existing ones

image

I can work around this by toggling 'Reading view' for the note, which will cause Metadata Menu to properly activate and show icons for the properties (see on the right-hand side); image

...but this is tedious to do for 100 or so notes.

Also, I'm curious as to where Metadata Menu keeps the information that decides whether to show its icons next to note properties? I've been looking for changes in my vault after the icons appear, but I can't find anything.

A related bug is that if I try to change a properties value via the table view, the property will be added as an inline property even when it already exists in the front matter.

ghdoca commented 4 days ago

A related bug is that if I try to change a properties value via the table view, the property will be added as an inline property even when it already exists in the front matter.

This is true for properties which are indented lists or arrays.

While note_status: permanent is recognized, note_status: - permanent is not. Changing this field will result in invalid yaml: note_status: permanent - permanent

But for compatibility with https://github.com/marcusolsson/obsidian-projects the indented lists or arrays format is needed.