This wasn’t really part of the plan, but I’m excited about it…
My logic:
- Bike 2 will support search/filter of outlines
- Search/filter is more compelling with a sidebar of possible searches
- Sidebar is more compelling if you can add your own items to it.
- I’ve always wanted to build a full extension system…
The goal for Friday is to have a system you can play with. The goal for Bike 2 is to build out a useful API and figure technical of extension system … but skip extension management UI (enable, disable, update, etc). For now I expect usage to be mainly through a single startup extension (like a startup script that’s run once every time you start Bike).
After this Friday release I will stop expanding the 2.0 feature set and start trying to make it all actually work.
9 Likes
I’m not sure this is the best place for this question, but do you think that Extensions would also enable multi-pane views or is that an entirely different beast?
No, yes, maybe…
No, generally the entire extensions API is mostly a surface for automating things that I’ve already built in Swift. So extensions can’t really create new things, instead they automate existing things and also (the big feature beyond scripts) react to changes and show up in the UI in designated places like sidebar.
Yes, the feature of multiple panes (Split View) is something that I’ve sketched out/even mostly built a number of times. I want it. But it hasn’t quite reached priority. I “think” the way I will eventually do it is have a fairly limited implementation where you have the option for one editor view, or option to split that view into two views. As I’ve been trying to define the extension API over the last week I’ve tried to look ahead and make the APIs compatible with future designs like this. So for example Window has an associated array of OutlineEditors, not just a single one. When splits like this actually get implemented I don’t know, but not for 2.0 initial release.
Maybe, one extension feature that I very much do want to have is the ability for extensions to display arbitrary UI in a web view. The idea is the extension can (for example) pick out rows using an outline search path, send those results to web view, and then display as desired. I expect to have an inspector sidebar dedicated for presenting these extension views. Not sure if this will make 2.0 initial release either, but I expect it to make into app before editor split views.
This is looking great! I love the concept of being able to add automations like that. And JS is pretty straightforward.
And not going to make that goal
…
I did make a lot of good progress on extensions this week!
Two big additions:
First an API for extensions to register commands. Commands are basically an id, name, and callback. When the command is invoked the callback is called. Commands will be available in a global command palette.
Second an API to register keybindings. Keybindings allow you to register a key sequence with a command. Bindings are registered to a specific context (text or block) and take priority over system bindings.
Commands paired with keybindings make block mode more useful and interesting. Assign any key sequence that you want to run custom logic.
The last big change that I need to make to extensions is merge in the theme system. It’s all the same “run javascript as plugin” technology, but they evolved as completely different systems and now I think it makes sense to merge them.
A list of extension system plans for the Bike 2.0 release. Need to set some limits so I can finish! Maybe if I write them down it will help?
Extension system will…
-
Be in “preview”. I think it needs people playing with it for a while before calling it 1.0 ready.
-
Not support any polished path for sharing or updating extensions. For 2.0 I expect people will mostly be testing the API’s and creating their own custom extensions.
-
Not support any additional big parts such as web views, background workers, etc. They will hopefully come later.
-
Will not define a standard set of block mode keybindings… though this is something that I very much want to do eventually. I think a whole VIM inspired mini language would be great for block mode, but need time to experiment before designing that.
-
Time for bed!
4 Likes