Releases: square/workflow-kotlin
v1.0.0-alpha.8
v1.0.0-alpha.7
v1.0.0-alpha.6
- Make snapshots lazy again. (#225)
v1.0.0-alpha.5
- Introduce
RenderContext.eventHandler
. (#212) - Introduce
DecorativeViewFactory
. (#183) - Introduce helpers for working with
EditText
s fromLayoutRunner
s. (#198, #201) - Enforce distinct
id
andinflatedId
values. (#182) - Add guarded
setOutput
toenterState
ReplaceWith
expression. (#191) - Disable jetifier. (#193)
ViewRegistry
,LayoutRunner
tidying. (#200)- Make core
RenderTester.expectWorkflow
method internal. (#203) - Fix memory leak in
ModalContainer
. (#220) - Fix ungrammatical error message. (#181)
- Improves exception message for conflicting ids in stubs. (#184)
- Punch up docs on
OverviewDetailScreen.selectDefault
. (#185)
v1.0.0-alpha.4
- Fix expectWorker to match on concrete types of generic workers. (#154)
- Fix RenderTester workflow class matching for mocked workflow instances. (#156)
- Remove unused T param for testFromState. (#158)
- Restore EmittedOutput as a deprecated typealias. (#160)
- Fix workflow expectation crashing when a worker is ran first. (#164)
- Disable build config generation. (#166)
- Allow emitting multiple outputs from root workflow, and consuming multiple outputs from
fragments. (#169 – thanks @bnvinay92!) - Let WorkflowFragment subclasses override root view's layoutParams. (#169 – thanks @bnvinay92!)
- Introduce WorkflowViewStub.updatesVisibility. (#178)
v1.0.0-alpha.3
v1.0.0-alpha.2
General prep for 1.0 release
- Rename package and Maven group to
com.squareup.workflow1
. (#113) - Remove unnecessary data classes from public, non-experimental APIs. (#69)
- Delete
legacy-*
modules. (#76)
"Grand Unified Workflow Theory"
To make the behavior of Worker
s more consistent between Swift and Kotlin and simplify the core workflow APIs, both languages have eliminated "worker" as a primary concept in the runtime, and changed to implement workers in terms of workflows and the new, more fundamental concept of "side effects". A side effect is simply a coroutine that is always identified by a string key and
runs in the context of the workflow that started it. For more information, see the issues workflow/#1021 and workflow/#961. The following changes are related:
- Introduce
RenderContext.runningSideEffect
API as a lower-level primitive than workers for launching coroutines from a workflow. (#12) - Introduce
WorkflowIdentifier
andImposterWorkflow
to properly support operator workflows. (#29) - Introduce
unsnapshottableIdentifier()
to allow transientWorkflowIdentifier
s forWorker
s. (#84) - Reimplement
Worker
s using side effects. (#110) - Update
RenderTester
to supportImpostorWorkflow
. (#89)
Core
- New: Deprecate
asWorker()
extension onDeferred
andChannel
. (#19) - New: Remove non-null upper bound for
OutputT
. (#49) - New: Give
WorkflowAction
access to props. (#81) - New: Allow
StatefulWorkflow.snapshotState
to return null. (#67) - New: Rename
EmittedOutput
toWorkflowOutput
, move toworkflow-core
. (#64, #78) - New: Deprecate
WorkflowAction.nextState
, replace with tostate
. (#77, #86) - New: Pull the deprecated
Mutator
and associated method into a sub-interface ofWorkflowAction
. (#128) - New: Use inner types for
RenderContext
to reduce type boilerplate. (#97) - New: Convert
Updater
to an inner class. (#129) - Fix: Rename
@VeryExperimentalWorkflow
opt-in annotation to@ExperimentalWorkflowApi
. (#15, #30) - Fix: Fix
RenderContext
kdoc (it doesn't implementSink
). (#34) - Docs: Add warnings about some common smells and gotchas to kdoc. (#7)
- Docs: Tweak kdoc on
snapshotState
. (#98) - Deprecation: Move implementation of deprecated
RenderContext.onEvent
into extension function. (#65, #127) - Deprecation: Extract public interface methods with default implementations into extension methods. (#127)
RenderContext.makeActionSink
RenderContext.onEvent
- Deprecation: Deprecate
Snapshot.EMPTY
and eliminates its use. (#107)
Runtime
- New: Introduce
TreeSnapshot
. (#32) - New: Introduce
WorkflowInterceptor
. (#42) - Fix: Make
RealRenderContext
internal. (#87) - Fix: Change output/rendering order: emit output before next render pass. (#68)
- Remove
launchWorkflowIn
and related code. (#47)
Testing
- Migrate
WorkflowTester
torenderWorkflowIn
. (#46) - Improve the
RenderTester
API. (#95)- Cleans up the testing API exposed by
WorkflowIdentifier
and makes the type checking more precise. - Adds descriptions to expectations to allow for more readable error messages.
- Adds
RenderTester
methods to match using arbitrary predicate functions. - Allows
Workflow
and side effect expectations to be non-exact – such expectations are optional, not required to be exclusive, and can match multiple times.
- Cleans up the testing API exposed by
- Extract public interface methods with default implementations into extension methods. (#127)
RenderTester.expectWorkflow(KClass)
RenderTester.expectWorkflow(WorkflowIdentifier)
- Fix: Improve naming of testing entry methods and types. (#73)
- Fix: Fix
WorkerTester.assertNoOutput
when worker finishes without emitting. (#66) - Fix: Make
RenderTester
throw a more realistic exception if the same workflow/side effect is ran
twice. (#130)
UI
- New: Introduce
WorkflowUiExperimentalApi
opt-in annotation and mark all UI integration with it. (#91) - New: Introduce
Snapshot
/Parcelable
integration. (#93) - Docs: Update the
BuilderBinding
docs to match the constructor. (#101 – thanks @SalvatoreT!) - Fix: Revert "Extend ViewGroup in stock Kotlin Container classes". (#106)
WorkflowViewStub
improvements and fixes:- New: Override
setBackground()
like we dosetVisibility()
inWorkflowViewStub
. (#108 – thanks @afollestad!) - Fix: Give
WorkflowViewStub
parity with AndroidViewStub
and then some. (#28)
- New: Override
- Fix: Fix
WorkflowFragment
under Jetpack navigation. (#39)
v1.0.0-alpha.1
First release from new, Kotlin-only repository.
- Change RenderTester functionality such that unexpected workers no-op rather than fail. Still fail
when multiple workers match. (#1084) - Rename all occurences of Master/Detail to Overview/Detail. (#1196)
- Simplify the entry point into the workflow runtime. (#1180)
- Extend ViewGroup in stock Kotlin Container classes. (#1193)
- Upgrade coroutines library to 1.3.7. (#1170)
- Upgrade to Kotlin 1.3.72. (#1178)
compose-v0.30.0
Imported from https://github.com/square/workflow-kotlin-compose/releases/tag/compose-v0.30.0.
- Update Compose to dev12. (#41)
- New/Breaking: Make
renderAsState
public, makeWorkflowContainer
take a ViewEnvironment. (#32) - Breaking: Rename
bindCompose
tocomposedViewFactory
. (#35) - Breaking: Rename
showRendering
toWorkflowRendering
and make it not an extension function. (#36) - Breaking: Rename
ComposeViewFactoryRoot
toCompositionRoot
and decouple the implementation. (#34) - Fix: Make
ViewRegistry.showRendering
update ifViewRegistry
changes. (#33) - Fix: Fix subcomposition of ComposableViewFactory and WorkflowRendering. (#37)
compose-v0.29.0
Imported from https://github.com/square/workflow-kotlin-compose/releases/tag/compose-v0.29.0.
- First release from separate repo.
- Update: Compose version to dev11. (#26)
- New: Add the ability to display nested renderings with
bindCompose
. (#7) - New: Introduce
ComposeWorkflow
, a self-rendering Workflow. (#8) - New: Introduce tooling module with support for previewing
ViewBinding
s with Compose's Preview. (#15) - New: Introduce
WorkflowContainer
for running a workflow inside a Compose app. (#16) - Breaking: Tidy up the package structure. (#23)