Modernization#12
Conversation
There was a problem hiding this comment.
Pull request overview
This PR modernises XUI: bumps the SwiftPM tools version and platform floor (iOS 15+ / macOS 12+ / watchOS 8+ / tvOS 15+ / Swift 5.9+), migrates @_functionBuilder to @resultBuilder, deprecates the legacy NavigationLink(isActive:)-based navigation APIs and Result/Combine helpers, adds a NavigationStack-based navigationDestination(model:), renames the content: closure label to destination: on the sheet/popover modifiers, changes firstReceiver from Receiver! to Receiver?, makes two Binding.first(...) overloads public, removes the SwiftPM 5.3-era Linux test plumbing, and adds extensive doc comments plus a rewritten README and a MIGRATING guide.
Changes:
- Platform floor + Swift 5.9 bump; deprecate
NavigationLink(isActive:)-based helpers andResult+Combine; add iOS 16navigationDestination(model:). - Rename
content:→destination:onsheet(model:)/popover(model:)/SheetModifier/PopoverModifier; makefirstReceiverreturnReceiver?; expose twoBinding.firstoverloads aspublic. - Major doc-comment expansion across the library, rewritten README, new MIGRATING.md, deletion of
LinuxMain.swift/XCTestManifests.swift/allTests.
Reviewed changes
Copilot reviewed 25 out of 25 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| Package.swift | Bumps tools-version to 5.9 and platform floor. |
| README.md | Full rewrite covering modern API surface, coordinator pattern, deprecations. |
| MIGRATING.md | New migration guide for the 2.0 breaking changes. |
| Sources/XUI/Views/View+NavigationDestination.swift | New iOS 16+ wrapper around navigationDestination(isPresented:). |
| Sources/XUI/Views/View+Navigation.swift | Adds deprecation annotations and doc comments to legacy navigation helpers. |
| Sources/XUI/Views/NavigationLink.swift | Deprecates the model-based NavigationLink initializer. |
| Sources/XUI/Views/View+Sheet.swift | Renames content: to destination: and documents reference-type requirement. |
| Sources/XUI/Views/View+Popover.swift | Same rename and reference-type documentation as the sheet variant. |
| Sources/XUI/ViewModifiers/SheetModifier.swift | Matches the destination: rename and adds docs. |
| Sources/XUI/ViewModifiers/PopoverModifier.swift | Matches the destination: rename and adds docs. |
| Sources/XUI/ViewModifiers/NavigationModifier.swift | Deprecation annotation + doc comment. |
| Sources/XUI/Store/Store.swift | Doc comments and a more informative assertion message. |
| Sources/XUI/Store/ViewModel.swift | Adds documentation explaining the protocol composition. |
| Sources/XUI/Store/AnyObservableObject.swift | Adds documentation. |
| Sources/XUI/DeepLink/DeepLinkable.swift | Adds documentation; header on → by typo. |
| Sources/XUI/DeepLink/DeepLinkable+Receiver.swift | Changes return type from Receiver! to Receiver? and documents the algorithm. |
| Sources/XUI/DeepLink/DeepLinkableBuilder.swift | Migrates to @resultBuilder and adds docs. |
| Sources/XUI/Combine/CancellableBuilder.swift | Migrates to @resultBuilder and adds docs. |
| Sources/XUI/Combine/Result+Combine.swift | Deprecates helpers and tightens doc comments. |
| Sources/XUI/Binding/Binding+Force.swift | Adds safety-warning doc comments. |
| Sources/XUI/Binding/Binding+Element.swift | Promotes two overloads to public with docs. |
| Sources/XUI/Binding/Binding+Change.swift | Adds doc comments. |
| Tests/LinuxMain.swift | Deleted (auto-discovery on Linux). |
| Tests/XUITests/XCTestManifests.swift | Deleted (auto-discovery on Linux). |
| Tests/XUITests/XUITests.swift | Removes the now-unused allTests manifest. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| return navigationDestination(isPresented: isPresented) { | ||
| if let value = model.wrappedValue { | ||
| destination(value) | ||
| } | ||
| } |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
No description provided.