Skip to content

Update to the latest Notebook API#15416

Merged
DonJayamanne merged 6 commits into
microsoft:mainfrom
DonJayamanne:updateNotebookAPI
Feb 18, 2021
Merged

Update to the latest Notebook API#15416
DonJayamanne merged 6 commits into
microsoft:mainfrom
DonJayamanne:updateNotebookAPI

Conversation

@DonJayamanne
Copy link
Copy Markdown

@DonJayamanne DonJayamanne commented Feb 16, 2021

For #15415

Insiders tests will not pass until both extensions have been updated to use the new API.

Comment thread package.json
},
"engines": {
"vscode": "^1.51.0"
"vscode": "^1.53.0"
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is required else anyone falling into native notebooks xperiment might not have the latest VS Code version with support for native notebooks in jupyter extension.

public get onDidChangeActiveNotebookEditor(): Event<NotebookEditor | undefined> {
return this.canUseNotebookApi
? this.notebook.onDidChangeActiveNotebookEditor
? this.window.onDidChangeActiveNotebookEditor
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

API updates

public get languageId(): string {
return this.notebook.languages[0];
// eslint-disable-next-line global-require
const { NotebookCellKind } = require('vscode');
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rchiodo notebook documents no longer have a langauges property.
Hence this change.

Copy link
Copy Markdown

@ericsnowcurrently ericsnowcurrently left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread package.json Outdated
@luabud
Copy link
Copy Markdown
Member

luabud commented Feb 17, 2021

@DonJayamanne is this going to get into the release? we still have a lot of users on 1.51 and 1.52

@DonJayamanne
Copy link
Copy Markdown
Author

is this going to get into the release? we still have a lot of users on 1.51 and 1.52

This is going into insiders.

@DonJayamanne DonJayamanne merged commit 0718ec6 into microsoft:main Feb 18, 2021
@DonJayamanne DonJayamanne deleted the updateNotebookAPI branch February 18, 2021 16:39
@karrtikr
Copy link
Copy Markdown

@DonJayamanne We have some failing PR tests that are likely related to this https://github.com/microsoft/vscode-python/runs/1920019649.

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.

10 participants