I have a large number of .md files in my Vault that are created or edited by scripts. For example, to manage properties. I have noticed that some of the tools I use (e.g., yarle) sometimes generate invalid properties. For example, the following is considered invalid by Obsidian because of the colons in the property value:
When Obsidian finds a property to be invalid, this appears to invalidate the entire properties section of a note, not just the invalid property. The file properties view correctly informs the user about invalid properties, but does so with very low-key colors:
Colors are not any better in Light mode. Would be great, if this could be displayed in some flashy color like Yellow or Red.
Also, I set Properties in Document to Visible from Options → Editor. With this setting and no file properties view open, Obsidian does not warn me at all about the invalid properties:
If I try to edit a file with invalid properties, Obsidian will take me directly to source mode and highlight the invalid properties section in Red:
This is actually good! However, if instead of editing the note, I choose to add a file property (not knowing that this note has invalid properties), Obsidian will happily add the new property and remove the existing properties section along the way.
This is really bad. Just because of one invalid property, the user loses all the properties and doesn’t even get any feedback.
Ideally, when trying to add a property to a note that has an invalid property section, Obsidian would open source mode and highlight the invalid properties as it does when trying to edit the note. Adding properties is the only way I can think of at the moment, but in general it should not be possible to silently lose data because some of the existing data is invalid.
TL;DR Takeaways:
Please render the “Invalid properties” string in the file properties with flashy colors.
Please notify about invalid properties in the note itself, because not everyone has the file properties view open at all times.
Most importantly: Please make sure that Obsidian does not silently rewrite the properties section of a note. Instead take the user to the source mode whenever something is not the way Obsidian expects it to be.
Usually I test my bash scripts thoroughly before I’m gonna add them to my everyday routines.
Basically, if something with my scripts goes wrong, I know to be the only responsible.
Anyway, I agree that Obsidian should have some trap mechanisms to avoid data corruption, when notes are being modified from outside. Of course, Obsidian can only stop bad modifications if Obsidian is running too.
CSS is ideal for these tweaks, but your request is so basic, it should be included as a “good default”.
Meanwhile, you could try out some community themes to get a better contrast. The default theme is OK, but too low key for my taste. Often, community themes are more for fun, but some themes are build with problem solving in mind too.
Not all characters are suitable for yaml lists, this issue is known by developers and very technical folks only, as much as I see it.
Generally, I avoid to type accents, pipes, slash in special lists like yaml headers, to be on the safe side. Maybe an inappropriate solution and not for everybody, but I see this issue more from a technical view.
Thanks for hinting at the CSS themes. I will try them out!
My main point was to show that Obsidian will overwrite/delete the property section if it can’t parse it completely. My introduction was a bit longish, so maybe that got lost.
I agree, that self-written scripts should be used with great care and should be well tested. But tests rarely cover all possible cases. Also, with well-established and widely used tools such as YARLE (Yet Another Rope Ladder for Evernote ) my expectation was that it would “just work”. I have thousands of notes that I migrated from Evernote and conversion worked for most of them. So I was a bit surprised when I saw some notes without properties and it took me a while to figure out what had happened.
To get you started, try themes like Minimal and other popular themes.
I’ve created my own, if you’re interested, feel free to check out my GitHub repo
You’re very welcome! A great description is already part of the solution.
Very true
Wow, OK! I’ve made some applescript exporter script for Evernote, but it’s probably very outdated now in case you’ve a Mac. But I guess, you’re already “armed” with the right tools. Btw, Welcome on this forum!