Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improving documentation #215

Merged
merged 3 commits into from
Nov 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .github/UPGRADE_PATH.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,19 @@ Our directions are written for only 1 major version upgrade at a time, as we hav
<summary><b>V4 -> V5</b></summary>

## 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
// 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
Expand Down
2 changes: 1 addition & 1 deletion .github/guides/Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down