Skip to content

forms(qml): SlotRegistry has no tier by renderer kind, so a host cannot restyle every Quantity / Choice / enum / date-time control at once #812

Description

@Yaraslaut

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions