Drafts 22 Released - Widgets, iOS 14 Support and More

Drafts 22 has been released:

r22

Details below. For a complete history of updates, visit:

4 Likes

Drafts 22 iOS Release Notes

Design Refresh and Updates

Significant visual and functional refresh throughout the app. In many places, menus are used more effectively, especially on iOS 14.

Widgets

Added support for iOS 14 Widgets. Drafts ships with two types of widget, each available in multiple sizes:

  • Grid Widget: Widgets that can appear in any widget size, with configurable elements that link to workspaces (including default, with inbox counts), pre-defined commands (new, dictate, search, etc.), or any action from your action list. Note that not all actions make a lot of sense for use in widgets, because they are running on no text - but it can be useful if you have actions that do things like create a new draft based on a template, or configure the Drafts environment a certain way.
  • List Widget: Displays the top drafts from the configurable workspace (include default “inbox” workspace). This widget can also be configured to display inbox, flagged, or archive view of the workspace.

For additional details: Widgets article

Workspace and Filtering Changes

  • Workspace date ranges: It is now possible to configure start and end dates for a workspace. They are optional and likely most useful for constructs like a “Modified Today” workspace. Ranges are date-based and can be configured as specific absolute dates or dynamic relative dates +/- n days from the current date. For use, see the Today example workspace, which shows only drafts modified on the current date.
  • Show search preview: option in drafts list and workspaces. When enabled, if a text search is active in the search field, the body preview displayed in the list will change to show line numbers and text snippets previewing where the match terms appear in the draft to provide additional context when searching.
  • The tag filter pane can now be set to “Show All Tags” (the previous default), or “Only Tags in Current Filter”. The later is a new option that filters the list of available tags to only show tags assigned to at least one draft in the current query in the draft list. Set via “…” options menu.

Action Versioning

When editing actions, there is now a version history feature available which allows creating and restore backup snapshots of an action. Versions are automatically stored when an action is installed from outside the app and can be created manually at any time in the version screen. Details

Wiki-Style Link Improvements

Based on feedback, several minor changes have been made to better support the [[wiki-style]] crosslinks added in release 20. For details on this feature, see the Linking Drafts article in the User Guide.

  • Linking now supports direct links to markers within the content of longer drafts. The syntax is [[Title of Draft/Marker Name]]. Markers are defined by the syntax used, but generally are the labels for locations in the Navigation Menu. For Markdown syntaxes, these are # headings, so “[[Title of Draft/Marker Name]]” would navigate to a heading like “## Marker Name” in a draft with the title “Title of Draft”.
  • If a [[wiki-style]] title link matches multiple drafts, the app will throw up a warning and open a search for the title to help you disambiguate your intentions and make you aware that more than one match exists and you may need to be more specific in your naming conventions.
  • The /open URL, when used with allowCreate=true should prompt about the creation of the new draft. This affect [[wiki-links]] and prevents mistyped links from creating drafts unintentionally. Details
  • The /open URL now supports a marker parameter which can be used to target a specific marker inside a draft when targeting a draft by UUID. Details

