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

[fix] Delay conflict with Trail in useTransition #1496

Merged
merged 3 commits into from
May 10, 2021

Conversation

joshuaellis
Copy link
Member

Why

resolves #1099

What

Since we handle the trail prop in useTransition and pass that as our delay prop to the Controller we therefore need to call the original delay prop from the props passed and add that to the payload to ensure timings are correct.

Checklist

  • Ready to be merged

@joshuaellis joshuaellis changed the base branch from master to beta May 9, 2021 21:54
@codesandbox-ci
Copy link

codesandbox-ci bot commented May 9, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 663b94d:

Sandbox Source
spring-card Configuration
spring-goo-blobs Configuration
spring-flip-card Configuration
spring-slide Configuration
spring-draggable-list Configuration
spring-cards-stack Configuration
spring-viewpager Configuration
spring-simple-transition Configuration
spring-image-fade Configuration
spring-list-reordering Configuration
pensive-borg-8udov Issue #1099
muddy-fog-solxl Issue #1099
friendly-cerf-3skwc Issue #1099
quiet-butterfly-hi8c5 Issue #1099

@joshuaellis
Copy link
Member Author

@leinelissen it'd be great if you could confirm this works as expected? Check this slightly modified sandbox out, it uses the PR as react-springhttps://codesandbox.io/s/youthful-boyd-8u981?file=/src/App.js

@leinelissen
Copy link

@joshuaellis Looks like how I was expecting things to work, thanks so much for looking at this. As per your phase styles comment: I found that delay and trail were part of the Typescript bindings for the phase styles object, and as such I was confused on whether this was an accepted setup. I am completely fine with it being static for the transition.

@joshuaellis
Copy link
Member Author

Yeah I did find that odd, I think it's because at the route of phases it's just our to object with I believe is based on a [key:string]: any format to allow loads of flexibility... Before I merge this I might check out we have a "not allowed" list of keywords 🤔

But i'm glad this has solved your issue.

@joshuaellis
Copy link
Member Author

No i've checked, because its to just CSS props you might wanna use, we let most things go through, I guess thats why documentation is important 😅

@joshuaellis joshuaellis merged commit e03e85a into beta May 10, 2021
@joshuaellis joshuaellis deleted the fix/delay-trail-conflict branch May 10, 2021 20:03
@leinelissen
Copy link

Right! I've seeing ghosts then 😅 Thanks again for looking at this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Delay and trail conflict on useTransition (v9.0.0-rc3)
2 participants