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

resize handle does not respond #501

Open
stevejpurves opened this issue Dec 7, 2022 · 6 comments
Open

resize handle does not respond #501

stevejpurves opened this issue Dec 7, 2022 · 6 comments
Labels

Comments

@stevejpurves
Copy link

Describe the issue

When trying to drag the resize slider, nothing happens, the cursor changes and then gets stuck.
After trying to resize the footer text does not appear or update.
Reproducing this via thebe

54Qv6ESTxR

Versions

  • ipympl 0.9.2
  • Thebe 0.0.16
@martinRenou martinRenou added the bug label Dec 8, 2022
@stevejpurves
Copy link
Author

stevejpurves commented Jan 3, 2023

the latest version of ipympl works fine in jupyterlab, but this remain a problem in thebe can this be because nothing is listening for the jupyterResizeEvent and posting the Lumino UnknownSize message? I notice that in voila event listeners are attached when widget are built?

or it this problem more likely to be within ipympl itself? cc @martinRenou

@martinRenou
Copy link
Member

I'm wondering if it could be an issue in the communication between the Python process and the JS one, because it's Python that's responsible for resizing. Can you update the plot data with the sliders?

@stevejpurves
Copy link
Author

stevejpurves commented Jan 3, 2023

yes, the plot updates ok from sliders, but as soon as I try to resize, all toolbar interactivity and the footer location readout no longer functions.

@stevejpurves
Copy link
Author

stevejpurves commented Jan 3, 2023

looking at the open message channel in the network tab I can see js process sending messages ok for:

  1. slider interaction
  2. figure enter/leave, motion_notify, etc...

but as soon as I click on the resize handle, the frontend no longer sends any messages from (2) but interacting with sliders still works and results in messages being sent. it's like an internal error / exception causes the canvas events on the front end to stop working, but with nothing appearing in the js console to indicate an error.

I'll get an interactive example posted somewhere and share the link

@martinRenou
Copy link
Member

That's interesting, so it looks like either Matplotlib or ipympl fails at the resize event and then the communication hangs?

Is there any error in the JavaScript console? Also, would you be able to retrieve any error traceback that could have occurred on the Python kernel?

@stevejpurves
Copy link
Author

stevejpurves commented Jan 4, 2023

There are no errors in the JS console on resize, but when I connect to a local jupyter server I see various "cannot open comm exceptions". I don't see those when connecting to binder, yet the issue happens in both scenarios.
There are no tracebacks in the jupyter output to the command line.

I have deployed example code here: https://github.com/stevejpurves/bug-thebe-ipympl if you follow the steps in (1) on the readme, you'll be able to see the issue.

Note though there are other issues using ipympl and thebe, that are also listed on that readme and reproducible here and this all works in JupyterLab and in the classic notebook, so I am thinking that there is potentially something wrong in the way that thebe is using ipywidgets manager and rendermime, but I cannot see what it is. Also bear in mind that thebe is still loading jupyter-matplotlib via requirejs (does that have an implication?, e.g. the server needs the notebook extension installed?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants