Big feature this time around is you can now click buttons/decoration in the editor to focus/fold/open links. These features are also all built with Javascript extension API, so it’s possible to add your own click actions if you want.
You can see how the built in actions are implemented here. The basic process is:
Add a decoration using the style API
Associate a command name with that decoration
Define an associated command with the same name using the app API
To make this work I have added a new CommandContext param that is passed to all command functions. By default it will contain the frontmost editor, and that editors selection. But when you click a decoration to activate a command the passed selection will instead be the row or text run that the decoration was attached too.
No, still enough that if I make a full todo list I get depressed. But after todays release I did just make this list up so that I can decide what’s next:
I think I’ve honed into an extension system I’d like to develop for myself in the near future, but I’m curious…is it possible to visually force indent the first line of a row and use justified alignment with stylesheets?
Sorry, at the moment neither of these are possible.
I think leading indent might be confusing, combined with indentation levels? Maybe make mockup of what it would look like (or is there an outline that already does this?). I’m willing to take a look, but probably won’t try adding without some visual examples to make sure it’s a good idea.
Justification is also not possible currently, though that would be easier to add. I think I didn’t add by default because I also wasn’t sure about handling the other alignments, and how they might confuse outline structure… again I don’t love the idea of leading whitespace. Though I think for start I could just add two alignment options (left, justified) and skip center and right for now.
I’m not sure I’ve seen that anywhere. OO supports justification but not first line indents.
My goal is to have it visually resemble a real book rather than a working document. I find it helps with motivation, but I’m also pretty sure it doesn’t make sense to anyone but me
Here’s what it looks like in OO after I manually indent first lines (but this template has some other specialties, like not indenting Level 3 rows etc.):
A follow-up…let’s say for plain text files, would I be able to use extensions to have Bike recognise markdown syntax in rows through text runs, and then apply styling to that part of the text? Or maybe, would Standoff markup be a better solution for something like this?
A follow-up…let’s say for plain text files, would I be able to use extensions to have Bike recognise markdown syntax in rows through text runs, and then apply styling to that part of the text?
I think that can eventually be possible, but not quite yet.
Bike needs a system for adding/caching view attributes that depend on text content. For example spell check marks, email addresses, etc will use this system. I think it can also make sense to allow extensions to also add marks using this system. In terms of the API, I think you would be passed an AttributedString and you couldn’t edit the text but you could add attributes. The stylesheet could then style those attributes.
Not sure if this will make 2.0, but does that sort of system seem like it would work for you?
Going back to your original question. Another approach that might be more what you were thinking of is if you open the plain text outline you could also add a command that when run will read the text content of each line. Process it… for example replace **text** with text and bold attributes.
The issue with that approach is that you’ve now got a rich text version of your outline, you’ve lost the plain text format.
My goal here really is to bridge the gap between Bike on macOS and editable files on iOS until a proper Bike iOS app exists. There are plenty of capable MD apps for that platform, so markdown seems to be the obvious choice.
Another thing I was thinking about is having a Bike extension simply convert .bike rich text into markdown as a separate file and then be able re-interpret changes to that file back to the original outline. Kind of the reverse of a live markdown preview. But that seems like a minefield to vibe code
Thanks for the update! I downloaded the preview but stopped short of installing it. Would it overwrite Bike 1 or will I be able to have both installed at the same time?
I don’t think it should cause problems. I run both regularly and haven’t noticed problems. I think biggest issues you might run into is system trying to decide which version to launch in various circumstances, but if that becomes a real problem you can just delete the 2.0 preview.