Is your feature request related to a problem? Please describe.
As a developer, I want to easily pipe together different animation configs, instead of creating one complex config
Although it is fine, we end up (as library maintainers wanting to add more animations for example, or as developers wanting to create their own configs) declaring configs like SlideInZoomInFadeIn that are complex and (if in need for descriptive name) have long, hard-to-read names.
Describe the solution you'd like
Instead, what we can do is to create a separate config for each kind of transition (fading in, sliding in/out, rotating in etc) the same way as it is at the current moment, BUT allowing developers to pipe the configs, like so:
const FadeIn = generateConfig(...)
const ZoomIn = generateConfig(...)
const SlideUp = generateConfig(...)
// and then somewhere in the notifications config:
{
animationConfig: FadeIn.add(ZoomIn).add(SlideUp)
}
TODO:
[ ] rework generateAnimationConfig - should expose method add to pipe together different configs
[ ] assume that animationConfigIn and animationConfigOut will be overwritten every time add is used -> one from the last config will be used
[ ] transitionInStyles and transitionOutStyles should be combined (from all provided config with an add method)
[ ] update the animatedStyles in useAnimationAPI to handle multiple transitionIn(Out)Styles
Is your feature request related to a problem? Please describe. As a developer, I want to easily pipe together different animation configs, instead of creating one complex config
Current way of generating an animation
Although it is fine, we end up (as library maintainers wanting to add more animations for example, or as developers wanting to create their own configs) declaring configs like
SlideInZoomInFadeIn
that are complex and (if in need for descriptive name) have long, hard-to-read names.Describe the solution you'd like
Instead, what we can do is to create a separate config for each kind of transition (fading in, sliding in/out, rotating in etc) the same way as it is at the current moment, BUT allowing developers to pipe the configs, like so:
TODO:
generateAnimationConfig
- should expose methodadd
to pipe together different configsanimationConfigIn
andanimationConfigOut
will be overwritten every timeadd
is used -> one from the last config will be usedtransitionInStyles
andtransitionOutStyles
should be combined (from all provided config with anadd
method)animatedStyles
in useAnimationAPI to handle multipletransitionIn(Out)Styles