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

Generic view from command execution in a web browser tab. #7134

Open
fcollonval opened this issue Oct 30, 2023 · 0 comments
Open

Generic view from command execution in a web browser tab. #7134

fcollonval opened this issue Oct 30, 2023 · 0 comments

Comments

@fcollonval
Copy link
Collaborator

Problem

In #6315, support for custom document factory was added to ease cross support for Lab and Notebook 7+. But extensions may open new views in the main area of JupyterLab that are not related to a factory (I'm thinking to diff / merge views from nbdime or jupyterlab-git for example). This issue goal is to initiate a discussion to design a way in Notebook to open a widget in a new browser tab not related to a document factory.

Proposed Solution

Let's take an example:

  1. The user open the git panel file status in a tab on the /tree page
  2. They click on a button to see the difference to be committed on file modifiedA.txt
  3. It displays the diff view in a new web browser tab.

Technically, a solution would be to have the command opening the document will in JupyterLab instantiate a widget and add it to the main area. But in notebook, that command will be wrapped in a dispatcher that will open a new browser tab with the command and the serialized-JSON args to be executed to get the content of the page.

One open question is how to pass the command and associated args:

  • Option 1: through the page config object
    This will be safer and more controlled.
  • Option 2: through query arguments
    This could be bookmarked or called from URL directly - but it may increase the attack surface by allowing any commands to be executed from a URL.
    The args size may exceed query arguments limitation.

Additional context

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

No branches or pull requests

2 participants