-
Notifications
You must be signed in to change notification settings - Fork 94
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
plots: Dynamic plots not removed when language runtime shuts down #584
Comments
Thinking about this a little more ... I'm not sure that aggressively removing the plots from the pane is the correct behavior. We can't resize them any more, but we could still show the last rendered image without much trouble. |
This is almost certainly related to the error @DavisVaughan noted in another issue, in which we try to disconnect the comm after the kernel has already shut down.
|
I thought about this a little more and decided that it is the correct behavior, at least for now. It would be easy to show the last rendered image, but there's no place for us to actually store that image today. Consequently, the image would vanish if you reloaded the browser. It is admittedly a little aggressive to remove the image from the pane right away, but I think that users could understand losing plots when they take a destructive action (shutdown, restart) more than they could losing plots on a UI reload, which should never cause you to lose data. We will eventually need some storage for the Plots pane for thumbnails if nothing else (see #397), but until we have that set up, I think removal is what we want so that the state remains consistent. |
This now works in my testing. |
To reproduce:
plot(runif(1000))
q()
or with the Shutdown Language Runtime commandThe Plots pane still shows the plot.
The plot shouldn't be visible any more, since its backend has been removed (comm closed). If you try to resize the Plots pane you'll see it try to redraw but get stuck because the backend is disconnected (note heavy blue line in screenshot).
The text was updated successfully, but these errors were encountered: