-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
useChain does not work as expected for transitions #1453
Comments
What I have found out so far: |
Firstly, I think you need to set an actual height on the inner |
Ups... :( I had forgotten to save the CSS file. https://codesandbox.io/s/wizardly-leaf-b4v5g?file=/src/App.tsx https://user-images.githubusercontent.com/16589094/116391969-24844480-a820-11eb-84de-b9d48906838d.mp4
|
So the issue is the background color changes whilst the transitions are animating in. but actually, the background color should change then the divs animate in? |
Yes correct! |
I had the chance to take a closer look at the problem with the missing controller. If I understand correct at this line the
But
defaultProps come from
But ref is not in DEFAULT_PROPS react-spring/packages/core/src/helpers.ts Lines 96 to 104 in 9568020
|
It sounds like you're gonna have a fix quicker than I, feel free to make a PR for this ⭐ although I will be looking for us to include tests to ensure refs that are passed are assigned and working. |
this has been released in |
Unfortunately my changes breaks some transitions completely if a I try to figure out why for some hours... react-spring/packages/core/src/hooks/useTransition.tsx Lines 302 to 303 in 922f640
Unfortunately I have no deeper insight here, maybe you can help? |
Okay I will revert your commit because we can't have a regression. Regarding me looking at it, I will assign the ticket to myself to look at when I have time too. |
Maybe a little support, it initially breaks with the |
Hey @joshuaellis, I imagine you have a lot of work to do. Nevertheless, because my current project relies very heavily on chained animations, I would like to ask carefully if there is a forecast when you could look at this bug? Or maybe there is another contributor who could at least give me a hint where the problem should be solved? Thank you! 🙏 |
Hi @martinkutter, unfortunately I can't tell you when i'll be able to work on this, if you're interested in enabling me to put more time into the project, feel free to sponsor me so I don't have to do as much client work. But it is on my radar for this weekend time permitting. |
In this example you're trying to pass a regular React Ref, which is no longer possible across the entire library. Was this the only issue? Or did I miss something. Because if it is, I think you did solve the issue... |
Thanks for your time! Oh... that was something I changed while testing several versions. I updated the codesandbox and use By the way, sponsoring is a great idea. I will talk to my project owner next week. |
SO, I've had a look at it, yeah this line:
is important, it's what keeps our API consistent, i.e. if you ever pass a ref, you must call edit: see PR for reference. I've also updated a demo and when we go stable I will update the documentation. |
Thank you very much for your time and your PR. While for me it is a little confusing that I have to call |
Well |
This has been released on v9.2.0-beta.4 |
🐛 Bug Report
useChain
does not chain animations correct, ifTransition
should animate afterSpring
.To Reproduce
Spring
first, thanTransition
-> does not workSee https://codesandbox.io/s/wizardly-leaf-b4v5g?file=/src/App.tsx
Transition
first, thanSpring
-> does workcomment out line 38; comment in line 40
Expected behavior
Transition
animation should run afterSpring
animation, not in sequence.Environment
react-spring
v9.1.2react
v17.0.1The text was updated successfully, but these errors were encountered: