Re: [csswg-drafts] [web-animations-2] Progress APIs (#8799)

The CSS Working Group just discussed `[web-animations-2] Progress APIs`, and agreed to the following:

* `RESOLVED: change Animation.progress to Animation.overallProgress`

<details><summary>The full IRC log of that discussion</summary>
&lt;TabAtkins> DavidA: we added a property field, it reflects the progress of the animation in a way that reflects the iterations of the animation<br>
&lt;TabAtkins> DavidA: there is a .progress that exists in AnimationEffect that has a .getComputedTiming() function<br>
&lt;TabAtkins> DavidA: but that only reflects the progress of the current animation<br>
&lt;TabAtkins> DavidA: got some feedback that it coudl be confusing to share the name since they mean different things<br>
&lt;TabAtkins> DavidA: wanted to consider renaming the Animation progress field either totalProgress or currentProgress<br>
&lt;TabAtkins> DavidA: not sure which is better to go with<br>
&lt;TabAtkins> DavidA: currentProgress is related to currentTime<br>
&lt;TabAtkins> DavidA: but totalProgress more strongly reflects taht it covers all the iterations<br>
&lt;TabAtkins> fantasai: okay so it's a .progress on AnimationEffect...<br>
&lt;TabAtkins> DavidA: no, on Animation itself<br>
&lt;TabAtkins> fantasai: is there one on AnimationEffect?<br>
&lt;TabAtkins> DavidA: indirectly, kinda<br>
&lt;DavidA> AnimationEffect.getComputedTiming().progress<br>
&lt;TabAtkins> vmpstr: yehonatan also said he thinks progress if fine and he'd find currentProgress confusing<br>
&lt;dholbert> https://www.w3.org/TR/web-animations-1/#calculating-the-overall-progress<br>
&lt;TabAtkins> dholbert: WebAnim 1 uses overallProgress<br>
&lt;TabAtkins> dholbert: it differentiates that from "simple" iteration progress<br>
&lt;fantasai> https://drafts.csswg.org/web-animations-1/#dictdef-computedeffecttiming<br>
&lt;TabAtkins> astearns: "overall" is just a name in the algo, not part of the exposed API?<br>
&lt;TabAtkins> dholbert: yeah<br>
&lt;fantasai> .endTie<br>
&lt;fantasai> .endTime<br>
&lt;fantasai> .activeDuration<br>
&lt;fantasai> .localTime<br>
&lt;fantasai> .progress<br>
&lt;TabAtkins> fantasai: so this is on an object called ComputedEffectTiming, which has...<br>
&lt;fantasai> .currentIteration<br>
&lt;TabAtkins> fantasai: and we're suggesting renaming .progress<br>
&lt;TabAtkins> fantasai: we currently have .activeDuration, .localTime, .currentIteration<br>
&lt;TabAtkins> DavidA: Oh, not the progress field on this object<br>
&lt;TabAtkins> DavidA: The one on the Animation class<br>
&lt;astearns> I kind of like `overallProgress`<br>
&lt;TabAtkins> yeah i'm kinda leaning toward overall<br>
&lt;fantasai> https://drafts.csswg.org/web-animations-1/#the-animation-interface<br>
&lt;TabAtkins> DavidA: .progress on ComputedEffectTiming has existed for a while, changing woudl be hard<br>
&lt;astearns> s/ComputedEffectTiming/getComputedTiming/<br>
&lt;TabAtkins> fantasai: can you string multiple Animations together?<br>
&lt;TabAtkins> DavidA: I'm not sure...<br>
&lt;TabAtkins> dholbert: i'm slightly uneasy about "total" because it sounds like a summation<br>
&lt;TabAtkins> +1<br>
&lt;fantasai> +1<br>
&lt;TabAtkins> astearns: I'd expect "total progress" to not change over time<br>
&lt;TabAtkins> DavidA: okay so overallProgress is still something we could consider, or currentProgress<br>
&lt;TabAtkins> fantasai: since timingeffect has currentTime and progress, what's the problem with just using progress on this?<br>
&lt;fantasai> s/currentTime/localTime/<br>
&lt;TabAtkins> fantasai: you'd get the context off of which object you're getting from<br>
&lt;astearns> request for something other than `progress`: https://github.com/w3ctag/design-reviews/issues/994#issuecomment-2427287323<br>
&lt;TabAtkins> astearns: [summarizes Jeffrey's comment]<br>
&lt;fantasai> TabAtkins: effect timing can run an animation multipel times, and progress gives you progress of the iteration<br>
&lt;fantasai> TabAtkins: this is a 0-1 and done thing, so it's a different concept than what the effect timing one is<br>
&lt;fantasai> TabAtkins: can't change that one, but maybe use a different word here<br>
&lt;TabAtkins> fantasai: i don't mind overall progress, i'm just saying we both have startTimes, they mean different things<br>
&lt;fantasai> fantasai: can tell from context<br>
&lt;fantasai> TabAtkins: progress has a different interpretation, because [missed]<br>
&lt;fantasai> TabAtkins: AnimationEffect has a .endTime<br>
&lt;fantasai> TabAtkins: Effect timing and animation have same interpretation of those<br>
&lt;dbaron> (last 2 lines were answering vmpstr asking about whether startTime has the same meaning on both)<br>
&lt;fantasai> TabAtkins: Animation has a .startTime and no .endTime / AnimationEffect has .endTime and no .startTime<br>
&lt;fantasai> vmpstr: Progress, one cycles per iteration, so wouldn't be the same value at any particular point<br>
&lt;fantasai> TabAtkins: for progress, right<br>
&lt;fantasai> vmpstr: but if startTime and endTime both existed on the same object, they would be the same, right?<br>
&lt;fantasai> TabAtkins: AFAICT from a quick read, they refer to the same type of concept<br>
&lt;fantasai> TabAtkins: it's beginning of whole thing it's doing, vs iteratin<br>
&lt;fantasai> astearns: gist I'm getting, is ppl think there's enough difference to have a different name<br>
&lt;TabAtkins> fantasai: i'm okay with overallProgress<br>
&lt;TabAtkins> astearns: so proposed resolution is we change Animation.progress to Animation.overallProgress<br>
&lt;TabAtkins> RESOLVED: change Animation.progress to Animation.overallProgress<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8799#issuecomment-2461097047 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 7 November 2024 00:50:26 UTC