[WTF-2648] Extend pluggable widget API docs for single object datasource#11159
[WTF-2648] Extend pluggable widget API docs for single object datasource#11159mlaponder wants to merge 5 commits into
Conversation
| | Web | Context, Microflow, Nanoflow, Listen to widget | | ||
| | Native | Context, Microflow, Nanoflow | | ||
|
|
||
| A single object data source may be linked to [`action`](#action), [`attribute`](#attribute), [`association`](#association), [`expression`](#expression), [`text template`](#texttemplate), and [`widgets`](#widgets) properties using the `dataSource` attribute on those properties. When linked to a single object data source, those properties receive the same types as unlinked properties — there are no list-aware variants: |
There was a problem hiding this comment.
To emphasize the differences in behavior between the two types of datasource we may consider adding a combined section about Linking Properties to Datasources. That way we can add a single table with both List Client Types and Single Object Client Types.
For example:
| Property type | List client type | Single object client type |
|---|---|---|
action |
ListActionValue |
ActionValue |
selection |
SelectionSingleValue or SelectionMultiValue |
Not supported |
There was a problem hiding this comment.
We can remove this callout
There was a problem hiding this comment.
Removed callouts in this file
There was a problem hiding this comment.
After this merges I will rebase the other PR and rebase it before undrafting.
✅
| | `defaultType` | No | String | Default type for the property, see [Default Data Sources](#data-source-defaults) | | ||
| | `defaultValue` | No | String | Default value for the property, see [Default Data Sources](#data-source-defaults) | | ||
|
|
||
| ##### Data Source Defaults {#data-source-defaults} |
There was a problem hiding this comment.
I was expecting to see the limitations for Single Object Datasources here
There was a problem hiding this comment.
I was expecting that as well :-) Expectations are now met
There was a problem hiding this comment.
It is clear now, thanks!
✅ Resolved (as I cannot resolve the thread using Github's UI)
|
Rereading the documentation I wonder whether we can just rename the feature "object data source", dropping the "single". It seems overly verbose, especially here where it is juxtaposed against "list data source". I went to check other parts of the documentation on data sources and did not really find any examples. It seems that we just call them Dataview, since that is currently the only one available. Perhaps we should update the data sources documentation to mention that aside from data view, other widgets may have (single) object data sources as well. |
In Studio Prop 11.11 support for the single object data source API will be introduced, this PR describes the API on that feature.