Releases: RobertDresler/SwiftUINavigation
2.0.2
Release Notes
This version introduces major breaking changes, but it is improved based on more thorough research—now all concepts should make even more sense.
🚀 Features:
NavigationNode
is nowNavigationModel
—this naming is more accurate to what it actually does.NavigationWindow
is nowRootNavigationView
, allowing it to be used in UIKit navigation during migration.- Simplified
DefaultStackRootNavigationModel
initializers.
⚠️ Breaking Changes:
- Replace
NavigationNode
withNavigationModel
wherever it was used. - If you were using
DefaultStackRootNavigationModel
with thestackNodes:
argument, remove the argument name:DefaultStackRootNavigationModel(YourNode()) DefaultStackRootNavigationModel([YourNode(), YourNode()])
- Rename
NavigationWindow
toRootNavigationView
. - To correctly implement object lifecycles, create the root node you pass to
RootNavigationView
using@StateObject
. See the README for details.
1.5.0
Release Notes
This version introduces several breaking changes. I sincerely apologize for any inconvenience, but these updates ultimately make the code much cleaner. Thank you for your understanding.
🚀 Features:
- Removed the framework's built-in deep linking logic and updated documentation to explain how deep linking can be implemented.
- Removed
NavigationNodeState
. - Automatically mark settable (
var
) properties with@Published
. - Fixed animation command logic.
⚠️ Breaking Changes:
-
If you relied on the framework's built-in deep linking logic, such as
NavigationDeepLink
orNavigationDeepLinkHandler
, please remove it. Since deep link handling varies between projects, its implementation is now entirely up to the developer. -
If you used
StackRootNavigationNode
instead of.stacked
, rename it toDefaultStackRootNavigationNode
(this change does not apply to@StackRootNavigationNode
). -
If you have custom implementation of
StackRootNavigationNode
update followingfunc body(for content: StackRootNavigationNodeView) -> some View { content }
to
func body(for content: StackRootNavigationNodeView<YourNavigationNodeName>) -> some View { content }
-
If you have custom implementation of
StackRootNavigationNode
add followingvar stackNodes: [StackNavigationNode] var tabBarToolbarBehavior: StackTabBarToolbarBehavior
-
If you have custom implementation of
SwitchedNavigationNode
update followingfunc body(for content: SwitchedNavigationNodeView) -> some View { content }
to
func body(for content: SwitchedNavigationNodeView<YourNavigationNodeName>) -> some View { content }
-
If you have custom implementation of
SwitchedNavigationNode
add followingvar switchedNode: (any NavigationNode)?
-
If you have custom implementation of
TabsRootNavigationNode
add followingfunc body(for content: TabsRootNavigationNodeView) -> some View { content }
to
func body(for content: TabsRootNavigationNodeView<YourNavigationNodeName>) -> some View { content }
-
If you have custom implementation of
TabsRootNavigationNode
add followingvar selectedTabNodeID: AnyHashable var tabsNodes: [any TabNode]
1.4.0
Release Notes
🚀 Features:
- Support for modifying
StackRootNavigationNode
/SwitchedNavigationNode
/TabsRootNavigationNode
bodies - Binding fixes
⚠️ Breaking Changes:
- If you have custom implementation of
StackRootNavigationNode
add followingfunc body(for content: StackRootNavigationNodeView) -> some View { content }
- If you have custom implementation of
SwitchedNavigationNode
add followingfunc body(for content: SwitchedNavigationNodeView) -> some View { content }
- If you have custom implementation of
TabsRootNavigationNode
add followingfunc body(for content: TabsRootNavigationNodeView) -> some View { content }
Simplifications + StackTabBarToolbarBehavior
Release Notes
🚀 New Features:
This release simplifies children binding, makes message listening clearer, and introduces StackTabBarToolbarBehavior
.
⚠️ Breaking Changes:
NavigationNodeState
:
Instead of using the getter for publishers:Use the getter for nodes:public override var childrenPublishers: [any Publisher<[NavigationNode], Never>] { super.childrenPublishers + [$tabs.map { $0.map { $0.node } }] }
public override var children: [any NavigationNode] { super.children + tabs.map(\.node) }
TabsRootNavigationNodeState
:
When initializing, pass the ID to theselectedTabNodeID
argument instead of passing the whole node.
🔧 Changes:
- Simplified children binding logic
- Simplified
TabsRootNavigationNodeState
initialization - Added
StackTabBarToolbarBehavior
to control tab bar toolbar behavior - Added
onMessageReceived(_:)
, which simplifies the syntax for listening to messages
Execution simplification
Release Notes
🚀 New Features:
This release introduces Static Getters, which simplify the usage of NavigationCommand
, PresentedNavigationNode
and StackRootNavigationNode
⚠️ Breaking Changes:
executeCommand
andcanExecuteCommand
have been renamed toexecute
andcanExecute
.
🔧 Changes:
- Predefined
NavigationCommand
instances can now be created using their static getters, e.g..present(_:animated:)
. - Predefined
PresentedNavigationNode
instances can now be created using their static getters, e.g..fullScreenCover(_:)
. StackRootNavigationNode
can now be created using.stacked(_:)
and its variations.
NavigationNodeState
This release introduces NavigationNodeState
, which separates state logic from the NavigationNode
itself.
You will need to update your NavigationNode
s to the new structure.
- Instead of subclassing
NavigationNode
, use the@NavigationNode
macro. - Do not override
view: AnyView
anymore. Instead, definevar body: some View
.
Shipped!
1.0.3