Skip to content

Commit c1e4b0b

Browse files
authored
Merge pull request #1160 from square/ray/tutorial-big-disclaimer
Updates tutorial with disclaimer about stale API
2 parents 43919d1 + 8bef55c commit c1e4b0b

File tree

7 files changed

+119
-3
lines changed

7 files changed

+119
-3
lines changed

RELEASING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
1. `git merge --no-ff origin/yourname/kotlin-v0.1.0`
8282
1. `git push origin gh-pages`
8383

84-
1. Once Maven artifacts are synced, update the workflow version used by the tutorial in
84+
1. _Don't do this until the tutorial gets updated._ Once Maven artifacts are synced, update the workflow version used by the tutorial in
8585
`samples/tutorial/build.gradle`.
8686

8787
### Validating Markdown

samples/tutorial/README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,25 @@
11
# Tutorial
22

3+
## Stale Docs Warning
4+
5+
**This tutorial is tied to an older version of Workflow, and relies on API that has been deprecated or deleted.**
6+
The general concepts are the same, and refactoring to the current API is straightforward,
7+
so it is still worthwhile to work through the tutorial in its current state until we find time to update it.
8+
(Track that work [here](https://github.com/square/workflow-kotlin/issues/905)
9+
and [here](https://github.com/square/workflow-kotlin/issues/884).)
10+
11+
Here's a summary of what has changed, and what replaces what:
12+
13+
- Use of `ViewRegistry` is now optional, and rare.
14+
Have your renderings implement `AndroidScreen` or `ComposeScreen` to avoid it.
15+
- The API for binding a rendering to UI code has changed as follows, and can all
16+
be avoided if you use `ComposeScreen`:
17+
- `ViewFactory<in RenderingT : Any>` is replaced by `ScreenViewFactory<in ScreenT : Screen>`.
18+
-`LayoutRunner<RenderingT : Any>` is replaced by `ScreenViewRunner<in ScreenT : Screen>`.
19+
- `LayoutRunner.bind` is replaced by `ScreenViewFactory.fromViewBinding`.
20+
- `BackStackScreen` has been moved to package `com.squareup.workflow1.ui.navigation`.
21+
- `EditText.updateText` and `EditText.setTextChangedListener` are replaced by `TextController`
22+
323
## Overview
424

525
Oh hi! Looks like you want build some software with Workflows! It's a bit different from traditional

samples/tutorial/Tutorial1.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,25 @@
22

33
_Let's get something on the screen..._
44

5-
_Note that this tutorial differs slightly from the latest [documentation](https://square.github.io/workflow/). However the core concepts are the same, you can easily refactor your completed tutorial to reflect the latest API if you wish._
5+
## Stale Docs Warning
6+
7+
**This tutorial is tied to an older version of Workflow, and relies on API that has been deprecated or deleted.**
8+
The general concepts are the same, and refactoring to the current API is straightforward,
9+
so it is still worthwhile to work through the tutorial in its current state until we find time to update it.
10+
(Track that work [here](https://github.com/square/workflow-kotlin/issues/905)
11+
and [here](https://github.com/square/workflow-kotlin/issues/884).)
12+
13+
Here's a summary of what has changed, and what replaces what:
14+
15+
- Use of `ViewRegistry` is now optional, and rare.
16+
Have your renderings implement `AndroidScreen` or `ComposeScreen` to avoid it.
17+
- The API for binding a rendering to UI code has changed as follows, and can all
18+
be avoided if you use `ComposeScreen`:
19+
- `ViewFactory<in RenderingT : Any>` is replaced by `ScreenViewFactory<in ScreenT : Screen>`.
20+
-`LayoutRunner<RenderingT : Any>` is replaced by `ScreenViewRunner<in ScreenT : Screen>`.
21+
- `LayoutRunner.bind` is replaced by `ScreenViewFactory.fromViewBinding`.
22+
- `BackStackScreen` has been moved to package `com.squareup.workflow1.ui.navigation`.
23+
- `EditText.updateText` and `EditText.setTextChangedListener` are replaced by `TextController`
624

725
## Setup
826

samples/tutorial/Tutorial2.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,26 @@
22

33
_Multiple Screens and Navigation_
44

5+
## Stale Docs Warning
6+
7+
**This tutorial is tied to an older version of Workflow, and relies on API that has been deprecated or deleted.**
8+
The general concepts are the same, and refactoring to the current API is straightforward,
9+
so it is still worthwhile to work through the tutorial in its current state until we find time to update it.
10+
(Track that work [here](https://github.com/square/workflow-kotlin/issues/905)
11+
and [here](https://github.com/square/workflow-kotlin/issues/884).)
12+
13+
Here's a summary of what has changed, and what replaces what:
14+
15+
- Use of `ViewRegistry` is now optional, and rare.
16+
Have your renderings implement `AndroidScreen` or `ComposeScreen` to avoid it.
17+
- The API for binding a rendering to UI code has changed as follows, and can all
18+
be avoided if you use `ComposeScreen`:
19+
- `ViewFactory<in RenderingT : Any>` is replaced by `ScreenViewFactory<in ScreenT : Screen>`.
20+
-`LayoutRunner<RenderingT : Any>` is replaced by `ScreenViewRunner<in ScreenT : Screen>`.
21+
- `LayoutRunner.bind` is replaced by `ScreenViewFactory.fromViewBinding`.
22+
- `BackStackScreen` has been moved to package `com.squareup.workflow1.ui.navigation`.
23+
- `EditText.updateText` and `EditText.setTextChangedListener` are replaced by `TextController`
24+
525
## Setup
626

727
To follow this tutorial, launch Android Studio and open this folder (`samples/tutorial`).

samples/tutorial/Tutorial3.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,24 @@
11
# Step 3
22

3-
_State throughout a tree of workflows_
3+
## Stale Docs Warning
4+
5+
**This tutorial is tied to an older version of Workflow, and relies on API that has been deprecated or deleted.**
6+
The general concepts are the same, and refactoring to the current API is straightforward,
7+
so it is still worthwhile to work through the tutorial in its current state until we find time to update it.
8+
(Track that work [here](https://github.com/square/workflow-kotlin/issues/905)
9+
and [here](https://github.com/square/workflow-kotlin/issues/884).)
10+
11+
Here's a summary of what has changed, and what replaces what:
12+
13+
- Use of `ViewRegistry` is now optional, and rare.
14+
Have your renderings implement `AndroidScreen` or `ComposeScreen` to avoid it.
15+
- The API for binding a rendering to UI code has changed as follows, and can all
16+
be avoided if you use `ComposeScreen`:
17+
- `ViewFactory<in RenderingT : Any>` is replaced by `ScreenViewFactory<in ScreenT : Screen>`.
18+
-`LayoutRunner<RenderingT : Any>` is replaced by `ScreenViewRunner<in ScreenT : Screen>`.
19+
- `LayoutRunner.bind` is replaced by `ScreenViewFactory.fromViewBinding`.
20+
- `BackStackScreen` has been moved to package `com.squareup.workflow1.ui.navigation`.
21+
- `EditText.updateText` and `EditText.setTextChangedListener` are replaced by `TextController`
422

523
## Setup
624

samples/tutorial/Tutorial4.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,26 @@
22

33
_Refactoring and rebalancing a tree of Workflows_
44

5+
## Stale Docs Warning
6+
7+
**This tutorial is tied to an older version of Workflow, and relies on API that has been deprecated or deleted.**
8+
The general concepts are the same, and refactoring to the current API is straightforward,
9+
so it is still worthwhile to work through the tutorial in its current state until we find time to update it.
10+
(Track that work [here](https://github.com/square/workflow-kotlin/issues/905)
11+
and [here](https://github.com/square/workflow-kotlin/issues/884).)
12+
13+
Here's a summary of what has changed, and what replaces what:
14+
15+
- Use of `ViewRegistry` is now optional, and rare.
16+
Have your renderings implement `AndroidScreen` or `ComposeScreen` to avoid it.
17+
- The API for binding a rendering to UI code has changed as follows, and can all
18+
be avoided if you use `ComposeScreen`:
19+
- `ViewFactory<in RenderingT : Any>` is replaced by `ScreenViewFactory<in ScreenT : Screen>`.
20+
- `LayoutRunner<RenderingT : Any>` is replaced by `ScreenViewRunner<in ScreenT : Screen>`.
21+
- `LayoutRunner.bind` is replaced by `ScreenViewFactory.fromViewBinding`.
22+
- `BackStackScreen` has been moved to package `com.squareup.workflow1.ui.navigation`.
23+
- `EditText.updateText` and `EditText.setTextChangedListener` are replaced by `TextController`
24+
525
## Setup
626

727
To follow this tutorial, launch Android Studio and open this folder (`samples/tutorial`).

samples/tutorial/Tutorial5.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,26 @@
22

33
_Unit and Integration Testing Workflows_
44

5+
## Stale Docs Warning
6+
7+
**This tutorial is tied to an older version of Workflow, and relies on API that has been deprecated or deleted.**
8+
The general concepts are the same, and refactoring to the current API is straightforward,
9+
so it is still worthwhile to work through the tutorial in its current state until we find time to update it.
10+
(Track that work [here](https://github.com/square/workflow-kotlin/issues/905)
11+
and [here](https://github.com/square/workflow-kotlin/issues/884).)
12+
13+
Here's a summary of what has changed, and what replaces what:
14+
15+
- Use of `ViewRegistry` is now optional, and rare.
16+
Have your renderings implement `AndroidScreen` or `ComposeScreen` to avoid it.
17+
- The API for binding a rendering to UI code has changed as follows, and can all
18+
be avoided if you use `ComposeScreen`:
19+
- `ViewFactory<in RenderingT : Any>` is replaced by `ScreenViewFactory<in ScreenT : Screen>`.
20+
- `LayoutRunner<RenderingT : Any>` is replaced by `ScreenViewRunner<in ScreenT : Screen>`.
21+
- `LayoutRunner.bind` is replaced by `ScreenViewFactory.fromViewBinding`.
22+
- `BackStackScreen` has been moved to package `com.squareup.workflow1.ui.navigation`.
23+
- `EditText.updateText` and `EditText.setTextChangedListener` are replaced by `TextController`
24+
525
## Setup
626

727
To follow this tutorial, launch Android Studio and open this folder (`samples/tutorial`).

0 commit comments

Comments
 (0)