Status: backlog Priority: P1 Created: 2026-02-22 Owner: AI Depends-on: phase8-form-namespace-restructure, phase8-report-namespace-restructure Phase: 8 — Library Restructuring
Currently form_options.cljc and report_options.cljc in this project define both shared option keys (identical to fulcro-rad) and statechart-specific option keys (new or with changed semantics).
Important: Some keys like fo/triggers and fo/statechart already exist in the current form_options.cljc with statechart-style docstrings and callback signatures (the file was already partially migrated during earlier phases). The work here is keyword relocation — moving these keys from the fo/ keyword namespace (:com.fulcrologic.rad.form/triggers) to the sfo/ keyword namespace (:com.fulcrologic.rad.statechart.form-options/triggers) — and updating all code that reads them. It is NOT reinventing the semantics from scratch.
After restructuring:
fo/id, fo/attributes, fo/subforms, fo/route-prefix, etc.) come from fulcro-rad's form-options / report-options — users require these with fo/ and ro/ aliases as usualsfo/triggers, sfo/statechart, sro/statechart, etc.) are defined in NEW namespaces statechart.form-options / statechart.report-options — users require these with sfo/ and sro/ aliasesThis means statecharts users have three requires for forms:
(:require
[com.fulcrologic.rad.statechart.form :as form] ;; engine functions
[com.fulcrologic.rad.form-options :as fo] ;; shared option keys
[com.fulcrologic.rad.statechart.form-options :as sfo]) ;; statechart-specific keys
com.fulcrologic.rad.statechart.form-options (sfo/)This namespace defines ONLY statechart-specific option keys — keys that either:
Statechart-specific form options:
| Key | Type | Description |
|---|---|---|
sfo/triggers | map | Trigger callbacks with statechart expression signature (fn [env data form-ident k old new] ops-vec) — differs from UISM's (fn [uism-env ident k old new] uism-env) |
sfo/statechart | statechart-def or keyword | Custom form statechart (replaces fo/machine from UISM) |
sfo/statechart-id | keyword | Registered statechart ID (alternative to inline def) |
sfo/on-started | fn | (fn [env data event-name event-data] ops-vec) — called when form chart enters initial state |
sfo/on-saved | fn | (fn [env data event-name event-data] ops-vec) — called after successful save |
sfo/on-save-failed | fn | (fn [env data event-name event-data] ops-vec) — called after save failure |
com.fulcrologic.rad.statechart.report-options (sro/)Statechart-specific report options:
| Key | Type | Description |
|---|---|---|
sro/triggers | map | Trigger callbacks with statechart expression signature |
sro/statechart | statechart-def or keyword | Custom report statechart (replaces ro/machine) |
sro/statechart-id | keyword | Registered statechart ID |
sro/on-loaded | fn | Called when report data loads |
The current form_options.cljc and report_options.cljc in this project contain modifications (changed callback signatures). After restructuring:
statechart.form-options / statechart.report-optionsfo/ (from fulcro-rad)These keys have identical semantics in both engines and stay in fulcro-rad's form-options:
fo/id, fo/attributes, fo/subforms, fo/route-prefixfo/title, fo/layout, fo/field-styles, fo/field-labelsfo/default-values, fo/validation, fo/tabbed-layoutfo/can-add?, fo/can-delete?, fo/added-via-upload?| Action | File |
|---|---|
| CREATE | src/main/.../rad/statechart/form_options.cljc |
| CREATE | src/main/.../rad/statechart/report_options.cljc |
| DELETE | src/main/.../rad/form_options.cljc (comes from fulcro-rad dep) |
| DELETE | src/main/.../rad/report_options.cljc (comes from fulcro-rad dep) |
All files using fo/triggers, fo/machine, fo/statechart must switch to sfo/triggers, sfo/statechart:
statechart/form.cljc — macro reads optionsstatechart/form-expressions.cljc — reads trigger functionsstatechart/form-chart.cljc — if it references optionsSimilarly for report: ro/machine → sro/statechart, ro/triggers → sro/triggers.
form_options.cljc and report_options.cljc to inventory every key. Cross-reference with cleanup-analysis Section 2B. Distinguish between keys that currently exist in the code vs. keys being newly introduced — mark any key not present in current code as NEW in the spec table.statechart/form_options.cljc with only engine-specific keysstatechart/report_options.cljc with only engine-specific keysfo/triggers, fo/machine, fo/statechart, ro/machine, ro/triggers, etc.sfo/triggers is a keyword in statechart.form-optionssfo/statechart is a keyword in statechart.form-optionssro/triggers is a keyword in statechart.report-optionssro/statechart is a keyword in statechart.report-optionsfo/ or ro/ (those come from fulcro-rad)sfo/ not fo/ for engine-specific optionssfo/ and sro/ for engine-specific optionsCan you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |