blacksmithgu / obsidian-dataview

A data index and query language over Markdown files, for https://obsidian.md/.
https://blacksmithgu.github.io/obsidian-dataview/
MIT License
6.94k stars 411 forks source link

Customizable "no result" messages #1843

Open aarons opened 1 year ago

aarons commented 1 year ago

Is your feature request related to a problem? Please describe. I use dataview within my daily journal notes, and there are some queries that represent things like tasks to do for the day, or new notes created that day. When a query returns no results, the message is clear (but dry), for example: "Dataview: No results to show for list query."

This dry messaging is a little out of place within my personal journal. It would be nice if the messaging could be customized. For example, I would use something less formal, such as:

Describe the solution you'd like In the settings menu, allow me to specify a custom message when there are No Results, which would entirely replace "Dataview: No results to show for list query."

Bonus: if each individual query type could be specified differently (ex: table vs. list) Bonus Bonus: if I could provide a list of messages which would be chosen from randomly

Describe alternatives you've considered I considered using CSS overrides in Obsidian to hide the No Results messages, or potentially overwriting it and inserting my own content.

Additional context No additional content, this would just be something fun.

AB1908 commented 1 year ago

Would you like to attempt this? This is relatively easy and needs a bit of familiarity with (p)react and typescript.

aarons commented 1 year ago

Sure! I'll take a look at the repo.