r/Notable • u/fabiospampinato developer • Mar 03 '20
preview Preview: command palette, macro command, links to commands/shortcuts in Markdown and protocol handler
28
Upvotes
3
u/EzekielChen Mar 04 '20
Good job! πReally glad to see you being so happy developing your ideal app. I personally enjoy crafting and rebuilding things to approach perfection. So sad my budget is so limited as a student that I can't support you financially. By the time I get my first job, I'll definitely do what I can to help you sustain your project. π»
2
1
5
u/fabiospampinato developer Mar 03 '20 edited Mar 03 '20
Another quick preview today:
There's now a basic command palette
There's quite a bit of extra polishing needed though, but the basics are there
Commands and shortcuts can be linked to in Markdown and triggered with a click
You can also pass arguments to commands
Command arguments are basically just values in a JSON array
I've implemented the "macro" command I mentioned in my previous preview post
It's very very powerful
It basically accepts an array of commands to call and calls them
If a command should be called without any arguments then a string can be used, otherwise an array containing the command id and the array of arguments to pass to it should be used
Users have asked me to implement a Bear-style protocol-based API, and I've pretty much done that today too
I believe our approach is way more general and powerful than Bear's
Arbitrary commands and shortcuts can be triggered in the app this way
With the "macro" command this will be especially powerful
It works across all supported platforms, I've tested it on macOS, Windows and on Ubuntu via the
debbundle (other Linux bundles may not work, I'm not sure)This isn't a complete alternative to having a CLI app, as we can't return a result this way, but it could be a replacement for a CLI app under some scenarios
In order to implement this I had to enforce that only 1 instance of the app can be executed at any give time, this is kind of a regression if you had figured out how to open multiple instances of the app in the past, but the solution here is implementing built-in support for opening multiple windows of the app (not whole instances) at the same time, which hopefully should get implement in v1.9 as well
Some more meta thoughts:
After I had the palette, command and shortcut primitives available to me implementing all these features took like 3 hours of coding work, plus maybe 2 more hours of research around the protocol thing, the "macro" command implementation is really trivial, I really think phrasing apps in terms of commands, shortcuts, context keys and having a command palette is pretty powerful and I wish more apps were built around these primitives.
Today's preview should give more of an idea of what kind of app I want Notable to be, v1.9 will make the previous versions look like jokes in some ways, and we are not even halfway towards the "ideal" note-taking app I want to make, I think many future versions of the app will make the previous ones look like toys by comparison, hopefully this will stay true for a long time (i.e. ideally I wouldn't want the app to stop improving significantly over time, ever).
I hope you like today's preview π I particularly like the new clickable
<kbd>element, these little details eat up a significant amount of the development time but I think are worth it in the end.