Bike link options

I’m going to update some aspects of Bike links (that is links to a Bike document). Looking for feedback: @complexpoint @jonsterling @eno.

It’s come up a number of times that the current behavior of focusing the link row isn’t always what is wanted. Also sometimes people want links to open in separate windows. Also in future (not working on it yet) it would be nice to include a query (find this text, or filter this outline) in link.

The current Bike linking options are:

  1. Link just to document bike://Q36Hafdn
  2. Link to specific document row and focus it bike://Q36Hafdn#zz
  3. When activating a link (from within Bike) you can Command-Click to open in new tab and Command-Option-Click to open in new window.

To make link options more flexible I think I will stop (I will backwards support it though) including the linked row as a fragment. Instead I will start supporting optional focus and select query params. So for example the above row link would become:

  • bike://Q36Hafdn?focus=zz
  • or if you want to select instead of focus bike://Q36Hafdn?select=zz

This brings into question which to use as default. One thought is when copying a link include the selected row as select and if the view where the link is copied from is focused then also include a separate focused row. Does that seem right? It means you link to the “view” that you are looking at when creating the link.

I think I will also support a target query param, that will allow current|tab|window options. I don’t think I’ll support different target options in link creating UI to start with, but it will at least be an option if you are creating your own links.

Thoughts?

4 Likes
?focus=id

and

?select=id

look good.

Do you think that Edit > Copy > Row Link will still populate the public.url-name pasteboard item with the row name ?

(I find it useful to be able to capture a label with the link)

Yes, I think so.

2 Likes

Sounds great.
“view” or “focused row” will be shown as the context information of “selected row”. And it’s modifiable.

I changed formats a bit, but latest link preview adds ability to set focus and selection through links: Bike 1.8.2 (99-100) Preview - #12 by jessegrosjean

2 Likes

Thanks – this is very helpful.


Just checking that I’ve understood the reference in the release notes where it says:

  • Pattern is now bike://<root>/<focus>#<select>
  • Focus and select are optional in the pattern

I notice that if I explore all four possibilities created by:

<focus> given ⇄ omitted
<selected> given ⇄ omitted

then I find myself experimenting with

  • focus given
  • select omitted

and trying a pattern like:

bike://qOiJ9BEv/pt#

(where pt is a row id)

but that errors with the message

This linked document was found and opened, but associated row was not found.

So it looks like we need to remove the delimiting # in that case and write, instead:

bike://qOiJ9BEv/pt

Which is sensible and elegant.

I wonder if there is a case for allowing the trailing # without error, in case of misunderstanding ?

Yeah, that’s a good idea, will stop warning in that case.

1 Like