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

Dismiss presented controller when parent controller goes away #192

Merged
merged 3 commits into from
Aug 6, 2024

Conversation

stephencelis
Copy link
Member

This brings parity with SwiftUI, where if a view disappears, an attached sheet disappears shortly thereafter.

This brings parity with SwiftUI, where if a view disappears, an attached
sheet disappears shortly thereafter.
@stephencelis stephencelis requested a review from mbrandonw August 6, 2024 05:47
@stephencelis
Copy link
Member Author

stephencelis commented Aug 6, 2024

This closely matches SwiftUI's behavior, which is quite glitchy: when the view disappears, the sheet stays alive till the next render frame, and then is removed immediately without animation. I think technically our behavior is slightly less glitchy in that the render tick seems shorter, but it's still not great behavior, it just avoids an inconsistent view/model state.

  • I'd like to write a test for this before merging
  • I'd like to make sure this plays nicely with controllers that are pushed and not merely presented

@stephencelis stephencelis merged commit 4d275f0 into main Aug 6, 2024
7 checks passed
@stephencelis stephencelis deleted the fix-dismiss branch August 6, 2024 19:04
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