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

Compatibility with ipywidgets 8.x #368

Merged
merged 1 commit into from
Nov 13, 2023

Conversation

Carifio24
Copy link
Member

This PR aims to make the pywwt widget compatible with ipywidgets 8.x, which currently seems to not be the case. I was trying to use the Jupyter widget in a glue-wwt context together with some of the new widgets from ipywidgets 8 but kept getting the following error:

Model class 'WWTModel' from module 'pywwt' is loaded but can not be instantiated
TypeError: r._deserialize_state is not a function
    at f._make_model (http://localhost:8889/lab/extensions/@jupyter-widgets/jupyterlab-manager/static/150.b0e841b75317744a7595.js?v=b0e841b75317744a7595:1:7933)

After some investigation, it seems that we need to update our widget JS to use ES6 class notation (see here), which is the content of this PR. With these changes, the widget works for me locally with both ipywidgets 7.x and 8.x.

Copy link

codecov bot commented Nov 12, 2023

Codecov Report

Merging #368 (c90b86e) into master (8361ac1) will not change coverage.
The diff coverage is n/a.

❗ Current head c90b86e differs from pull request most recent head b20b820. Consider uploading reports for the commit b20b820 to get more accurate results

@@           Coverage Diff           @@
##           master     #368   +/-   ##
=======================================
  Coverage   56.51%   56.51%           
=======================================
  Files          25       25           
  Lines        2870     2870           
=======================================
  Hits         1622     1622           
  Misses       1248     1248           

📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today!

@pkgw
Copy link
Contributor

pkgw commented Nov 13, 2023

Thanks for tracking this down!

@pkgw pkgw merged commit 4bd4fc5 into WorldWideTelescope:master Nov 13, 2023
3 checks passed
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