fast icon indicating copy to clipboard operation
fast copied to clipboard

feat: add support for options to AnimateSequence and AnimateGroup

Open KingOfTac opened this issue 3 years ago • 7 comments

🙋 Feature Request

According to the level 2 spec, sequence and group effects can have timing options passed to them. This would be to add options support to AnimateSequence and AnimateGroup. https://drafts.csswg.org/web-animations-2/#the-sequenceeffect-interface

🤔 Expected Behavior

You should be able to pass timing options to the sequence or group that controls the timing of the entire effect in addition to the timing options for individual child effects.

😯 Current Behavior

The expected behavior is missing currently.

💁 Possible Solution

It's been a while since I looked at the code, but essentially the constructor for these functions will take a second options parameter.

🔦 Context

This would enable the ability to create complex sequences and have them loop or iterate multiple times. Currently if you try to apply iterationsL Infinity to the individual sequences, only the first one will loop.

KingOfTac avatar Sep 11 '22 02:09 KingOfTac

This library predates me and I've never really dug in personally myself. @nicholasrice probably has a much better handle on the state of the code than me. I don't think we've made much if any changes in the last few years. That said, I'm personally open to this type of improvement. From our perspective, I think it would be a low priority. But @KingOfTac if you wanted to pick this up and knock it out, I don't see any reason why we wouldn't merge it and release it, especially if it can be done in a non-breaking way. @nicholasrice I'd love to hear your thoughts.

EisenbergEffect avatar Sep 15 '22 20:09 EisenbergEffect

This library predates me and I've never really dug in personally myself. @nicholasrice probably has a much better handle on the state of the code than me. I don't think we've made much if any changes in the last few years. That said, I'm personally open to this type of improvement. From our perspective, I think it would be a low priority. But @KingOfTac if you wanted to pick this up and knock it out, I don't see any reason why we wouldn't merge it and release it, especially if it can be done in a non-breaking way. @nicholasrice I'd love to hear your thoughts.

If it's optional I think it can be done in a non-breaking way. I'd be happy to take a look as well or help out if need be. The library itself is pretty straightforward. Frankly, if we needed to major version to address this as well, I don't think that would be a problem as this library has been in a fairly stable state for quite some time.

chrisdholt avatar Sep 15 '22 21:09 chrisdholt

I think it it'll be pretty straightforward. There are some other improvements to the sequence and groups effects that I want to propose in the near future, but I need to check the spec first. I don't want to introduce changes that bring the library out of alignment with the standard.

KingOfTac avatar Sep 15 '22 21:09 KingOfTac

@KingOfTac Do you want me to assign to you?

EisenbergEffect avatar Sep 15 '22 22:09 EisenbergEffect

Yeah I can take this on.

KingOfTac avatar Sep 15 '22 22:09 KingOfTac

Ok. I assigned it to you @KingOfTac

EisenbergEffect avatar Sep 16 '22 00:09 EisenbergEffect

Thanks @KingOfTac! It's been a long time since I've look at this code - go for it if it's an improvement!

nicholasrice avatar Sep 23 '22 01:09 nicholasrice

Closing due to #6765

KingOfTac avatar Jun 25 '23 01:06 KingOfTac