jupyterhub / jupyter-server-proxy

Jupyter notebook server extension to proxy web services.
https://jupyter-server-proxy.readthedocs.io
BSD 3-Clause "New" or "Revised" License
347 stars 148 forks source link

Open in Panel #468

Closed psychemedia closed 5 months ago

psychemedia commented 5 months ago

Currently, proxied apps appear to be opened into a new browser tab from a launcher button.

In contrast, upyterlab-pytutor is opened from a JupyterLab notebook toolbar and opened into a panel, with code from one or more selected code cells passed into the iframe via a an encoded iframe URL parameter.

image

Poking through the code, the extension creates a panel that contains an iframe.

In some situations, it might be useful to be able to open a proxied service in to a panel, perhaps defined via a config setting:

{
    'command': [...],
    'environment': ...,
    'timeout': ...,  

    'launcher_target': 'tab' | 'panel_iframe' 

    'launcher_entry': {
        'title': ...
        'icon_path': ...
     }
}

Clicking on the launcher with an iframe target would then open the created URL in a iframe in a panel inside JupyterLab.

ryanlovett commented 5 months ago

new_browser_tab implemented by #193 controls whether apps launch in a new browser tab or new jupyterlab tab. @cmd-ntrf created https://youtu.be/VFmIy9Wb83k to demonstrate how this works.

Is this option sufficient for you?

new_browser_tab is documented to be False by default, but it is actually True. (!)

ryanlovett commented 5 months ago

new_browser_tab is documented to be False by default, but it is actually True. (!)

This was fixed by #470 .

psychemedia commented 5 months ago

Ah, thanks, missed that in the docs; thanks.