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

[Bug]: navigate to an empty view under conditional flow #209

Closed
1 task done
dulllight opened this issue Aug 1, 2022 · 6 comments
Closed
1 task done

[Bug]: navigate to an empty view under conditional flow #209

dulllight opened this issue Aug 1, 2022 · 6 comments
Labels
bug Something isn't working

Comments

@dulllight
Copy link

dulllight commented Aug 1, 2022

Navigate to an empty view under conditional flow with presentation type of navigationLink

Hi, Today I notice a strange behavior. In screen A, there is a toggle. If toggle is on, press "Next", it would lead to screen B. If off, to screen C. If the presentationTyp is navigationLink or modal, when toggle is off, if press "Next", it would not lead to screen C
but an empty view. Would you please help check what might cause this issue? Many thanks.

Version

SwiftCurrent 5.1.5
Xcode 13.3.1

Relevant code sample

WorkflowView(launchingWith: model) {
    WorkflowItem(FirstView.self)  // toggle inside
        .presentationType(.navigationLink)
    WorkflowItem(SecondView.self) //  when toggle is on, it would lead to here
        .presentationType(.navigationLink)
    WorkflowItem(ThridView.self) // when toggle is off, it would lead to here
        .presentationType(.navigationLink)
    WorkflowItem(FourthView.self)
        .presentationType(.navigationLink)
    WorkflowItem(FifthView.self)
        .presentationType(.navigationLink)
)

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@dulllight dulllight added the bug Something isn't working label Aug 1, 2022
@Tyler-Keith-Thompson
Copy link
Collaborator

I'll look into reproducing this, while I do is your WorkflowView inside a NavigationView?

@dulllight
Copy link
Author

dulllight commented Aug 1, 2022 via email

@Tyler-Keith-Thompson
Copy link
Collaborator

SCRepro.zip

I was able to reproduce the issue. I'll look into a fix, but I'm posting the reproduction in case somebody else can get to it faster.

@dulllight
Copy link
Author

dulllight commented Aug 2, 2022 via email

@Tyler-Keith-Thompson
Copy link
Collaborator

Alright! The branch fix-209 has the correct behavior. I still need to get tests updated and fix a couple pipeline things before I can release.

@Tyler-Keith-Thompson
Copy link
Collaborator

Fixed in 5.1.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants