0.6.0
What's Changed
-
Warning: The following is a breaking change.
ButtonState
action handlers, for alerts and confirmation dialogs, are now passed an optional action, wherenil
represents dismissal from a button that has no action attached (https://github.com/pointfreeco/swiftui-navigation/pull/71). This allows you to get a callback when an alert is dismissed, which can be helpful for both domain-specific problems, but also for libraries built on top of SwiftUI Navigation, like the Composable Architecture. This means wherever you had an alert or confirmation dialog action handler, you must now handle an additionalnil
case:.alert(unwrapping: self.$destination, case: /Destination.alert) { action in switch action { case .randomize: self.count = .random(in: 0...1_000) case .reset: self.count = 0 + case nil: + break } }
-
Added:
ConfirmationDialogState
now supports async action handlers (https://github.com/pointfreeco/swiftui-navigation/pull/68).Note: async action handlers do not support implicit
ButtonStateAction
animations. If you perform async work in a button state action handler, you must perform any SwiftUI animations explicitly in the handler. -
Fixed: Implicit
ButtonState
animations broke when action handlers became asynchronous. They have been restored for synchronous handlers, and will emit a runtime warning when an animation action is handled asynchronously (https://github.com/pointfreeco/swiftui-navigation/pull/70). -
Infrastructure: doc fixes (thanks @dy-kim, https://github.com/pointfreeco/swiftui-navigation/pull/63; @Jager-yoo ,https://github.com/pointfreeco/swiftui-navigation/pull/64); Standups fixes (thanks @nesium, https://github.com/pointfreeco/swiftui-navigation/pull/66; https://github.com/pointfreeco/swiftui-navigation/pull/67)
New Contributors
- @dy-kim made their first contribution in https://github.com/pointfreeco/swiftui-navigation/pull/63
- @nesium made their first contribution in https://github.com/pointfreeco/swiftui-navigation/pull/66
Full Changelog: pointfreeco/swiftui-navigation@0.5.0...0.6.0