Skip to content
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

useSpring does not orchestrate animations if one is using config w/o duration, when others do #1584

Closed
ShiiRochi opened this issue Jun 24, 2021 · 6 comments
Assignees
Labels
kind: bug Something isn't working released in beta this has been released on a beta released This has been released on stable
Milestone

Comments

@ShiiRochi
Copy link

ShiiRochi commented Jun 24, 2021

🐛 Bug Report

I am trying to chain two animations so they should work in sequence, however, they're happening at the same time. The first animation is using animation configuration, while another - only duration.

To Reproduce

Steps to reproduce the behavior:

  1. create some UI stuff...for example expanding box and elements appearing inside
  2. create useSpring
  3. create useTransition
  4. use config.stiff or any other in useSpring
  5. use duration in config for useTransition
  6. make refs for both animations
  7. chain animations like so: isVisible ? [springRef, transitionRef] : [transitionRef, springRef]

Expected behavior

useChain successfully orchestrates useSpring and useTransition and knows how to handle animations with different configurations, i.e. when useSpring ens, useTransition starts and vice versa.

Link to repro (highly encouraged)

CodeSandbox demo.

Here bug is visible when toggling reverse animation...when a box is hiding its content.

Environment

  • react-spring v9.2.3
  • react v17.0.1
@ShiiRochi
Copy link
Author

ShiiRochi commented Jun 24, 2021

Update: bug described above is happening even if config property would be remove from useTransition.

@joshuaellis
Copy link
Member

I think this is probably related to #1512

@joshuaellis joshuaellis added the template: bug This issue might be a bug label Jun 28, 2021
@ShiiRochi
Copy link
Author

ShiiRochi commented Jun 28, 2021

Agree, there is also #1492 issue, related to the same thing.

@joshuaellis joshuaellis added kind: bug Something isn't working area: core relates to core classes // parts of the library hooks and removed template: bug This issue might be a bug area: core relates to core classes // parts of the library labels Jun 29, 2021
@joshuaellis joshuaellis added this to the v9.3.0 milestone Jun 29, 2021
@joshuaellis joshuaellis self-assigned this Oct 3, 2021
@joshuaellis
Copy link
Member

Hello!

I've pushed a fix as 9.2.6-beta.0 please let me know if this resolves your issue 😄

@joshuaellis joshuaellis added the released in beta this has been released on a beta label Oct 3, 2021
@arteforme
Copy link

Preliminary testing shows that it's been fixed. I'll continue testing and let you know if I find anything.

@joshuaellis joshuaellis added the released This has been released on stable label Oct 6, 2021
@joshuaellis
Copy link
Member

released in v9.2.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug Something isn't working released in beta this has been released on a beta released This has been released on stable
Projects
None yet
Development

No branches or pull requests

3 participants