Skip to content
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

Closed
lbustelo opened this issue Apr 20, 2016 · 10 comments · Fixed by #530
Closed

widget_class information on comm_open should be placed in data #522

lbustelo opened this issue Apr 20, 2016 · 10 comments · Fixed by #530
Labels
resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion.

Comments

@lbustelo
Copy link

lbustelo commented Apr 20, 2016

The current code merged in #461 places the information about widget_class in a the meta-data section of the comm_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 the meta-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 the data area, a much easier fix for declarativewidgets and do not involve changes to the kernels.

/cc @SylvainCorlay @jdfreder @jasongrout @parente

@SylvainCorlay
Copy link
Member

@lbustelo ok, do you think we could have the widget_class info in both data and metadata for now so that things work in the R and scala kernels?

@lbustelo
Copy link
Author

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.

On Apr 19, 2016, at 8:56 PM, Sylvain Corlay [email protected] wrote:

@lbustelo ok, do you think we could have the widget_class info in both data and metadata for now so that things work in the R and scala kernels?


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub

@SylvainCorlay
Copy link
Member

SylvainCorlay commented Apr 20, 2016

Eventually it should probably used for passing state. (Like from the backend to the frontend.)

@lbustelo
Copy link
Author

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.

@SylvainCorlay
Copy link
Member

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).

@jasongrout
Copy link
Member

jasongrout commented Apr 20, 2016

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.

@SylvainCorlay
Copy link
Member

We should probably make it symmetrical with the backend-to frontend comm_open...

@jasongrout
Copy link
Member

@SylvainCorlay - yes, I think it should be symmetrical.

@lbustelo
Copy link
Author

@SylvainCorlay will this be part of a 5.0.1?

parente added a commit to parente/docker-stacks that referenced this issue Apr 29, 2016
5.0 had API compatibility problems
see jupyter-widgets/ipywidgets#522

(c) Copyright IBM Corp. 2016
@github-actions github-actions bot added the resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion. label Feb 19, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants