Bike 2.0 (Preview 234)

I got distracted this cycle.

I started a bunch of refactoring to make connecting up preferences easier, but never got that finished. Instead I had an idea for how to support irregular shaped decorations, and then kept heading in that direction.

Wasn’t my plan, but I like the end result, have wanted for a long time, but seemed too hard. Right now they only work for text run decorations, but I hope to get them working for text and row decorations eventually too.

You can see what I mean in the latest Bike, by selecting some text. Previously text selection was styled using only background filled rects. Now they have a light border and a corner radius. (This wasn’t possible to do well previously, when the selection wrapped multiple lines) This has two nice effects. With the border it means the selection color can be a bit lighter, and so text easer to read. Second the rounded corners look cool!

These mergeDistance decorations also work well with typing animations. For example mark a sentence or two as highlighted. Enough to wrap the screen. Then type some extra text into the highlighted range. The yellow background highlight animates to match the sliding text where it should, while also snapping without animation where it should. Subtle, but a tricky and nice effect I think.

1 Like