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

Finalise notebook API for notebook document change events #144662

Closed
2 tasks done
jrieken opened this issue Mar 8, 2022 · 8 comments
Closed
2 tasks done

Finalise notebook API for notebook document change events #144662

jrieken opened this issue Mar 8, 2022 · 8 comments
Assignees
Labels
api api-finalization feature-request Request for new features or functionality notebook on-release-notes Issue/pull request mentioned in release notes verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@jrieken
Copy link
Member

jrieken commented Mar 8, 2022

LSP adds support for notebooks but currently depends on some proposed API, mostly events for saving and observe changes to the document. We should investigate what it takes to finalise those

  • support notebookType in document selectors
  • notebook document events -> src/vscode-dts/vscode.proposed.notebookDocumentEvents.d.ts
@jrieken jrieken self-assigned this Mar 8, 2022
@jrieken jrieken added api feature-request Request for new features or functionality notebook labels Mar 8, 2022
@jrieken jrieken added this to the Backlog milestone Mar 8, 2022
@jrieken jrieken modified the milestones: Backlog, March 2022 Mar 8, 2022
@jrieken
Copy link
Member Author

jrieken commented Mar 8, 2022

fyi @dbaeumer @rebornix

jrieken added a commit that referenced this issue Mar 9, 2022
jrieken added a commit that referenced this issue Mar 9, 2022
@jrieken
Copy link
Member Author

jrieken commented Mar 16, 2022

fyi @karthiknadig The simplified events are defined in https://github.com/microsoft/vscode/blob/d4c26aa154f2506614f5a292bc598c7ce07dbf36/src/vscode-dts/vscode.proposed.notebookDocumentEvents.d.ts. They will replace the following events defined in vscode.notebook (from the notebookEditor-proposal):

  • vscode.notebook.onDidChangeCellMetadata -> replaced with vscode.workspace.onDidChangeNotebookDocument
  • onDidChangeCellOutputs -> replaced with vscode.workspace.onDidChangeNotebookDocument
  • onDidChangeNotebookCells -> replaced with vscode.workspace.onDidChangeNotebookDocument
  • onDidChangeNotebookDocumentMetadata -> replaced with vscode.workspace.onDidChangeNotebookDocument
  • vscode.notebook.onDidSaveNotebookDocument -> moved into vscode.workspace, no other changes

I have enroled ms-toolsai.jupyter into the notebookDocumentEvents proposal meaning the extension can migrate safely.

@dbaeumer
Copy link
Member

Did the same for Pylance and eslint so we can move off when I have released a new version of the LSP libs

@jrieken
Copy link
Member Author

jrieken commented Mar 21, 2022

Moving to April for

  • removal of the old events
  • finalisation attempt of the new events

1 similar comment
@jrieken
Copy link
Member Author

jrieken commented Mar 21, 2022

Moving to April for

  • removal of the old events
  • finalisation attempt of the new events

@DonJayamanne
Copy link
Contributor

I have enroled ms-toolsai.jupyter into the notebookDocumentEvents proposal meaning the extension can migrate safely.

Done

@jrieken jrieken changed the title Finalise notebook APIs that are needed for LSP Finalise notebook API for notebook document change events Apr 4, 2022
jrieken added a commit that referenced this issue Apr 20, 2022
jrieken added a commit that referenced this issue Apr 20, 2022
@jrieken jrieken closed this as completed Apr 20, 2022
jrieken added a commit that referenced this issue Apr 20, 2022
@dbaeumer
Copy link
Member

Thanks!!

@jrieken jrieken added the verification-needed Verification of issue is requested label Apr 25, 2022
@jrieken
Copy link
Member Author

jrieken commented Apr 25, 2022

To verify:

make sure latest vscode.d.ts has vscode.workspace.onDidChangeNotebookDocument and vscode.workspace.onDidSaveNotebookDocument

@DonJayamanne DonJayamanne added the verified Verification succeeded label Apr 26, 2022
@jrieken jrieken added the on-release-notes Issue/pull request mentioned in release notes label Apr 29, 2022
jrieken added a commit to microsoft/vscode-docs that referenced this issue Apr 29, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Jun 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api api-finalization feature-request Request for new features or functionality notebook on-release-notes Issue/pull request mentioned in release notes verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

5 participants
@rebornix @jrieken @dbaeumer @DonJayamanne and others