Bike 2.0 (Preview 269)

  • Added titlebar indicator for logged errors
  • Added Settings > General > Show/hide menu images
  • Load themes directly from extensions (no copy to themes folder)
  • Removed .bikemd format-you’ll need to rename to .md
  • Reworked file format handling (.bike vrs .html etc)
  • Sync control show/hide to mouse cursor visibility
  • Work to unify/polish explorer windows
  • Show proper ids in path explorer
  • Fixed text commands to work in text mode
  • Fixed all known crashes (keep sending!)

Extensions

Added extensionURL. Use to generate URLs for files contained in extension’s folder. Common case would be to show images in DOM context or style context.

Download:

2 Likes

:+1:!!!

Thank you !

1 Like

What’s a use case here? :thinking:

In the style context, I wonder if it would be feasible to use custom icons to mark the presence of particular data- attributes ?

(I’ve drafted a bike-reader.lua and bike-writer.lua pair for Bike ⇄ Pandoc, and wondered about that while experimenting with Bike-side representations of the Pandoc block types {DefinitionList, Figure, Table}).


More immediately, I’ve written a simple tree-browsing presentation system as a Bike DOM Panel extension, and I would like to be able to display images (rather than just text) in some of the nodes.

I’ve been using SVG source for images, and would like to experiment with ‘compiling’ a more graphic presentation by building an extension which includes some graphic files.


TL;DR

As you suggest, possibly fairly niche.

1 Like

just installed. When i use the cmd-shift-up/down arrows to move text up and down, i get a 3 second delay before the move (cmd-z to undo also gets delayed). The delay doesn’t happen with any of the other keyboard shortcuts that i have tested. I think this might be because i customised the keybindings, and i can see that there is a keybinding conflict. Should I be setting the keybindings differently?

by the way, i usually get the spinning beachball (just briefly) when using cmd-shift-up/down

As you suggest, possibly fairly niche.

Oh, the comment was more out of curiosity than dismissiveness. =)

1 Like

Another use case would be for style extensions. Row handle can be defined as an image. Or row background, etc. Or more generally gives extensions access to data that doesn’t have to be compiled into extensions code.

1 Like

Can you send me your keybindings file? To do that:

  1. Open Settings > Appearance
  2. Click the “Open Themes Folder” button
  3. That opens a Finder window for: ~/Library/Containers/com.hogbaysoftware.Bike/Data/Library/Application\ Support/Bike/Themes
  4. And then navigate up to the containing Bike folder, and your keybindings file is in that folder named keybindings.json.

Phew… I’ll add a toolbar item for this in the future from the Commands window!

Yes, there’s an example of this hidden away in the kitchensink extension style.

row(`.@tags contains bikeimg`, (context, row) => {
  let imageURL = extensionURL('resources/bike.jpg')
  let bikeImage = new Image(imageURL)
  row.text.decoration('background', (bg) => {
    bg.contents.image = bikeImage
    bg.contents.gravity = 'resizeAspect'
    bg.corners.radius = 4
    bg.opacity = 1.0
    bg.zPosition = -10
  })
})

To see that example in action:

  1. Build/Install kitchensink extension
  2. Choose the “Kitchen Sink” style from Bike Settings
  3. Choose the command “Kitchensink: Insert Style Demo”
1 Like

okay, i’ve emailed the file

1 Like

Pinned rows bug? (slowly learning the sidebar features)

I made two pinned rows then tried to drag-change their order in the pinned rows list. I see the blue circle-line (o—–) appear that indicates movement, but the two rows don’t actually change place. If i delete the top one and repin it, it appears below the other one.

beta feature request. could you put a link to the support forum in Bike 2’s Help menu? I keep Bike 1 open just to have that link.

1 Like

To be clear you are just talking about the ordered displayed in sidebar, not outline? The intention is that the sidebar ordering for pinned rows is independent of outline order.

For me the drag/drop behavior for pinned rows in sidebar appears to be working as intended. For example:

  1. I create outline with rows a, b, c.
  2. I drag a to pinned section.
  3. I drag b to pinned section.
  4. I drag b to above a in pinned section.

All seems to work as expected for me.

Is that simple case working for you?

ah, i needed to drag much more to the left than i had done. now i can change the order of pinned rows in the sidebar.

btw, forgot to say that removing the keybinding got rid of the delay, so it’s definitely the source of the problem. but i am confused by the whole keybinding window now.

Do you think this is an unexpected Bike behavior that needs improvement? For me the sidebar drag and drop seems pretty standard, but maybe it isn’t, or maybe you are seeing bug that I am not.

Ok, good (on first part anyway). I haven’t looked at that file yet, but I got it. Will investigate and hopefully be able to explain the mystery sometime later today.

i think the need to drag so far to the left makes it more difficult to use than it should be. it’s not a bug, just a UX point of difference

That’s the part I’m confused about, for me it seems I can drag to any location in full width of sidebar. Here’s what I see/do.

DragDropPin.mp4.zip (829.3 KB)

I am not sure I am excited about current behaviour on opening non-Bike-markdown files. I appreciate Bike tries to parse it to its own format and render it the way it renders native BikeMD files, but I think changing the file to conform to that format currently does more harm than good:

  • Everything becomes UL (expected)
  • existing ULs stay ULs (not expected, because now there’s no distinction → ULs become body text in Bike)

There are some other edge cases where information (structure) is also lost, but I think this one above warrants at least some thought if current behaviour is OK. ULs are a way to introduce structure/hierarchy into markdown, and since Bike changes everything to UL, any previous structure becomes muddled to the point where it’s impossible to bring it back. You can’t undo an ‘Open anyway’ in Bike with a simple find/replace.

If this stays, I would be very wary with opening any non-BikeMD .md file in Bike, which kind of defeats the point of having that feature. Would very much prefer to have it just open plain text and avoid destructive behaviour, OR really just prepend - to the start of every non-blank line so that I can easily revert back if I need to.

I once had to round trip an entire vault Obsidian → Logseq → Obsidian, which did something similar, and it’s not a pleasant experience.

EDIT: Maybe offer “Open as plain text” as an option if you want to keep it the way it is?