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

Ensure notebook document event registration #14242

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

msujew
Copy link
Member

@msujew msujew commented Oct 2, 2024

What it does

Ok, this one is a bit difficult to describe, but I will try my best:

The Jupyter plugin uses a context key called jupyter.ispythonnotebook to determine whether to show the jupyter.openVariableView button.

This context key is set inside of the jupyter plugin, after encountering the metadata.kernelSpec property. This metadata property is set immediately when the notebook opens. This is done by performing a notebook metadata edit. This edit is performed correctly in the frontend notebook model, but since the necessary events aren't setup yet, the metadata edit isn't propagated back to the plugin host.

This change adjusts the order in which the service calls are happening to ensure that all events are properly setup before the notebook opening event is sent to the plugin host. This ensures that any edit operation on the frontend side is correctly propagated towards the plugin host.

How to test

Open a notebook editor for a .ipynb file and select a kernel. Reload the app and ensure that the Variables button is available in the notebook toolbar.

Review checklist

Reminder for reviewers

@msujew msujew added the notebook issues related to notebooks label Oct 2, 2024
@msujew msujew requested a review from jonah-iden October 2, 2024 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
notebook issues related to notebooks
Projects
Status: Waiting on reviewers
Development

Successfully merging this pull request may close these issues.

1 participant