fulcro

tony.kay 2025-01-12T04:45:53.594429Z

So for those of you following along on the Fulcro Integration with statecharts. I spent a lot of time today refining the integration, including porting an entire demo app (with RAD) to use it. I also added a VERY simple authentication flow to show how nice that is in the statechart setup. The results are the latest commit of main in https://github.com/fulcrologic/fulcro-with-statecharts The statechart for the app is in two defs here: https://github.com/fulcrologic/fulcro-with-statecharts/blob/main/src/main/com/example/client.cljs#L172 For RAD reports you can’t use ro/form-links (since that uses dyn router), and must instead use column formatters. I’ll probably write some kind of helper for that, but it’s easy enough. There are four kinds of routing states: rstate for a plain route target (e.g. defsc), istate (invokes a statechart on the target), report-state (runs a RAD report), and form-state (runs a RAD form). The “exit a form” route is supported as a target class with optional params…or just the registry key of the target. E.g. https://github.com/fulcrologic/fulcro-with-statecharts/blob/main/src/main/com/example/ui/account_forms.cljc#L54 Passing parameters to reports works fine just by including the desired params in the event data. At the moment the data model is also sent as params in case you want to store them in session state. I’ll probably still tune this up some, since you don’t really want all that cruft going across the wire as params if there’s a lot. Right now the report-state props support :report/param-keys to select which keys you want to use as params…I may just get rid of that and use the ro/controls map to derive which keys are possible.

🙏 4
🙏🏿 1
tony.kay 2025-01-12T20:39:44.586859Z

1.2.11 released with a few invocation improvements