HistoryOfEverything icon indicating copy to clipboard operation
HistoryOfEverything copied to clipboard

Easy-ish to get lost in the timeline

Open xster opened this issue 6 years ago • 4 comments

If you zoom out a lot, it's easy to get too far out and not know where you are anymore. Perhaps keep the scrollable range bounded?

xster avatar Nov 29 '18 22:11 xster

We had the scroll bounds in there earlier but it was causing contention when zooming at the boundaries. We tried a few things but it always felt a little unpredictable/difficult to control. In some cases you wanted to be able to scroll further so you could zoom more easily and the boundary would prevent that.

One thing we could introduce which wouldn't cause problems would be to simply bring you back into a reasonable view after a brief period of inactivity.

luigi-rosso avatar Nov 29 '18 22:11 luigi-rosso

One proposal:

1- You can zoom out indefinitely. If you were in acceptable range as an initial condition, you'll always have useful range inside the new range as you zoom out. 2- At any zoom level, you can never scroll such than 90+% of the screen has no useful range in it. That keeps the initial condition before 1 always sane. 3- As you zoom in, it'll always simultaneously drift/scroll so that it keeps 10% of the range useful.

This way, there's always 10% of the range filled with useful things to keep you from getting lost.

xster avatar Nov 29 '18 23:11 xster

That's worth trying!

We had something similar but it was a constant in screen space (like 50 pixels) so it wasn't quite as generous with letting you roam free. What you're proposing should be more flexible, and if it causes contention you're probably in a state you don't want to be in anyway, so the "force" will be helpful as you've clearly lost control :)

luigi-rosso avatar Nov 29 '18 23:11 luigi-rosso

One thing about that though is that it'll require the bouncy boundary to be at that 90% nothing useful range too. I think that should be ok.

It's challenging to separate the two as releasing a finger while scaling triggers the scroll physics (we could try debouncing that, but I fear it'll inhibit cases when you do want to fling the view) which also activates the boundaries. This is the particular case where I had difficulty controlling it, I found that I tend to pan around, drop another finger to zoom, pick one up and keep panning in the same gesture.

Alternatively we could extend the scale gesture and detect if you're still touching in the details sent to onScaleEnd and not trigger the scroll physics. https://github.com/2d-inc/timeline/blob/ce052455fd13422d69268db24547a633127f901f/app/lib/timeline/timeline_widget.dart#L130

luigi-rosso avatar Nov 29 '18 23:11 luigi-rosso