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

Handle comm_open messages containing new widget state #98

Merged
merged 3 commits into from
Jun 14, 2023
Merged

Conversation

philippjfr
Copy link
Contributor

The way ipywidgets works when adding new models to an existing ipywidget is to send the widget state as part of the comm_open message that is sent on widget creation. To handle this correctly we now check whether a model already exists otherwise we pass the comm open message to the handle_comm_open handler on the WidgetManager.

@philippjfr
Copy link
Contributor Author

@mattpap Could you merge this and cut a new release? The two changes do deserve a minor version bump.

@mattpap
Copy link
Contributor

mattpap commented Jun 14, 2023

I was about to merge this when I saw the new commit. Is this fully ready?

@philippjfr
Copy link
Contributor Author

Yes, sorry, ready now. The issue was that some libraries fail to correctly set defaults both server and client side so a server side default may still have to be sent to the client-side. In the case I was handling the LeafletControlModels were not correctly setting the _view_module clientside.

@mattpap mattpap merged commit 86d733d into main Jun 14, 2023
@mattpap mattpap deleted the comm_open branch June 14, 2023 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants