-
Notifications
You must be signed in to change notification settings - Fork 44
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
[fix] View environment customizations on hosting VCs now propagate to SwiftUI environment #297
Conversation
1291827
to
38e6320
Compare
import ViewEnvironment | ||
@_spi(ViewEnvironmentWiring) import ViewEnvironmentUI | ||
import XCTest | ||
@testable import WorkflowSwiftUI |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@watt The @testable
was required here because the StateAccessor
init is not public. Not sure if that was intentional or not. I can open it up as part of this if you'd like!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, probably OK if it's public.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏽 46961b0
import ViewEnvironment | ||
@_spi(ViewEnvironmentWiring) import ViewEnvironmentUI | ||
import XCTest | ||
@testable import WorkflowSwiftUI |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, probably OK if it's public.
These changes ensure that any view environment customizations made to a Swift UI screen's backing VC are propagated to the SwiftUI environment. We hit this issue in Market when attempting to propagate the VC's navigation item to SwiftUI and there may be other uses for this behaviour too.
Checklist