square / workflow-kotlin

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.04k stars 102 forks source link

Write database-backed example for kotlin #769

Open rjrjr opened 5 years ago

rjrjr commented 5 years ago

We need example of driving long, random access list from a database —  RecyclerView pulling from Rooms or SqlDelight

zach-klippenstein commented 5 years ago

And/or the AndroidX paging library

RotBolt commented 1 year ago

@rjrjr Is this still a valid issue? If yes, I would like to work upon it

rjrjr commented 1 year ago

Yes please! It would need to be a separate module so that none of the existing ones get tied to whatever SqlDelight or whatever. At this point a Compose example might be more useful than RecyclerView or AndroidX Paging.

rjrjr commented 1 year ago

@steve-the-edwards or @RBusarow would probably be a better reviewer / co-designer for it than I would.

RotBolt commented 1 year ago

Sure, I will get started with jetpack compose only. @steve-the-edwards @RBusarow let me know if there is anything I need to know apart from the workflow-kotlin docs

rjrjr commented 1 year ago

🍿

It'd be wise to share a quick description of whatever design you're thinking of as a sanity check.

RotBolt commented 1 year ago

Sure. I will share by weekend

RotBolt commented 1 year ago

Hi @rjrjr Sorry for too much delay from side I am thinking of extending the Todo example which is in Tutorial section. For the UI part, in LayoutRunners, where we are setting the data in adapters currently. I believe I can simply render the list with Jetpack compose. For database, currently thinking of using Room library only for Worker implementation. I will have the Worker as a dependency inside TodoListWorkFlow sth like TodoListWorkFlow(val worker:TodoWorker).

Rest of the details, I believe I would be able to tell when I actually get to start write an example

RotBolt commented 1 year ago

I am sorry, I was MIA for 3 months or so, there was a family emergency I have started tutorials as of now. I will get to create database backed example soon