cardstack/boxel

Parallel timeline anchoring & filling behaviours

Opened this issue · 1 comments

For parallel timelines we can add flex box like fill/justification behaviours. This will allow us to use inferred durations combined with anchoring, centering or filling of motion definitions.

Options:

  • Specify globally for the entire parallel timeline definition
  • Specify per motion definition
  • Both? Per motion definition could override for that specific item

Inferred durations

What is a good default for an inferred duration? Is it the longest known duration (be it a spring or a tween duration) in the parallel timeline? If so we'll need to sort the timeline to have all inferred duration motion definitions at the end.

Do we want to be able to refer to an explicit motion definition to infer from?
Do we need operations for inferred durations? E.g. 50% of this spring, anchor to the end? This is less important for normal tweens since users could do the math themselves.

Note: a parallel timeline may have other timelines (inc. sequential ones) nested in itself. We'll have to account for this situation too.

Anchoring

We probably want to have the following anchoring options at minimum:

  • start - this can be implicit, no need to specify, but if we decide we add a "global" option, might be necessary as override
  • center
  • end

More flexibility, but unsure if necessary:

  • percentages
  • anchor + fixed offset (e.g end - 100ms)

The rough proof of concept doesn't really follow a clean flexbox like model. A proper implementation should probably be closer to that. It does now