Property Editor Value Schema Exposure #21274
mattbrailsford
started this conversation in
Features and ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
Introduce a mechanism for property editors to expose the expected schema/structure of their editable values, both on the server-side (C#) and client-side (TypeScript). Currently, the only type information exposed is the published model via
IPropertyValueConverter.GetPropertyValueType(), but there's no equivalent for the editable/stored value thatIContent.SetValue()accepts or that the property editor UI element works with.Problem Statement
Property editors work with three distinct value models:
IPublishedContent(read-only)IPropertyValueConverter.GetPropertyValueType()IContent.SetValue(), persistencevalueFor the editable models, developers must "just know" what structure a property editor expects. This creates challenges for:
IContentServicehas no way to discover what value structure a property editor expectsProposed Solution
Server-Side:
IValueSchemaProviderInterfaceAn opt-in interface that property editors can implement to expose their value schema:
Property editors opt-in by implementing this interface:
Server-Side:
IPropertyEditorSchemaServiceA service to query schema information:
Client-Side:
valueSchemain ManifestAdd an optional valueSchema property to the property editor UI manifest using JSON Schema:
Example:
Client-Side:
UmbPropertyEditorSchemaServiceA context/service to query schemas:
Use Cases
AI tools that help editors create or modify content need to understand valid value structures. With schema exposure, an AI assistant could:
Without schemas, AI tools must rely on hardcoded knowledge of each property editor's internal format, which breaks with custom property editors or when core editors change.
Implementation Notes
Questions for Discussion
Beta Was this translation helpful? Give feedback.
All reactions