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(iOS,Paper): fix broken modal go-back animation #2496

Merged
merged 2 commits into from
Nov 13, 2024

Conversation

kkafar
Copy link
Member

@kkafar kkafar commented Nov 12, 2024

Description

We recently fixed left-out modals dismissal when reloading react-native. For some reason
calling in dismissViewControllerAnimated:completion: on nested UINavigationController
(the one responsible for displaying the navigation bar in modal, not the one reponsible for presentation)
during invalidation messes up with the animation.

I'm not really sure why this is the case. Earlier we were calling dismiss on all presented modals,
but not on UINavigationController itself and it worked like a charm.

I've found out that simply animating the change solves the situation - we fix the animation and keep nice
modal dismissal on reload.

Fixes #2488

Changes

☝️

Test code and steps to reproduce

TestModalNavigation

Checklist

Copy link

@roshangm1 roshangm1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works like charm! Tested on my project too. Thanks @kkafar

@kkafar
Copy link
Member Author

kkafar commented Nov 13, 2024

Thanks for trying these changes out @roshangm1

@kkafar kkafar merged commit 68e3d73 into main Nov 13, 2024
5 checks passed
@kkafar kkafar deleted the @kkafar/paper-modal-issue branch November 13, 2024 08:59
@debugtheworldbot
Copy link

Great! Kindly asking when will the new version be released?

@kkafar
Copy link
Member Author

kkafar commented Nov 14, 2024

I'm going to release in few hours

@kkafar
Copy link
Member Author

kkafar commented Nov 14, 2024

I've released 4.1.0 while ago

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.

Navigating back from modal has animation glitch in old architecture with RNS 4.0.0 (React Navigation v7)
3 participants