New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: frame animations with time encoding and timer param #8921
base: main
Are you sure you want to change the base?
Conversation
Thanks. Can we see whether you can run the formatting action as well so we know the formatting doesn't break. |
i was able to run |
Great. I was hoping we could get the GitHub action for checking formatting to work somehow. |
export const CURR = '_curr'; | ||
|
||
const animationSignals = (selectionName: string, scaleName: string): Signal[] => { | ||
return [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these selection-specific signals, or global signals (i.e., one set of signals that are used by all selections)? I think it's the former based on some of the references within. In which case, I think they'll all need to be prefixed by the selection name. Otherwise, if you have multiple timer selections within the same unit spec, you're going to get a duplicate signal error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think deciding what's selection-specific vs global matters for two situations:
- multiple timer selections in the same unit spec
i don't think this should be allowed, because what does it mean to animate a single set of marks two different ways? what's the best way to disallow this?
- multiple timer selections across multiple unit specs in a multi-view
we ideally want the animation clock ANIM_CLOCK
to be global, so we can share a common timer across multiple units. but the problem is that the animation clock needs to know the MAX_RANGE_EXTENT
to know when to wrap back around to 0, but this is calculated from the scale for each unit. imo for now this is fine since we didn't consider multi-view in the scope of the paper, but we'll have to figure this out when we think about multi-view / scale resolution. the extent of the clock needs to be determined from the unioned scale or the max of the independent scale extents
import {SELECTION_ID} from '../../selection'; | ||
import {vals} from '../../util'; | ||
import {BRUSH} from './interval'; | ||
import {TUPLE_FIELDS} from './project'; | ||
|
||
export const CURR = '_curr'; | ||
|
||
const animationSignals = (selectionName: string, scaleName: string): Signal[] => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How different will these signals be for when we generalize the implementation (eg to have timer-driven interval signals)? Is it worth extracting them to their own selection module and working them in that way for reusability? Happy to punt on that for now, but it'd be useful to spec things through and externalize them while they're more fresh in your head.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i feel like i will have a lot of questions about what changes to make to selections to expose predicates so i think i will opt to punt this from this PR's scope but try to write some thoughts down in a doc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay, y'all! A great start. I've left line-level comments throughout and will do a more holistic review next. In the meantime, some higher-level thoughts:
- Thanks for including example specs in your PR OP. Could you include them as json specs under
examples
as well please? That'll slurp them into our CI process (and, I think?, make them easier to expose in the documentation) - It might behoove us to also include some runtime tests since they've saved our (namely, my) behind a number of times when the compile-time specs appeared to be correctly constructed? (I'm happy to walk through the runtime test infrastructure post-CHI since it's a little complicated).
first round of comments has been addressed. pending todos:
|
Hi @jonathanzong and @joshpoll!👋 Would you mind updating this PR so the latest changes from the main repository are also included in this branch? Im not brave enough to do it myself🙈, but I'm sensing that this is the reason why the new deployment preview is not yet triggering. |
Just thinking about making a map with the trajectory of the upcoming eclipse🥳 |
Such a cool idea! Please share if you create it, I would love to see an animated VL chart for this. Btw, @jonathanzong are you waiting for a review on this branch or are you planning to add more commits (I saw you were still adding more since you last requested a review). |
I rebased |
We are indeed just waiting for a review |
Yes, apologies, it's been on my docket for a while but I've been underwater with various other deadlines. My plan is to wrap this up this month 🤞 |
Thanks for rebasing @joshpoll! But that didn't trigger the deployment preview either. @hydrosquall, do you know if these deployment previews only work upon opening a new PR and not on existing PRs? |
I thought it would work for existing PRs but evidently not! I can try to
see if there are debug logs somewhere later this week
…On Tue, Apr 9, 2024 at 3:59 PM Mattijn van Hoek ***@***.***> wrote:
Thanks for rebasing @joshpoll <https://github.com/joshpoll>! But that
didn't trigger the deployment review either.
@hydrosquall <https://github.com/hydrosquall>, do you know if these
deployment previews only work upon opening a new PR and not on existing PRs?
—
Reply to this email directly, view it on GitHub
<#8921 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACE2MM32ACXSAHERVW2G6XLY4RCAJAVCNFSM6AAAAAAYOFRUNCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBVHE2TKMJTGY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hm, it looks like I might have to add eligible branch prefixes one at a time, until I figure out how the "include" and "exclude" rules compose (which takes precedence). If you push another commit to this branch that modifies anything in the |
This change implements basic features of Animated Vega-Lite. With this change, users can create frame animations using a
time
encoding, atimer
point selection, and afilter
transform.This change does not include more complex features e.g.: interpolation, custom predicates, rescale, interactive sliders, or data-driven pausing.
time
encoding channelisTimerSelection
function to check if a selection is an animation selections_curr
animation dataset fortimer
selections to store the current animation frameanim_clock
), current animation value (anim_value
), current position in the animation field's domain (t_index
), etc.time
encoding is present, updates associated marks'from.data
to use the animation dataset (current frame).Relevant issue: #4060
Coauthor: @joshpoll
Example specs
Hop example:
Gapminder: