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

[vscode] Stub vscode 'Notebook' API #11993

Merged
merged 2 commits into from
Dec 14, 2022

Conversation

rschnekenbu
Copy link
Contributor

What it does

Stub vscode 'Notebook' API
This enables the possibility to load and start plugins which depend on the 'Notebook' API. The 'Notebook' functionality will not be operational but the rest of the functionality offered by the plugin will be.

Fixes #11786

Contributed on behalf of ST Microelectronics

How to test

  1. Install extension GitHub Issue Notebooks from open-vsx, by downloading the vsix file and installing the downloaded file from extension view (note: tested on 0.0.127 on my side).
  2. Reproduce the problem in the theia instance before switching to this PR. Try to create a new Github Issues notebook (ctrl+shift+p and type New Github Issue Notebook)
  3. An error should be displayed: Activating extension 'GitHub Issue Notebooks' failed: vscode__WEBPACK_IMPORTED_MODULE_0__.workspace.onDidOpenNotebookDocument is not a function
  4. Update your theia repository to use this PR
  5. Open the same workspace and make sure the message above is no longer displayed when creating a new Github issues notebook. Nothing should happen, as notebook API is only stubbed, not implemented.

Review checklist

Reminder for reviewers

rschnekenbu and others added 2 commits December 14, 2022 11:28
This enables the possibility to load and start plugins which depend on the 'Notebook' API.  The 'Notebook' functionality will not be operational but the rest of
the functionality offered by the plugin will be.

Contributed on behalf of STMicroelectronics

Signed-off-by: Remi SCHNEKENBURGER <[email protected]>
update changelog with PR information
@vince-fugnitto vince-fugnitto added vscode issues related to VSCode compatibility notebook issues related to notebooks labels Dec 14, 2022
Copy link
Member

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

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

LGTM 👍 I confirmed that there is no error with the plugin, and the API is correctly marked as stubbed.

I noticed there is no implementation yet for the onNotebook activation event, but given we are only stubbing I think we can keep it for when we actually implement support with #8395.

@JonasHelming JonasHelming merged commit 4542e03 into eclipse-theia:master Dec 14, 2022
@vince-fugnitto
Copy link
Member

vince-fugnitto commented Dec 16, 2022

I believe the stubbing of events such as NotebookRendererMessaging.onDidReceiveMessage among others are incorrect and will actually produce errors on activation:

image

I modified the vscode-github-issues-notebook plugin to make use of the API.

@vince-fugnitto vince-fugnitto mentioned this pull request Dec 16, 2022
1 task
@rschnekenbu
Copy link
Contributor Author

Thanks @vince-fugnitto! I'll have a look

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
notebook issues related to notebooks vscode issues related to VSCode compatibility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[vscode] Stub vscode 'NoteBook' API
3 participants