Other New Items

  • “Vivid Dark” theme.
  • Support for new watchOS 7 complication sizes.
  • Support for “Wind Down” shortcuts on iPhone.
  • File action step has new “Tags” field, which can be configured to assign Finder tags to files when writing them. Use [[tags]] to pass through tags assigned to the draft.
  • Keyboard shortcut assignments now supports using several special keys - notably arrow keys. Assignment of these shortcuts in the editor currently required iOS 14 (although if the assignments are made on Mac or another iOS device running 14, the shortcuts themselves should work on iOS 13.
  • Drag and drop of a message from Mail will now insert not just the subject of the dragged message, but the “message:” URL linking to the original message.
  • Backups now have a “keep” setting to control how many backups to keep, automatically sweeping older backups to avoid consuming too much space on iCloud Drive.
  • /actionSearch?query=TEXT URL to open directly to a search of the action list. Docs

Scripting Changes

For more details on any of the below changes, visit the Script Reference:

  • The following properties of the Draft object, which were previous read-only, are now read-write properties. In general, it is not recommended that these values be manipulated, as they are maintained and updated automatically, but it can be useful to set them, especially when importing data from other systems.
    • createdAt, createdLongitude, createdLatitude, modifiedAt, modifiedLongitude, modifiedLatitude
  • FileManager object has new getTags(path): string[] and setTags(path, tags) functions to get and set Finder tags on files.
  • Workspace object has new startDate and endDate properties which take QueryDate objects to specify date filters for the workspace.
  • Workspace script object has new installURL property, which exposes the URL, that can be used to share the workspace. Useful for scripted backups and sharing.
  • Action script object has new installURL property, which exposes the URL, that can be used to share the action. Useful for scripted backups and sharing.
  • editor.getLineRange(location, length) function. Like editor.getSelectedLineRange() but to expand a range anywhere in the text to line start/end positions.
  • HTMLPreview script object now has prefersFullScreen boolean property. When true, the presentation will try to use the full screen on iPad.
    -draft.append and draft.prepend no longer require separator argument.
  • app.applyWorkspace should apply default workspace if called with no arguments.

Other Changes and Updates

  • Change: When importing an action, look for an existing action with the same name and offer to replace the existing action or import as a new action.
  • Change: Revert “Add to Siri” options for drafts, actions and workspaces to use NSUserActivity-based suggestions because the Intent-based ones do not remember configured details correctly.
  • Change: Be less aggressive about resigning editor focus when in background.
  • New: Add “reset sync state” troubleshooting option in iCloud settings (previously only available on Mac).
  • Change: Allow /workspace URL to open the default workspace without a pro subscription.
  • Fix: Cursor position when tapping to edit in Typewriter mode did not always select the right location in the text.
  • Fix: Better handling of nested blockquotes in Markdown syntax definitions.
  • Fix: Markdown syntax did not recognize indented code blocks starting with a number.
  • New: Calls to console.log in HTML Previews now get routed to and saved in the action log.
  • Fix: Alter method processing “after success” in actions to avoid a case where it is not handled properly.
  • Change: Draft selection view now has menus for tag/workspace filtering.
  • Change: Migrate language identification code used in RTL support to use NaturalLanguage framework.
  • Change: Support auto_reminder option in Todoist step and scripts
  • Fix: Issue causing auto-correct to be disabled when “Hide Keyboard Bar” is set to external keyboard.
  • Fix: Next-previous buttons might not update properly after some edits.
  • Change: Bump minimum required iOS version to 12.4
1 Like

Drafts 22 macOS Release Notes

Design Refresh and Updates

Significant visual and functional refresh throughout the app.

Workspace and Filtering Changes

  • Workspace date ranges: It is now possible to configure start and end dates for a workspace. They are optional and likely most useful for constructs like a “Modified Today” workspace. Ranges are date-based and can be configured as specific absolute dates or dynamic relative dates +/- n days from the current date. For use, see the Today example workspace, which shows only drafts modified on the current date.
  • Show search preview: option in drafts list and workspaces. When enabled, if a text search is active in the search field, the body preview displayed in the list will change to show line numbers and text snippets previewing where the match terms appear in the draft to provide additional context when searching.
  • The tag filter pane can now be set to “Show All Tags” (the previous default), or “Only Tags in Current Filter”. The later is a new option that filters the list of available tags to only show tags assigned to at least one draft in the current query in the draft list. Set via “…” options menu.

Action Versioning

When editing actions, there is now a version history feature available which allows creating and restore backup snapshots of an action. Versions are automatically stored when an action is installed from outside the app and can be created manually at any time in the version screen. Details

Wiki-Style Link Improvements

Based on feedback, several minor changes have been made to better support the [[wiki-style]] crosslinks added in release 20. For details on this feature, see the Linking Drafts article in the User Guide.

  • Linking now supports direct links to markers within the content of longer drafts. The syntax is [[Title of Draft/Marker Name]]. Markers are defined by the syntax used, but generally are the labels for locations in the Navigation Menu. For Markdown syntaxes, these are # headings, so “[[Title of Draft/Marker Name]]” would navigate to a heading like “## Marker Name” in a draft with the title “Title of Draft”.
  • If a [[wiki-style]] title link matches multiple drafts, the app will throw up a warning and open a search for the title to help you disambiguate your intentions and make you aware that more than one match exists and you may need to be more specific in your naming conventions.
  • The /open URL, when used with allowCreate=true should prompt about the creation of the new draft. This affect [[wiki-links]] and prevents mistyped links from creating drafts unintentionally. Details
  • The /open URL now supports a marker parameter which can be used to target a specific marker inside a draft when targeting a draft by UUID. Details

Other New Items

  • “Vivid Dark” theme.
  • Preference to disable/enable custom action touchbar in editor.
  • File action step has new “Tags” field, which can be configured to assign Finder tags to files when writing them. Use [[tags]] to pass through tags assigned to the draft.
  • Keyboard shortcut assignments now supports using several special keys - notably arrow keys. Assignment of these shortcuts in the editor currently required iOS 14 (although if the assignments are made on Mac or another iOS device running 14, the shortcuts themselves should work on iOS 13.
  • Drag and drop of a message from Mail will now insert not just the subject of the dragged message, but the “message:” URL linking to the original message.
  • Backups now have a “keep” setting to control how many backups to keep, automatically sweeping older backups to avoid consuming too much space on iCloud Drive.
  • Draft count in draft list.
  • /actionSearch?query=TEXT URL to open directly to a search of the action list. Docs
  • Better theme selection with previews in Editor Preferences.
  • Contextual menu commands directly in action list and action manager to “Insert Action” and “Insert Separator” which insert the new items directly below the selected action.
  • Action separators can now be edited directly from action list.

Scripting Changes

For more details on any of the below changes, visit the Script Reference:

  • The following properties of the Draft object, which were previous read-only, are now read-write properties. In general, it is not recommended that these values be manipulated, as they are maintained and updated automatically, but it can be useful to set them, especially when importing data from other systems.
    • createdAt, createdLongitude, createdLatitude, modifiedAt, modifiedLongitude, modifiedLatitude
  • FileManager object has new getTags(path): string[] and setTags(path, tags) functions to get and set Finder tags on files.
  • Workspace object has new startDate and endDate properties which take QueryDate objects to specify date filters for the workspace.
  • Workspace script object has new installURL property, which exposes the URL, that can be used to share the workspace. Useful for scripted backups and sharing.
  • Action script object has new installURL property, which exposes the URL, that can be used to share the action. Useful for scripted backups and sharing.
  • editor.getLineRange(location, length) function. Like editor.getSelectedLineRange() but to expand a range anywhere in the text to line start/end positions.
  • HTMLPreview script object now has prefersFullScreen boolean property. When true, the presentation will try to use the full screen on iPad.
    -draft.append and draft.prepend no longer require separator argument.
  • app.applyWorkspace should apply default workspace if called with no arguments.

Other Changes and Updates

  • Change: When importing an action, look for an existing action with the same name and offer to replace the existing action or import as a new action.
  • Change: Allow /workspace URL to open the default workspace without a pro subscription.
  • Fix: Better handling of nested blockquotes in Markdown syntax definitions.
  • Fix: Markdown syntax did not recognize indented code blocks starting with a number.
  • New: Calls to console.log in HTML Previews now get routed to and saved in the action log.
  • Fix: Alter method processing “after success” in actions to avoid a case where it is not handled properly.
  • Change: Draft selection view now has menus for tag/workspace filtering.
  • Change: Migrate language identification code used in RTL support to use NaturalLanguage framework.
  • Change: Support auto_reminder option in Todoist step and scripts
  • Fix: Memory leak in action editor.
  • Fix: Better refreshing of action log window when visible and new log entries occur.
  • Fix: Recent tags used should be tracked on Mac.
  • Fix: Crasher importing multiple files using File > Import... when the inbox was empty.
  • Fix: Immediately force save after a dictation session to make draft appear in draft list.
  • Fix: Make sure smart quotes/dashes are disabled by default in find window.
2 Likes

I live the wiki linking improvements.

Here’s my vote for somehow seeing a list of drafts that link to one when you view it so it can be bidirectional

1 Like

If you haven’t seen the cross-linking example actions, there are demo actions for doing bi-directional navigation.

2 Likes

The widgets are aweseome! Love being able to jump into a new draft with clipboard or a workspace right from my Home Screen.

I do wish there was a 2 x 2 widget with the configurable actions. For me, four is all I really need.

Agree a 2x2 would be nice. Unfortunately, Apple does not. It’s not possible for the small size to link to more than one thing.

Love this update. Great stuff.

Found a broken link under iOS (also Mac OS) at the end of this text:

/open URL now supports a marker parameter which can be used to target a specific marker inside a draft when targeting a draft by UUID.

I installed those and they look useful. I have tested them out.

It’s the times when I don’t do that proactively that would be surfaced with a feature like this. I may write it up in more detail for an official suggestion.

D’oh. That seems weird and arbitrary. Actually, my mind is now teeming with possibilities about what I can do with those. Love that you can add actions. I’m thinking things like “new draft in workspace x”.

Question, if I am on the beta track, do I jump to the released version? I have loved the improvements!

1 Like

Just tested the Mail drag-and-drop capability and I noticed that the message url does not include the // after “message:” I don’t know if this affects others, but on my Mac I need the backslashes to properly construct the url. I can add them manually, but if there’s a way to “configure” this, that would be great. I’ve yet to test out the wiki-links, but that sounds like a very cool option.

I’ll look at that. The message URL included is the URL provided by the Mail app as part of the drag promise, which I would assume is supposed to be the canonical URL for the message.

1 Like

To get off the beta, just install the App Store versions. The download button in the App Store should replace the beta.

Inspired to make some new actions and workspaces to fill in the boxes. :grinning:

1 Like

Is that really so? I have used the message: protocol a fair amount and even had workflows prior to this version inserting links but found out the slashes // (not backslash ) should not be included. E.g. here is this message via mail directly to Drafts and then copied and pasted here:

[Drafts Community] [News & Updates] Drafts 22 Released - Widgets, iOS 14 Support and More

(If you have this same mail the link will actually refer directly to it which is pretty convenient. For some reason though it doesn’t seem to work as a clickable link in this forum using Safari but if I copy the link itself it opens up the message in Mail.

However, if you try this simple HTML snippet it works, at least for me:

<html>
	<head>
		<title>Drafts link to mail</title>
	</head>
	
	<body>

	<a href=message:%3C4ubowjf6ur7k.8xdFtR_OuxayEjvIJjvPBA2@tracking.agiletortoise.com%3E>Drafts Community] [News & Updates] Drafts 22 Released - Widgets, iOS 14 Support and More</a>

	</body>
</html>

I’m staying on the beta. I don’t know why you wouldn’t.

I’m afraid the widgets feature isn’t working for me. It continues to come out as a blank box, grid and list. I’ve restarted devices multiple times. Hoping I don’t have to uninstalled/reinstall

https://share.icloud.com/photos/0-2-Ze1x7-8cgh7LFBp1xnOKA

(Update) I have three devices and the widgets do not work on any one of them. I went ahead and uninstalled/reinstalled on one device but still no change to get feature working

Is there a way to reconfigure the taptic/3D touch actions on the Drafts icon? I desperately miss being able to get the equivalent to “New with Clipboard” from that already.