Open
Description
Problem
According to the Control Widget messaging protocol, kernels should reply to request_states
request with a message like
{
'comm_id' : 'u-u-i-d',
'data' : {
'method': 'update_states',
'states': {
<widget1 u-u-i-d>: <widget1 state>,
<widget2 u-u-i-d>: <widget2 state>,
[...]
},
'buffer_paths': [ <list with paths corresponding to the binary buffers> ]
}
But it is unclear what <widget1 state>
is. Intuitively, it looks like this would be some dictionary like
{
"some_property": "some_value",
[...]
}
However, from the IPyWidgets implementation, and from trying to implement this protocol for XWidget, it looks like the <widget1 state>
should rather be:
{
"model_name": "...",
"model_module": "...",
"model_module_version": "...",
"state": {
"some_property": "some_value",
[...]
}
}
Suggested Improvement
It looks like the actual implementation has redundant information that exists in the state's _model_name
.
But the point here is rather to clarify what is the expected schema, and possibly adapt the documentation,