-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Depend on SwiftUINavigation for TextState, AlertState, etc... #1685
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
Conversation
extension AlertState.Button { | ||
@available( | ||
*, deprecated, message: "Cancel buttons must be given an explicit label as their first argument" | ||
) | ||
public static func cancel(action: AlertState.ButtonAction? = nil) -> Self { | ||
.init(action: action, label: TextState("Cancel"), role: .cancel) | ||
} | ||
} | ||
|
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.
This wasn't compiling so I just removed since it's so old. But I can debug it if we don't want to remove yet.
// MARK: - Deprecated after 0.23.0: | ||
|
||
extension AlertState.Button { |
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.
Same with all of this.
Package.swift
Outdated
@@ -28,6 +28,7 @@ let package = Package( | |||
.package(url: "https://github.com/pointfreeco/swift-clocks", from: "0.1.4"), | |||
.package(url: "https://github.com/pointfreeco/swift-custom-dump", from: "0.6.0"), | |||
.package(url: "https://github.com/pointfreeco/swift-identified-collections", from: "0.4.1"), | |||
.package(url: "https://github.com/pointfreeco/swiftui-navigation", branch: "fixes"), |
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.
I think we need the changes in this branch in order to integrate with TCA.
We have extracted
TexState
,AlertState
andConfirmationDialogState
from this library and put it in our SwiftUINavigation library so that vanilla SwiftUI can take advantage of those tools. TCA will now depend on SwiftUINavigation, but not all of it. Just on a small, "internal" library called _SwiftUINavigationState.