Skip to content

Releases: square/workflow-kotlin

v1.0.0-alpha.8

04 Dec 20:21
Compare
Choose a tag to compare
v1.0.0-alpha.8 Pre-release
Pre-release
  • Introduce AndroidViewRendering, de-emphasize ViewRegistry (#248)
  • Upgrade kotlin to 1.4.20. (#256)
  • Upgrade coroutines to 1.4.2. (#258)
  • Fix RenderTester kdoc references to deprecated renderTester() function. (#240)

v1.0.0-alpha.7

16 Nov 21:37
Compare
Choose a tag to compare
v1.0.0-alpha.7 Pre-release
Pre-release
  • A couple of Worker<Nothing> fixes. (#232)
  • Add IJ/AS file templates for creating new workflows. (#231)

v1.0.0-alpha.6

28 Oct 00:09
Compare
Choose a tag to compare
v1.0.0-alpha.6 Pre-release
Pre-release
  • Make snapshots lazy again. (#225)

v1.0.0-alpha.5

20 Oct 23:10
Compare
Choose a tag to compare
v1.0.0-alpha.5 Pre-release
Pre-release
  • Introduce RenderContext.eventHandler. (#212)
  • Introduce DecorativeViewFactory. (#183)
  • Introduce helpers for working with EditTexts from LayoutRunners. (#198, #201)
  • Enforce distinct id and inflatedId values. (#182)
  • Add guarded setOutput to enterState 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

01 Sep 01:18
Compare
Choose a tag to compare
v1.0.0-alpha.4 Pre-release
Pre-release
  • 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

28 Jul 22:15
Compare
Choose a tag to compare
v1.0.0-alpha.3 Pre-release
Pre-release
  • Revert "Emit output before next render pass." (#151)
  • Make TreeSnapshot nullable throughout the runtime API and internally. (#148)
  • SimpleLoggingWorkflowInterceptor fixes. (#149)
  • Make workflow-testing coroutine test dependency implementation, not api. (#150)

v1.0.0-alpha.2

14 Jul 17:19
Compare
Choose a tag to compare
v1.0.0-alpha.2 Pre-release
Pre-release

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 Workers 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 and ImposterWorkflow to properly support operator workflows. (#29)
  • Introduce unsnapshottableIdentifier() to allow transient WorkflowIdentifiers for Workers. (#84)
  • Reimplement Workers using side effects. (#110)
  • Update RenderTester to support ImpostorWorkflow. (#89)

Core

  • New: Deprecate asWorker() extension on Deferred and Channel. (#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 to WorkflowOutput, move to workflow-core. (#64, #78)
  • New: Deprecate WorkflowAction.nextState, replace with to state. (#77, #86)
  • New: Pull the deprecated Mutator and associated method into a sub-interface of WorkflowAction. (#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 implement Sink). (#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)
    • Re-implement TracingDiagnosticListener as a WorkflowInterceptor, TracingWorkflowInterceptor. (#45)
    • Remove WorkflowDiagnosticListener. (#48)
  • 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 to renderWorkflowIn. (#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.
  • 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 do setVisibility() in WorkflowViewStub. (#108 – thanks @afollestad!)
    • Fix: Give WorkflowViewStub parity with Android ViewStub and then some. (#28)
  • Fix: Fix WorkflowFragment under Jetpack navigation. (#39)

v1.0.0-alpha.1

11 Jun 18:33
e30fdaf
Compare
Choose a tag to compare
v1.0.0-alpha.1 Pre-release
Pre-release

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

05 Feb 00:56
Compare
Choose a tag to compare
compose-v0.30.0 Pre-release
Pre-release

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, make WorkflowContainer take a ViewEnvironment. (#32)
  • Breaking: Rename bindCompose to composedViewFactory. (#35)
  • Breaking: Rename showRendering to WorkflowRendering and make it not an extension function. (#36)
  • Breaking: Rename ComposeViewFactoryRoot to CompositionRoot and decouple the implementation. (#34)
  • Fix: Make ViewRegistry.showRendering update if ViewRegistry changes. (#33)
  • Fix: Fix subcomposition of ComposableViewFactory and WorkflowRendering. (#37)

compose-v0.29.0

05 Feb 00:55
Compare
Choose a tag to compare
compose-v0.29.0 Pre-release
Pre-release

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 ViewBindings with Compose's Preview. (#15)
  • New: Introduce WorkflowContainer for running a workflow inside a Compose app. (#16)
  • Breaking: Tidy up the package structure. (#23)