mirror of
https://github.com/discourse/discourse.git
synced 2026-08-12 05:37:26 +08:00
Follow-up to #41099. Previously, the workflows form hand-rolled its own `if/else` chain of FormKit fields, duplicating the type-to-control mapping that `SettingDefinitionField` was introduced to centralize. This change builds a setting definition per field and renders the shared component instead, so workflows forms render consistently with the rest of admin and the mapping lives in one place. Along the way it: - extends the registry with the field types workflows needs and adds a `radio-group` control; - collapses the registry's repeated entries into two layout profiles (a labelled "row" and a compact inline control) to cut boilerplate; - falls back to a bare FormKit control when an entry has no custom renderer, retiring the redundant `StringControl`; and - focuses the first field at the form level (the per-field autofocus modifier can no longer reach the control now that it's encapsulated inside `SettingDefinitionField`), deferred to `afterRender` and passing `preventScroll` so loading a form no longer jumps the page to the first input. |
||
|---|---|---|
| .. | ||
| acceptance | ||
| integration/components | ||
| unit | ||