Bike 2.0 (Preview 272)

  • Added external file change detection
  • Fixed spelling marks breaking typing slide animation
  • Fixed block delete dropping selection when all siblings deleted
  • Fixed formatting palette staying open when ⌘Return steals focus
  • Fixed Escape toggle restoring entire row instead of previous text selection
  • Fixed imported markdown documents not restoring after relaunch
  • Fixed crash in regex replace with non-participating capture group
  • Fixed nested inline formatting sort order producing wrong markdown
  • Fixed opening .txt files being loaded as Markdown

Extensions

  • Show caret line in unfocused editors when setting enabled
  • Fixed crash accessing bike.windows in some cases

Download:

2 Likes

Perhaps prohibitively expensive at Moby Dick scale, but I wonder what might be the most efficient way to detect inadvertent duplicates when a user changes a row id, either with the Bike Markdown {#identifier} syntax, or by updating the API value of Row.id ?

( When we import MD, any {#identifier .class .class key=value key=value} elements are absorbed into the Bike data structure, but aren’t immediately visible – without special styling or outline path filtering – and we can accidentally create link target puzzles when a non-unique id value is specified in a document )

Bike’s outline structure is dictionary[Row.ID, Row]. So at least id testing performance is rarely an issue.

This shouldn’t be possible. It should be that ID’s are readonly/immutable at runtime. And it should be that if the source document (ie .md, .bike, etc) has duplicate ID’s then they are deduplicated (duplicates replaced with new generated ID) on load.

You shouldn’t be able to set custom ID’s on existing rows. Instead the pattern you can use if you want a custom id (for example Calendar extension does this) is something along the lines of firsts outline.getRowById and if that return undefined then you can insert a row with that ID and be confident that the ID will be accepted.

If you really want to be sure of the ID’s that are used when you insert rows you can read the final ID’s from the resulting rows returned by outline.insertRows.

I think this isn’t true, if the #identifier already exists then the imported row will be assigned a different identifier. Hopefully that’s true, let me know if you are seeing something different!

If you really do want to set an id on an existing row I think the path is:

  1. Remove the target row
  2. Ensure desired ID doesn’t already exist
  3. Insert a new row with all the same properties as target, except with desired ID

Hope that all makes some sense. Questions welcome!

1 Like