You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(ui): Move checkInTimeline underscan to the left
Prior to this change, check-in timelines displayed a "underscan" area on
the right side of the timeline container. This is the area that remains
after we found the optimal rollup + bucket size + minimum underscan
size. This area was visually indicated by a hashed gray indicator with a
tooltip indicating that this area was "outside" of the selected time
range (period).
We received various feedback that the existence of this area is
confusing. However, we can't just eliminate this area. You simply
cannot divide 60 into 100 (as an example), so we need to constrain the
size of the timeline that we render the selected period. We can
however, instead of having the underscan at the end, simply place the
underscan at the start and mvoe the starting gridline marker to where
the actual period starts, and eschew the indication that there is
underscan.
There is an important note here. Previously when the underscan was at
the end, there was no need to account for the fact that the size of the
underscan area **will not always evenly fit the bucket sizes**. Since
the underscan area is the remaining area in the timeline container,
there's no way to guarantee that the buckets evenly fit into this area.
In the old implementation we simply would not query the last bucket and
it would never overflow out of the container.
Now that the underscan is on the left, we need to account for the fact
that the buckets may not be aligned to the actual size of the underscan.
So we compute an additional underscanStartOffset that we'll use to move
the ticks to the left by. This ensures the first bucket starts aligned
at the pixel value that represents that bucket start time, allowing all
following buckets to be correctly aligned.
Before
<img alt="clipboard.png" width="968" src="https://i.imgur.com/nirhIrF.png" />
After
<img alt="clipboard.png" width="970" src="https://i.imgur.com/uOVIdLJ.png" />
Notice how the underscan has moved to the left side
0 commit comments