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

Fixed context keys for notebook editor context #13448

Merged
merged 7 commits into from
Mar 19, 2024

Conversation

jonah-iden
Copy link
Contributor

@jonah-iden jonah-iden commented Mar 4, 2024

What it does

This fixes the setting of context keys for editor level context keys. Only implements some of the keys currently (see notebook-context-manager.ts).
This makes jupyter commands like Export As or Restart Kernel available in the notebook editor toolbar

How to test

  1. Have the python and jupyter extension installed.
  2. After opening and clicking on a notebook the export command should pop up in the toolbar.
  3. Then after selecting a kernel the restart kernel command should appear as well
  4. both should be executable

Follow-ups

Implement the outline view for notebooks including the outline.focus command so that the Show Table of Contents command works as well

Review checklist

Reminder for reviewers

    this makes commands from jupyter available

Signed-off-by: Jonah Iden <jonah.iden@typefox.io>
@jonah-iden jonah-iden requested a review from msujew March 4, 2024 10:58
@jonah-iden jonah-iden marked this pull request as ready for review March 4, 2024 10:59
@jonah-iden jonah-iden marked this pull request as draft March 4, 2024 11:05
Signed-off-by: Jonah Iden <jonah.iden@typefox.io>
Signed-off-by: Jonah Iden <jonah.iden@typefox.io>
@jonah-iden jonah-iden marked this pull request as ready for review March 4, 2024 11:21
Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

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

The behavior looks quite good. However, for some reason it breaks all code lenses (see failing tests). I can also reproduce this in the actual app:
image

Signed-off-by: Jonah Iden <jonah.iden@typefox.io>
@jonah-iden
Copy link
Contributor Author

How did you reproduce it in the app?

@msujew
Copy link
Member

msujew commented Mar 4, 2024

@jonah-iden I enabled the TypeScript Reference Lens setting in the app and opened a .ts file. Clicking on the code lens yielded the error. I was also able to reproduce it by exporting a ipynb file to a .py file and using the Run Cell lens.

Signed-off-by: Jonah Iden <jonah.iden@typefox.io>
@jonah-iden
Copy link
Contributor Author

should be fixed now

Signed-off-by: Jonah Iden <jonah.iden@typefox.io>
…rk with the previous solution)

Signed-off-by: Jonah Iden <jonah.iden@typefox.io>
Copy link
Contributor

@jbicker jbicker left a comment

Choose a reason for hiding this comment

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

LGTM

@jonah-iden jonah-iden merged commit d76ec39 into master Mar 19, 2024
13 of 14 checks passed
@github-actions github-actions bot added this to the 1.48.0 milestone Mar 19, 2024
@msujew msujew added the notebook issues related to notebooks label Apr 30, 2024
@msujew msujew deleted the jiden/notebook-fix-jupyter-editor-commands branch May 2, 2024 10:31
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
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants