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 duration of fading transition #6174

Merged
merged 8 commits into from
Jul 8, 2024
Merged

Conversation

Latropos
Copy link
Contributor

@Latropos Latropos commented Jun 27, 2024

Summary

Now the fading transition executes for 2*duration miliseconds.
We should divide the duration by 2 to fix it, the same way it done for the following transitions:

Also I rename the variables that hold half of the duration and are named "duration" into "halfDuration", as it was suggested during the review

Test plan

Tests are in this PR: #6168

@Latropos Latropos marked this pull request as ready for review June 27, 2024 08:17
@Latropos Latropos requested a review from piaskowyk July 1, 2024 13:23
@Latropos Latropos requested a review from piaskowyk July 2, 2024 10:11
@Latropos Latropos requested a review from piaskowyk July 5, 2024 09:54
@Latropos Latropos added this pull request to the merge queue Jul 8, 2024
Merged via the queue into main with commit 318be4d Jul 8, 2024
6 checks passed
@Latropos Latropos deleted the acynk/fix-fading-transition branch July 8, 2024 09:00
github-merge-queue bot pushed a commit that referenced this pull request Jul 24, 2024
To be up to date we rewritten [Layout
Transition](https://docs.swmansion.com/react-native-reanimated/docs/layout-animations/layout-transitions),
implemented InteractiveExample with selectable transition and added new,
refreshed videos.


- [x] Jumping, Curved and Entry/Exit Transition are available on web

- [x] This needs latest react-native-reanimated@nightly

- [x] It includes new updated Fading default `duration` from this
[PR](#6174).

- [x] check default duration in transitions




Before:



https://github.com/software-mansion/react-native-reanimated/assets/59940332/9d845bcf-776c-4514-aa99-c825fb4ceef6


After:


https://github.com/software-mansion/react-native-reanimated/assets/59940332/1e721176-273f-4740-b0a5-27f69f4a6140


How interactivExample works:


https://github.com/software-mansion/react-native-reanimated/assets/59940332/cbe09f76-9579-4b13-9c4d-cbbd23911934
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.

2 participants