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

Explicitly set new_browser_tab=false #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

fergu
Copy link

@fergu fergu commented Jun 16, 2021

This has the advantage that new Pluto tabs are opened as a tab inside of JupyterLab's window, which allows users to have access to Jupyter's various tools (Text editors, etc) in the same tab as Pluto.

@pankgeorg
Copy link
Collaborator

pankgeorg commented Jun 17, 2021

Hello!! Thanks for figuring this out! Do you know if it's possible that we make it a choice somehow?

@fergu
Copy link
Author

fergu commented Jun 17, 2021

As I understand it, init.py is called at package load time (which I'm guessing is at Jupyter startup?). So it would probably be possible to replace the various parameters with some sort of config file.

I'm not sure if Jupyter has a means to expose a configuration file for a given extension to the user, though.

@koehlerson
Copy link
Collaborator

very cool! Imho it's a better default option to have this setting.

I think the easiest way to have some sort of flexible config is to let users overwrite the init.py. I'm not sure whats the best way to do it

@koehlerson
Copy link
Collaborator

@pankgeorg do you mind if I merge this ?

@fergu
Copy link
Author

fergu commented Jul 19, 2021

The only thing I'd mention in my testing is that kernels do not seem to properly shut down when the tab is closed. I suspect this is a Jupyter limitation, but since Pluto doesn't seem to have a way to shut down individual notebooks it may be an issue for server-based installations.

This may also be an issue as it currently stands, too, so it may be a non-issue in the context of this change.

@pankgeorg
Copy link
Collaborator

The only thing I'd mention in my testing is that kernels do not seem to properly shut down when the tab is closed. I suspect this is a Jupyter limitation, but since Pluto doesn't seem to have a way to shut down individual notebooks it may be an issue for server-based installations.

This may also be an issue as it currently stands, too, so it may be a non-issue in the context of this change.

I think this is out of scope of this PR

@pankgeorg do you mind if I merge this ?

I don't, if @GiggleLiu and @lungben are positive/neutral let's do it.

@koehlerson
Copy link
Collaborator

koehlerson commented Jul 19, 2021

The only thing I'd mention in my testing is that kernels do not seem to properly shut down when the tab is closed. I suspect this is a Jupyter limitation, but since Pluto doesn't seem to have a way to shut down individual notebooks it may be an issue for server-based installations.

This may also be an issue as it currently stands, too, so it may be a non-issue in the context of this change.

This actually changed my mind, since closing notebooks properly is quite essential for remote WGLMakie support. People will run all the time in already-in-use-port situations and thus cannot visualize stuff when reopening the notebook

@fergu
Copy link
Author

fergu commented Jul 19, 2021

My experience has not been that there's any problem in terms of busy ports or bad behavior when reconnecting (I am running this in a server setup myself). Just that the notebook "server" itself doesn't shut down when the tab is closed. So reopening it is like you never closed the tab. Only thing I've noticed is that it can lead to additional memory usage.

@koehlerson
Copy link
Collaborator

ye Pluto doesn't have a problem but WGLMakie and especially JSServe will have, or did you try this as well?

@fergu
Copy link
Author

fergu commented Jul 19, 2021

I have no experience with WGLMakie or JSServe

@fergu
Copy link
Author

fergu commented Jul 19, 2021

I would argue that this issue is independent of that one, though - unless having jupyterlab open Pluto in a new window changes the effect this behavior has on WGLMakie. As it stands I believe this behavior would be identical whether Pluto opened in a new browser tab or within jupyterlab itself.

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.

None yet

3 participants