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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
I might be stumbled upon a bug with the
isPresentedutility 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
dismissin 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
@Presentshigher 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
mainbranch of this package.Expected behavior
I expect the
isPresentedof the EmbeddedFeature to be true, if the feature is utilised behind a@Presentsannotation, while it should be false without the annotation. This should also be the case if the FullScreenFeature, that embeds the EmbeddedFeature, is presented via@Presentsby the RootFeature.Actual behavior
Unfortunately, the
isPresentedwithin 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