square / workflow

A Swift and Kotlin library for making composable state machines, and UIs driven by those state machines.
https://square.github.io/workflow
Apache License 2.0
1.12k stars 80 forks source link

Proposal: Introduce `WorkflowUICommon` #1168

Open dhavalshreyas opened 4 years ago

dhavalshreyas commented 4 years ago

A few container Screen that are currently in Samples, would be better situated with an independent dependency. This will enable easy consumption of these common UI containers.

Containers in Samples currently:

Possible future additions:

Proposal

Move container Screens from Samples to WorkflowUICommon and add WorkflowUICommon.podspec in root. Publish WorkflowUICommon.podspec to Cocoapods.

AquaGeek commented 4 years ago

IIRC, they're in Samples currently because we explicitly don't want them to be added as dependencies elsewhere — they're just guideposts to help others build their own containers. Outside of that, are we willing to take on the maintenance burden of these, given we use parallel implementations internally?

AquaGeek commented 4 years ago

One of the suggestions @bencochran brought up internally was the option of us publishing the structs for these Screens (instead of both the struct and the UIViewController) and allowing folks to add the conformance to Screen themselves (BYO view controller). That would at least let us close the gaps between these samples and our own internal versions.

zach-klippenstein commented 4 years ago

I believe this is the approach we're currently using in kotlin.