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

Preserve active file context when clicking out from notebook editor #1800

Closed
Tracked by #1784
tbombach opened this issue Nov 14, 2022 · 1 comment
Closed
Tracked by #1784
Assignees
Milestone

Comments

@tbombach
Copy link
Member

tbombach commented Nov 14, 2022

Depends on: #1939

@tbombach tbombach changed the title [Web] Define Studio/AML extension user experience and technical solution for re-opening active file(s) from notebook editor @sevillal and @tbombach [Web] Define Studio/AML extension user experience and technical solution for re-opening active file(s) from notebook editor Nov 14, 2022
@sevillal
Copy link
Contributor

Proposal

Technically we could solve it in two ways:

Querystring

ML Studio adds a new query parameter like &editorContext=["path/to/file1", "path/to/file2"], then the remote web extension can read it and when the connection is ready, call vscode.workspace.openNotebookDocument(uri).then(vscode.window.showNotebookDocument); or the equivalent for textdocuments.

Note: I would suggest that we use this approach just to transfer active editor context and not multiple editors to avoid long URLs. Browser URLs have a size limit of 2048 characters.

🟡 Discuss: I propose we clear the query param once it is used, this to open the file only the first time connected. If the customer closes the file, open others and reload the window it would not open that "default" file automatically.

POST request

ML Studio does a POST call with the continueOn route which includes a redirect URL to the already known vscode.dev extension URL, in the request body it includes a JSON containing an array of the files to open automatically after connecting. The extension's web opener will receive the JSON data which can be used to open the files.

✋ This approach depends on: https://github.com/microsoft/vscode-dev/issues/681

🟡 Discuss: If there is no clear evidence that customers want to transfer all the open editors context it will be faster to use the query string approach.

@tbombach tbombach added this to the Q1 2023 milestone Jan 19, 2023
@tbombach tbombach changed the title [Web] Define Studio/AML extension user experience and technical solution for re-opening active file(s) from notebook editor Preserve active file context when clicking out from notebook editor Jan 19, 2023
@sevillal sevillal self-assigned this Feb 3, 2023
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