From 36effa40eac6ee391dc33793a9fe28699de1ce7f Mon Sep 17 00:00:00 2001 From: Richard Gist Date: Fri, 4 Nov 2022 12:41:41 -0600 Subject: [PATCH 1/3] Update suggested install version --- .github/guides/Installation.md | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/guides/Installation.md b/.github/guides/Installation.md index 6b2620d09..b940997c6 100644 --- a/.github/guides/Installation.md +++ b/.github/guides/Installation.md @@ -9,7 +9,7 @@ If you're a framework author and want to use SwiftCurrent as a dependency, these Add the following line to the package dependencies: ```swift -.package(url: "https://github.com/wwt/SwiftCurrent.git", .upToNextMajor(from: "4.5.0")), +.package(url: "https://github.com/wwt/SwiftCurrent.git", .upToNextMajor(from: "5.1.0")), ``` ## Get the Products diff --git a/README.md b/README.md index 4f6799be7..28a10babd 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ This library: Why show a quick start when we have an example app? Because it's so easy to get started, we can drop in two code snippets, and you're ready to go! This quick start uses Swift Package Manager and SwiftUI, but for other approaches, [see our installation instructions](https://wwt.github.io/SwiftCurrent/installation.html). ```swift -.package(url: "https://github.com/wwt/SwiftCurrent.git", .upToNextMajor(from: "4.5.0")), +.package(url: "https://github.com/wwt/SwiftCurrent.git", .upToNextMajor(from: "5.1.0")), ... .product(name: "SwiftCurrent", package: "SwiftCurrent"), .product(name: "SwiftCurrent_SwiftUI", package: "SwiftCurrent") From 501b6995978e8524eb4245b6c8f90a6a6037d79b Mon Sep 17 00:00:00 2001 From: Richard Gist Date: Fri, 4 Nov 2022 12:42:46 -0600 Subject: [PATCH 2/3] Change to upgrade instructions to call out for better clarity and what WorkflowGroup is. --- .github/UPGRADE_PATH.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/UPGRADE_PATH.md b/.github/UPGRADE_PATH.md index 7130bdd23..1ddecb088 100644 --- a/.github/UPGRADE_PATH.md +++ b/.github/UPGRADE_PATH.md @@ -7,7 +7,7 @@ Our directions are written for only 1 major version upgrade at a time, as we hav V4 -> V5 ## SwiftUI - WorkflowView - Our approach to a SwiftUI API drastically changed. This new API is much more idiomatic and natural feeling when using SwiftUI. Additionally, it enables a series of new features. Previously, you used `thenProceed(with:)` and `WorkflowLauncher` to launch a workflow in SwiftUI. You now use `WorkflowGroup` and `WorkflowItem`. + Our approach to a SwiftUI API drastically changed. This new API is much more idiomatic and natural feeling when using SwiftUI. Additionally, it enables a series of new features. Previously, you used `thenProceed(with:)` and `WorkflowLauncher` to launch a workflow in SwiftUI. You now use `WorkflowItem` and `WorkflowView`, respectively. If you need more than 10 `WorkflowItem` in your workflow, use `WorkflowGroup` similar to `Group` for other SwiftUI views. ```swift WorkflowView { From f8b1a10aa418039e39f5603d2170a28127865b73 Mon Sep 17 00:00:00 2001 From: Richard Gist Date: Fri, 4 Nov 2022 12:49:16 -0600 Subject: [PATCH 3/3] Adding Old to New code comparison to upgrade path --- .github/UPGRADE_PATH.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/UPGRADE_PATH.md b/.github/UPGRADE_PATH.md index 1ddecb088..37c7a802a 100644 --- a/.github/UPGRADE_PATH.md +++ b/.github/UPGRADE_PATH.md @@ -10,6 +10,16 @@ Our directions are written for only 1 major version upgrade at a time, as we hav Our approach to a SwiftUI API drastically changed. This new API is much more idiomatic and natural feeling when using SwiftUI. Additionally, it enables a series of new features. Previously, you used `thenProceed(with:)` and `WorkflowLauncher` to launch a workflow in SwiftUI. You now use `WorkflowItem` and `WorkflowView`, respectively. If you need more than 10 `WorkflowItem` in your workflow, use `WorkflowGroup` similar to `Group` for other SwiftUI views. ```swift + // OLD + WorkflowLauncher(isLaunched: .constant(true)) { + thenProceed(with: FirstView.self) { + thenProceed(with: SecondView.self) + } + } + ``` + + ```swift + // NEW WorkflowView { WorkflowItem(FirstView.self) // This view is shown first WorkflowItem(SecondView.self) // After proceeding, this view is shown