-
Notifications
You must be signed in to change notification settings - Fork 947
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
widget_class information on comm_open should be placed in data #522
Comments
Some relevant pieces of code
|
@lbustelo ok, do you think we could have the |
I think that is fine. I still think that 'data' is the better place. If not, then what is the 'data' piece of the 'comm_open' for? Gino B.
|
Eventually it should probably used for passing state. (Like from the backend to the frontend.) |
I see... Not sure placing the widget class in data would preclude you from putting state along with it in the 'comm_open'. As it stands, the data area is really an open ended map specific to the target_name. In this case ipywidgets gets to define what those payloads look like. |
In any case, we will need to support both for some time (whether we choose data or metadata eventually). We should coordinate on this with @jdfreder and @jasongrout (because of the shims used for jupyterlab). |
Conceptually, +1 for making the widget_class part of data instead of metadata, since the widget_class is targeted at the widget manager, rather than the comm layer, i.e., widget_class is data that the widget manager needs to handle the comm_open message. |
We should probably make it symmetrical with the backend-to frontend comm_open... |
@SylvainCorlay - yes, I think it should be symmetrical. |
@SylvainCorlay will this be part of a |
5.0 had API compatibility problems see jupyter-widgets/ipywidgets#522 (c) Copyright IBM Corp. 2016
The current code merged in #461 places the information about
widget_class
in a themeta-data
section of thecomm_open
message. This is a huge deal, because nowhere in the spec around Comm support (and I'm basing the statement on this) does it say that handlers to comm message (open, msg, close, info) need access to themeta-data
area. That being the case, both the Comm support in IRKernel and Toree/SparkKernel, do not make this area of the message available to handlers. In my opinion, the goal of Comm is to simplify communication and not to expose all the pieces of the Kernel Protocol.I propose that this is changed so that the information about
widget_class
is passed within thedata
area, a much easier fix for declarativewidgets and do not involve changes to the kernels./cc @SylvainCorlay @jdfreder @jasongrout @parente
The text was updated successfully, but these errors were encountered: