workflow-swift
workflow-swift copied to clipboard
[WIP] Expose Workflow value to `apply` (backward compatible)
Trying out exposing a workflow: WorkflowType parameter to the action apply method via an alternative action protocol, WorkflowActionCore.
Actions that don't need the workflow parameter may continue to conform to WorkflowAction, so this change is backward-compatible with existing clients of Workflow.
We might be able to do this more cleanly in API-breaking change. I'll try that out in a separate PR.
Related discussions
- Logging navigation would be cleaner with this. Workflow Kotlin already has it. (late 2023)
- Considering a change like this (early 2023)
- In a recent Workflow/SwiftUI prototype with @watt and @n8chur, we found this change would obviate the need for most properties of this
State
To do
- [ ] How is a
WorkflowTypevalue supplied toapplyin the context of an action test?- [ ] In Kotlin, action tests pass
PropstoapplyTo(e.g.)
- [ ] In Kotlin, action tests pass
- [ ] Demo using this in Register
- [ ] Update inline documentation
- [ ] Update samples & tutorials
- [ ] Update Xcode templates in
Tooling/Templates