Skip to content

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

Merged
merged 6 commits into from
Nov 21, 2022

Conversation

mbrandonw
Copy link
Member

We have extracted TexState, AlertState and ConfirmationDialogState 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.

Comment on lines -847 to -855
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)
}
}

Copy link
Member Author

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.

Comment on lines -1042 to -1044
// MARK: - Deprecated after 0.23.0:

extension AlertState.Button {
Copy link
Member Author

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"),
Copy link
Member Author

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.

@mbrandonw mbrandonw merged commit 0a19581 into main Nov 21, 2022
@mbrandonw mbrandonw deleted the swiftui-navigation-alert branch November 21, 2022 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants