0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-12 05:37:26 +08:00
discourse/plugins/discourse-workflows
Régis Hanol 77f10640ec
DEV: Reuse SettingDefinitionField for workflows forms (#41185)
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.
2026-07-01 17:07:49 +02:00
..
admin/assets/javascripts FEAT: Add workflow canvas clipboard (#41217) 2026-06-30 18:07:17 +02:00
app FEATURE: Add sub workflow call support (#41019) 2026-06-25 15:01:05 +02:00
assets DEV: Reuse SettingDefinitionField for workflows forms (#41185) 2026-07-01 17:07:49 +02:00
config FEAT: Add workflow canvas clipboard (#41217) 2026-06-30 18:07:17 +02:00
db/migrate FEATURE: Add sub workflow call support (#41019) 2026-06-25 15:01:05 +02:00
lib FEATURE: add user action node (#41113) 2026-06-29 09:46:57 +10:00
spec FEATURE: add user action node (#41113) 2026-06-29 09:46:57 +10:00
test/javascripts DEV: Reuse SettingDefinitionField for workflows forms (#41185) 2026-07-01 17:07:49 +02:00
plugin.rb FEAT: Add workflow canvas clipboard (#41217) 2026-06-30 18:07:17 +02:00
USE_CASES.md FEATURE: Add AI authoring to Discourse Workflows (#40504) 2026-06-18 18:32:30 +02:00