Bike 2.0 (Preview 263-265)

265:

  • Added get() method to color themes (for custom theme colors)
  • Derive default caret and active line colors from system selection color
  • Fixed crash when pasting hierarchical (indented) text
  • Fixed markdown escaping to avoid unnecessary escapes (still more to do)

264:

  • Fixed cut/paste sometimes cutting more than selected

263:

  • Added Settings > Keybindings
  • Added Show keybindings in “Show Commands” lists
  • Added “Include in new documents” option filter queries
  • Changed open URL to activate app and prompt user

Fixes

  • Fixed caret up/down movement getting stuck on same row
  • Fixed autocorrect duplicate apostrophe when smart quotes is off
  • Fixed sidebar disclosure button not clickable after item gains children
  • Fixed sidebar query selection not updating on back navigation
  • Fixed preserve other text styles when setting font weight
  • Fixed word marked as misspelled while still typing it
  • Fixed sidebar drag-and-drop ordering
  • Fixed Copy as Bike Markdown excludes front matter
  • Fixed some BikeMarkdown encoder/decoder bugs
  • Fixed crash when creating heading after joining rows
  • Fixed occasional crash on extension reload
  • Benchmarking and optimization

I got a bit derailed this release, that took longer than expected :\ And I didn’t quite get to status bar. So focus for next release is again status bar + bugs.

Big new feature to try is Settings > Keybindings… so now you can change keybindings without having to create an extension!


Oh, forgot to mention in release notes, but I’ve also removed most of the default themes. I think I better get just a few like I want, then can add others. If you loved one of the prev themes they are still available here.

Download:

6 Likes

Just noticed this release has serious bug when cut/paste. Sometimes cuts more then requested, and then messes up cursor positioning… Will get a fix out soon, but likely not today.

2 Likes

I’ve just posted 264 which should fix the cut, then bad state issue.

2 Likes

In 264 the default style specifies gray (rather than blue) links ?

(e.g. see the link below to a measuredTree function)

In the default theme it should be based on accent color… maybe you changed system appearance color? (also, at moment you will need to restart Bike to pickup changes in that system setting)

1 Like

I’ve added different heading colours to my theme:

"heading1": "$red", 
"heading2": "$orange",
"heading3": "$yellow",
"heading4": "$green",
"heading5": "$blue",
"heading6": "$purple",

How can I then reference these in an editor style?

First I tried row.text.color = context.theme.colors.heading2, but I got a TypeScript error. Then I tried to add heading2 (etc.) to api/style/editor-theme.d.ts:

interface ColorTheme {
  // Core colors
  readonly text: Color
  readonly accent: Color
  readonly background: Color

  // Caret and selection
  readonly caret: Color
  readonly caretLine: Color
  readonly caretMessage: Color
  readonly textBackgroundSelected: Color
  readonly blockBackgroundSelected: Color
  readonly findMatch: Color
  readonly findMatchCurrent: Color

  // UI elements
  readonly handle: Color
  readonly handleUnloaded: Color
  readonly guideLine: Color
  readonly focusArrow: Color

  // Annotations
  readonly grammar: Color
  readonly spelling: Color
  readonly replacement: Color

  // Custom heading colors
  readonly heading1: Color
  readonly heading2: Color
  readonly heading3: Color
  readonly heading4: Color
  readonly heading5: Color
  readonly heading6: Color
}

But that didn’t work either. I also tried to add them to theme-schema.json. Is this not possible?

I haven’t tried to add the colours straight into the bike-style.ts — but I thought they belonged in the theme. :slight_smile: (Claude suggested adding something to util.ts.)

Hum… no looks like not possible yet. I had intended to do that, but fell off my radar. My plan had been to allow array style access for custom defined colors. Assuming that’s possible, I’ll add for next release.

1 Like

Thanks !

( Yes it, adapts, very neatly, after closing and reopening, to the setting in
System > Appearance > Theme > Colour )

1 Like

Assuming that’s possible, I’ll add for next release.

Cool! Then I’ll wait a bit more to get my editor style up and running again. :slight_smile: (Much of the most important bits depend on heading colours…)

1 Like

You should now be able to use colors.get("customName") in 265.

1 Like

Just posted 265, using this thread since not any big new features, just some fixes.

2 Likes