Widgets? (please)

I suspect this is a medium feature request. I would like Actions for Obsidian to support widgets.

Background - I’m migrating my journal for DayOne to Obsidian. DayOne has a widget that displays “On This Day” from previous years. It displays a picture from a previous note and when clicked opens the note.

I would like to duplicate that functionality via Obsidian. I’m hoping in the medium term I can use the magic of Actions for Obsidian to do that.

Short answer: Sorry, not possible in the short term, I’m afraid.

Long answer: Obsidian’s API is URL-based. Every request to the API is basically a special type of URL that is handled by Obsidian, and every return call to AFO is another special type of URL that is handled by AFO. Just like with a browser, this means the app (Obsidian, AFO) pops up when the link is handled.

So background communication is not possible, I’m afraid. But wait, it gets more complicated! :sweat_smile: For the widget to be up to date, it’d need to call the Obsidian API …which would open Obsidian.

And AFO doesn’t store any data from your vaults, all data is transient, and all data has to be acquired from the Obsidian API. Even if AFO would store data, the data would need to be fetched but as mentioned before: Background API calls are impossible.

So my personal opinion at this point in time is: The hurdles to make this work outweigh the benefits; getting data into those widgets would be inconvenient enough to keep most customers from using them.

1 Like

Thanks, I see the problem. Too pull this off it looks like I would need to roll the code for a widget by hand and watch the file system directly.

Pretty much, yes. Sorry. If you haven’t yet, you might want to give Simon Støvring’s Scriptable (iOS/iPad) a try, it can do a lot, and IIRC, Simon added widget support a while ago.