[Tip] The draft selection interface for knowledge-management

…alternatively titled “Showing a little love for app.selectDraft.”

The draft selection interface is a bit of an unsung hero. It’s been a feature of Drafts for a good while now (since 2018, in some form?) but it was only earlier this year that I really began to appreciate how useful it is.

Because it can retain context separately from the drafts displayed in the drafts list, and because its two-column grid (on an iPad) offers a higher information density than the regular single-column drafts list, it’s really useful to use as a complementary side-panel for navigating a custom workspace. Since there’s been a bit more talk about Roam/Obsidian-equivalent features in Drafts recently: this interface can be a functional equivalent to a side-panel of related items, even if it has to be loaded manually via an action.

Use cases

For anyone new to using Drafts as a tool for note-taking and/or knowledge management:

  • If you haven’t used the selection interface before and want to try it out, this action allows you to call the interface and load a selected draft.
  • Greg’s action for inserting wiki-links is a useful starter. We don’t have in-line auto-completion of wiki-links, but this works well as an alternative.
  • Need to review the contents of a related draft without navigating away from the primary draft you were focusing on? It’s not too difficult to imagine using the selection interface in an action that opens a related draft in a new window or preview.
  • It’s also relatively easy to create actions that allow you to filter sets of drafts as indexes to choose from. For example: an action on your extended keyboard that allows you to insert a wiki-link from a selection of active projects (where each of those active projects is a draft with a consistent tag or tag-set to base the filter on).
  • Other useful examples of actions based on this selection interface include selecting drafts to append or insert.

Feel free to suggest or link to others.

4 Likes

I’m intrigued, but clearly ignorant…

What IS the ‘draft selection interface’ which ‘retains context separately’ with a ‘two-column grid [that] offers a higher information density’… ‘really useful as a complementary side-panel’.

You have sold it to me, but now I would like to know what it is!

So it looks like this:

It’s an interface that’s called programmatically, so you’d need to access it via an action.

It is actually mentioned, but the description is only applicable some of the time.

If you run app.selectDraft();

On the iPhone you get a single column selection box like this:

On the Mac, you get a single column selection box like this:

mac

On the iPad however, you get a double column layout like this:


EDIT: Looks like my answer was overlapping with @jsamlarose there. :laughing:

1 Like

Fair point. And shows up my biases in terms of how I use Drafts!

I’ve updated the original post to acknowledge this, and included a link to a simple starter action that calls the interface. @greiggy: if you’re still interested after the above explanations, try that first action I’ve added to the list of use cases.

Thanks for putting this together!

I’ve run into a little bit of buggy behavior with [[ autocomplete — and would ideally love to use the Quick Search prompt — but looks like working with app.selectDraft() is the only alternative right now.

@agiletortoise didn’t know if you’d considered having app.showQuickSearch() have the option of returning a Draft object rather than void? (I’ve found Quick Search to be pretty elite at full text search, but [[ autocomplete is 1) only by title and 2) disappears if a typo occurs.)

1 Like