Skip to content

Releases: RobertDresler/SwiftUINavigation

2.0.2

02 Feb 20:47
Compare
Choose a tag to compare

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 now NavigationModel—this naming is more accurate to what it actually does.
  • NavigationWindow is now RootNavigationView, allowing it to be used in UIKit navigation during migration.
  • Simplified DefaultStackRootNavigationModel initializers.

⚠️ Breaking Changes:

  • Replace NavigationNode with NavigationModel wherever it was used.
  • If you were using DefaultStackRootNavigationModel with the stackNodes: argument, remove the argument name:
    DefaultStackRootNavigationModel(YourNode())
    DefaultStackRootNavigationModel([YourNode(), YourNode()])
  • Rename NavigationWindow to RootNavigationView.
  • To correctly implement object lifecycles, create the root node you pass to RootNavigationView using @StateObject. See the README for details.

1.5.0

01 Feb 18:32
e7a1a97
Compare
Choose a tag to compare

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 or NavigationDeepLinkHandler, 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 to DefaultStackRootNavigationNode (this change does not apply to @StackRootNavigationNode).

  • If you have custom implementation of StackRootNavigationNode update following

    func 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 following

    var stackNodes: [StackNavigationNode]
    var tabBarToolbarBehavior: StackTabBarToolbarBehavior
  • If you have custom implementation of SwitchedNavigationNode update following

    func 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 following

    var switchedNode: (any NavigationNode)?
  • If you have custom implementation of TabsRootNavigationNode add following

    func 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 following

    var selectedTabNodeID: AnyHashable
    var tabsNodes: [any TabNode]

1.4.0

31 Jan 17:46
232ae86
Compare
Choose a tag to compare

Release Notes

🚀 Features:

  • Support for modifying StackRootNavigationNode/SwitchedNavigationNode/TabsRootNavigationNode bodies
  • Binding fixes

⚠️ Breaking Changes:

  • If you have custom implementation of StackRootNavigationNode add following
    func body(for content: StackRootNavigationNodeView) -> some View {
        content
    }
  • If you have custom implementation of SwitchedNavigationNode add following
    func body(for content: SwitchedNavigationNodeView) -> some View {
        content
    }
  • If you have custom implementation of TabsRootNavigationNode add following
    func body(for content: TabsRootNavigationNodeView) -> some View {
        content
    }

Simplifications + StackTabBarToolbarBehavior

30 Jan 19:43
27196e8
Compare
Choose a tag to compare

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:
    public override var childrenPublishers: [any Publisher<[NavigationNode], Never>] {
        super.childrenPublishers + [$tabs.map { $0.map { $0.node } }]
    }
    Use the getter for nodes:
    public override var children: [any NavigationNode] {
        super.children + tabs.map(\.node)
    }
  • TabsRootNavigationNodeState:
    When initializing, pass the ID to the selectedTabNodeID 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

24 Jan 10:55
Compare
Choose a tag to compare

Release Notes

🚀 New Features:

This release introduces Static Getters, which simplify the usage of NavigationCommand, PresentedNavigationNode and StackRootNavigationNode

⚠️ Breaking Changes:

  • executeCommand and canExecuteCommand have been renamed to execute and canExecute.

🔧 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

22 Jan 23:48
b2f4909
Compare
Choose a tag to compare

This release introduces NavigationNodeState, which separates state logic from the NavigationNode itself.

⚠️ Breaking Changes:
You will need to update your NavigationNodes to the new structure.

  • Instead of subclassing NavigationNode, use the @NavigationNode macro.
  • Do not override view: AnyView anymore. Instead, define var body: some View.

Shipped!

12 Jan 15:11
Compare
Choose a tag to compare
1.0.3