Re: [csswg-drafts] [css-animations-2] Specify the animation-trigger property (#10128)

> > currently on parental leave
> 
> Congrats ^_^!

Thanks!

> > 1. I think this should be part of Web Animations level 2.
> 
> Ok, I also wondered about that, but @flackr wrote Web Animations 1, and some things I needed to update were actually there, so not sure whether this was intentional or not.

Yeah, that would be good to know. My understanding is it should be level 2 but maybe @flackr has some ideas about that.

> > 2. I think we need to define the API parts for triggers?
> 
> You mean the DOM interfaces, as in [here](https://drafts.csswg.org/css-animations-1/#interface-dom)?

I was thinking about the Web Animations DOM interfaces. Just like we have the [`Animation` interface](https://drafts.csswg.org/web-animations-1/#the-animation-interface) I assume we'll have an `AnimationTrigger` interface?

That also makes me wonder how authors would expect to be able to inspect these from script. Is there some way to fetch the triggers in a document? Or the trigger driving a particular `Animation`?
 
> > 3. We probably need to review all the descriptions about timelines and animations to make sure it accounts for triggers. (e.g. the sentence "Updating the [current time](https://drafts.csswg.org/web-animations-1/#animation-current-time) of any [animations](https://drafts.csswg.org/web-animations-1/#concept-animation) [associated with](https://drafts.csswg.org/web-animations-1/#associated-with-a-timeline) the timeline." should probably refer to triggers too?)
> 
> I've added [this text](https://github.com/w3c/csswg-drafts/pull/10128/files#diff-c240da42474be67dd65a2e91af4774da3cd91e832e1a6401b9fbefd6efe18851R775) to that section:
> 
> > * Updating the [=animation trigger state=] of any [=animation trigger=]
> >   [=associated with a timeline|associated with=] the timeline.
> 
> Shouldn't this cover it? I think basically comes down to checking triggers state on timeline's current time update.

Yeah, I was thinking that we need to review the whole section to check for other references that need to be updated like the sentence I mentioned and other definitions like this one:

> An [animation effect](https://drafts.csswg.org/web-animations-1/#animation-effect), effect, is associated with a timeline, timeline, if effect is [associated with an animation](https://drafts.csswg.org/web-animations-1/#animation-effect-associated-animation) which, in turn, is associated with timeline.

Presumably that needs to be updated to include triggers too?

This is a pretty fundamental change to the whole timing hierarchy so we need to be careful about it. I wonder if it would be better to introduce an abstract concept that covers both animations and animation triggers like "timeline subscribers" or somesuch.

-- 
GitHub Notification of comment by birtles
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/pull/10128#issuecomment-2093970240 using your GitHub account


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

Received on Saturday, 4 May 2024 02:43:11 UTC