Verification: inferred from reading SlotRegistry.qml and DynamicForm.qml on master 05222af; not measured with a host app.
SlotRegistry.resolve(action, field, xWidget, unitAscii, jsonType) resolves by field, x-widget, unit and JSON type. The JSON type does not identify the control a host needs to supply:
| Member |
jsonType passed |
Also matched by the same byType |
Quantity<U, Dec> |
"object" (["object","null"]) |
every nested aggregate, every Choice over an object |
Choice<std::int64_t, …> |
"integer" |
every plain integral member |
enum class (closed set) |
"string" |
every text field |
Timestamp (format: date-time) |
"string" |
every text field |
So a host whose visuals must all come from its own UI kit (one combo component, one date picker, one quantity entry) has to register byField per action and field, or byUnit per unit. DynamicForm already classifies every field (isQuantity, isChoice, isEnum, isDateTime, isBoolean, isInteger, isNumber, isArray, isObjectArray after #809, isMultiline, isSlider, isRadioChoice).
Proposal: a byKind(kind, component) tier between unit and type, with kind derived from those flags ("quantity", "choice", "enum", "datetime", "boolean", "integer", "number", "array", "objectArray", "text", …) and put on the field descriptor. Not folded into #809/#810 because it changes resolve()'s signature, which both touch.
Closes when a host can register one component per control kind and every field of that kind resolves to it.
Verification: inferred from reading
SlotRegistry.qmlandDynamicForm.qmlon master 05222af; not measured with a host app.SlotRegistry.resolve(action, field, xWidget, unitAscii, jsonType)resolves by field,x-widget, unit and JSON type. The JSON type does not identify the control a host needs to supply:jsonTypepassedbyTypeQuantity<U, Dec>"object"(["object","null"])Choiceover an objectChoice<std::int64_t, …>"integer"enum class(closed set)"string"Timestamp(format: date-time)"string"So a host whose visuals must all come from its own UI kit (one combo component, one date picker, one quantity entry) has to register
byFieldper action and field, orbyUnitper unit.DynamicFormalready classifies every field (isQuantity,isChoice,isEnum,isDateTime,isBoolean,isInteger,isNumber,isArray,isObjectArrayafter #809,isMultiline,isSlider,isRadioChoice).Proposal: a
byKind(kind, component)tier between unit and type, withkindderived from those flags ("quantity","choice","enum","datetime","boolean","integer","number","array","objectArray","text", …) and put on the field descriptor. Not folded into #809/#810 because it changesresolve()'s signature, which both touch.Closes when a host can register one component per control kind and every field of that kind resolves to it.