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

skipAnimations breaks enter defined as function #1429

Open
kazdegroot opened this issue Apr 16, 2021 · 2 comments
Open

skipAnimations breaks enter defined as function #1429

kazdegroot opened this issue Apr 16, 2021 · 2 comments
Labels
area: core relates to core classes // parts of the library kind: bug Something isn't working

Comments

@kazdegroot
Copy link

🐛 Bug Report

When Globals.assign({ skipAnimation: true }); is used, an useTransition defining enter as a function will not have those changes applied, while one providing the same change as an object works fine.

To Reproduce

  1. Add an transition to a component with the enter prop set to a function (e.g. enter: () => async next => await next({opacity: 1}))
  2. See it work
  3. Set Globals.assign({ skipAnimation: true });
  4. See the transition no longer applying the styles.

Expected behavior

Have the end result be the same as when skipAnimation was false

Link to repro (highly encouraged)

https://codesandbox.io/s/awesome-vaughan-bdwcr

Has two components, one using a function enter, the other an object enter. Both work the same with skipAnimation false, the one using a function stops working when skipAnimation is true.

Environment

  • react-spring v9.1.1
  • react v17.0.2
@joshuaellis joshuaellis added area: core relates to core classes // parts of the library hooks template: bug This issue might be a bug labels Apr 21, 2021
@joshuaellis joshuaellis modified the milestones: v9.2.0, v9.X.X Apr 21, 2021
@joshuaellis joshuaellis modified the milestones: v9.X.X, v9.3.0 May 13, 2021
@joshuaellis joshuaellis removed the v9 label Jun 29, 2021
@joshuaellis joshuaellis modified the milestones: v9.3.0, v9.4.0 Oct 10, 2021
@joshuaellis joshuaellis removed this from the v9.4.0 milestone Jan 3, 2022
@joshuaellis joshuaellis removed the hooks label Mar 1, 2022
@joshuaellis joshuaellis added kind: bug Something isn't working and removed template: bug This issue might be a bug labels Feb 6, 2023
@Runeii
Copy link

Runeii commented May 17, 2023

Hi there, I see this was removed from the 9.4.0 milestone a year ago and has been stale since. This issue prevents easily disable springs globally when users prefer reduced motion, as well as means spring animations have to run in realtime when testing in a pipeline. Is there any plan for picking this up in a coming version? Thanks

@joshuaellis
Copy link
Member

Is there any plan for picking this up in a coming version

As a one person development team, I'm afraid to say no there isn't a plan to pick this up in the near future. ofc, anyone is welcome to submit a PR 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: core relates to core classes // parts of the library kind: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants