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

working notebook cell language select #13615

Merged
merged 4 commits into from
Apr 22, 2024

Conversation

jonah-iden
Copy link
Contributor

@jonah-iden jonah-iden commented Apr 17, 2024

What it does

This allows clicking the language on the bottom right of notebook cells and change the cell language.
For this it moves some of the editor-command code to select a code language to its own service

Also fixes a small but pretty substantial problem with notebook cells and not being able to create new lines when pressing enter

How to test

Open a notebook.
Create a multi line cell check that enter works correctly
Click on the language tag in the lower right corner of the cell and change the language

Follow-ups

Review checklist

Reminder for reviewers

@jonah-iden jonah-iden requested a review from msujew April 17, 2024 15:05
Also fixing notebook enter in notebook cell editors

Signed-off-by: Jonah Iden <jonah.iden@typefox.io>
@jonah-iden jonah-iden force-pushed the jiden/notebook-cell-language-select branch from 9eb3432 to 2b1d91f Compare April 17, 2024 15:15
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.

It seems like the language is getting persisted incorrectly. After changing a piece of Python code to Go, the syntax hightlighting is correctly adjusted:

image

After closing and reopening the notebook, it still says Go, but the highlighting has reverted to Python:

image

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

@msujew it works fine for me at least for all cells except the first. But the reason for that seems to be a bigger one. Seems like the preferred cell language is not set correctly by the extensions. Havn't figured out why yet

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

@msujew forget that i found the culprit. Should work now. At least it does for me

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.

Great, works for me perfectly as well now 👍

@jonah-iden jonah-iden merged commit cff0a9c into master Apr 22, 2024
11 of 14 checks passed
@jonah-iden jonah-iden deleted the jiden/notebook-cell-language-select branch April 22, 2024 08:59
@github-actions github-actions bot added this to the 1.49.0 milestone Apr 22, 2024
@msujew msujew added the notebook issues related to notebooks label Apr 30, 2024
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.

2 participants