Status: Backlog | Priority: P0 | Created: 2026-02-20 | Depends-on: control-multimethod-conversion
Create a sparse headless rendering plugin using multimethods for all rendering: forms, reports, fields, controls, and layouts. Just enough for REPL-based testing — not a production UI plugin.
src/main/com/fulcrologic/rad/rendering/headless/
plugin.cljcEntry point that requires all headless renderers and installs defaults.
form.cljcDefault form layout multimethods:
render-form — div wrapper with fieldsrender-header / render-footer — minimal wrappersrender-fields — iterates attributes, calls render-fieldreport.cljcDefault report layout multimethods:
render-report — report with rowsrender-body — table-like structurerender-row — row of columnsrender-controls / render-header / render-footer — minimal wrappersfield.cljcDefault field renderers by attribute type:
:string → text input:int / :long / :double → number input:boolean → checkbox:instant → date input:enum → select/dropdown
Dispatches via existing render-field multimethod on [ao/type style]controls.cljcDefault control renderers:
render-control multimethod on [control-type style]Plain HTML only. No CSS framework, no external React component libraries, no styling. Use only standard HTML elements via Fulcro's dom namespace:
dom/div, dom/h1..dom/h3, dom/label, dom/spandom/div containing a dom/label and the input. Use dom/input (text, number, checkbox, date), dom/select + dom/option (enums), dom/textarea (long text). The label's htmlFor should match the input's id per HTML standard. Use standard HTML attributes to reflect field state: disabled, readonly, required. When a field has validation errors, render them as a dom/span with {:data-rad-type "field-error"} after the input.dom/button (use disabled attribute when the action is not available)dom/table, dom/thead, dom/tbody, dom/tr, dom/th, dom/tddom/div with {:data-rad-type "busy"} when the form or report is in a loading/busy state. This gives headless tests a simple element to assert on without digging into Fulcro state.Use data attributes for headless test selection: {:data-rad-type "form-field" :data-rad-field (str field-key)}
All files must be .cljc for headless testing. Reference ../fulcro-rad-semantic-ui/ for multimethod dispatch patterns only (not for its rendering approach — that uses Semantic UI React components which we explicitly avoid here).
Implementer discretion: The agent implementing this spec may add additional data attributes, wrapper elements, or structural choices beyond what is listed here if they improve headless testability. The goal is to make every meaningful state and interaction detectable from the rendered hiccup tree. Use good judgment — keep it plain HTML, but don't hold back on structure that makes testing easier.
:default implementations:default implementations.cljcCan 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 |