Replies: 1 comment 4 replies
-
Hi @Narsail, your Since this isn't an issue with the library I am going to convert it to a discussion. Please feel free to ask any questions over there! |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
I might be stumbled upon a bug with the
isPresented
utility but I'm unsure whether this actually might be the intended behaviour.One of my features in my app can be used as a presented view (i.e. a sheet) as well as being embedded into a preexisting view.
I utilize
dismiss
in combination with 'isPresented' to dismiss this feature through a cancel button.This view is used a tree navigation hierarchy and thus, even if embedded, can be part of a presented view marked with
@Presents
higher up in the view hierarchy.For clarity sake, let's use the following naming and hierarchy:
RootFeature -> @presents FullScreenFeature (fullscreenmodal) -> EmbeddedFeature (as a conditional child view)
Checklist
main
branch of this package.Expected behavior
I expect the
isPresented
of the EmbeddedFeature to be true, if the feature is utilised behind a@Presents
annotation, while it should be false without the annotation. This should also be the case if the FullScreenFeature, that embeds the EmbeddedFeature, is presented via@Presents
by the RootFeature.Actual behavior
Unfortunately, the
isPresented
within the EmbeddedFeature is true in the aforementioned scenario:RootFeature -> @presents FullScreenFeature (fullscreenmodal) -> EmbeddedFeature (as a conditional child view)
leading to a dismissal of the Fullscreenfeature upon tapping the cancel button in the EmbeddedFeature.
Steps to reproduce
The Composable Architecture version information
No response
Destination operating system
No response
Xcode version information
No response
Swift Compiler version information
No response
Beta Was this translation helpful? Give feedback.
All reactions