-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
Description
After updating to 1.19
and everyone version in-between up to the latest 1.21.1
we have had a bug where using the @Dependency(\.dismiss)
effect has been causing a glitch animation on dismissal. If the sheet is dismissed by tapping outside of the sheet the bug does not occur.
It seems to be caused by a combination of factors:
- using the deprecated
.sheet(store:)
- using the dismiss effect
- using TCA version
v1.19.0
or above - and using
presentationDetents
At the moment we are unable to update our project to use @Observable
so we are still relying on ViewStore
.
I've found a thread with another user that has the same issue
https://pointfreecommunity.slack.com/archives/C04KQQ7NXHV/p1746103346575989
I've also attached a project that reproduces the issue.
Checklist
- I have determined whether this bug is also reproducible in a vanilla SwiftUI project.
- If possible, I've reproduced the issue using the
main
branch of this package. - This issue hasn't been addressed in an existing GitHub issue or discussion.
Expected behavior
The sheet to be dismissed without being presented in full initially.
Actual behavior
The sheet seems to be presented in full before dismissal, I've also slowed down animations on the Simulator in order to see it better.
Simulator.Screen.Recording.-.iPhone.16.Pro.-.2025-08-11.at.15.39.15.mp4
Reproducing project
The Composable Architecture version information
1.21.1
Destination operating system
iOS 18.5
Xcode version information
16.4
Swift Compiler version information
swift-driver version: 1.120.5 Apple Swift version 6.1.2 (swiftlang-6.1.2.1.2 clang-1700.0.13.5)
Target: arm64-apple-macosx15.0