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

Support creating an ipynb notebook file via VSCode -> New File... #7363

Closed
greazer opened this issue Aug 31, 2021 · 5 comments · Fixed by #7619
Closed

Support creating an ipynb notebook file via VSCode -> New File... #7363

greazer opened this issue Aug 31, 2021 · 5 comments · Fixed by #7619
Assignees
Labels
notebook-getting-started notebook-workflow Issues that interrupt expected or desirable behavior papercut 🩸 Something affecting the productivity of the team verified Verification succeeded

Comments

@greazer
Copy link
Member

greazer commented Aug 31, 2021

No description provided.

@greazer greazer added enhancement papercut 🩸 Something affecting the productivity of the team notebook-getting-started labels Aug 31, 2021
@greazer greazer added this to the September 2021 milestone Aug 31, 2021
@greazer greazer added notebook-workflow Issues that interrupt expected or desirable behavior and removed needs-triage labels Sep 2, 2021
@SiddhanthUnnithan
Copy link

(IMO) Relevant: #7491

@IanMatthewHuff
Copy link
Member

IanMatthewHuff commented Sep 20, 2021

I spent some time digging around the ChangeModeAction to get familiar with the code on the vscode side, and from what I see the issue here is a bit more interesting for notebooks than I first thought. Seemed worth discussing as a general notebook / UX issue.

Per the issue it seems reasonable that a customer would take this path here:
image

And then expect to get an empty notebook cell. As opposed to what they get right now where they get text editor instance set to "Jupyter" language mode, not very useful.

However supporting this might be a bit more of a change than expected, and I'm interested in if what we are proposing is even what the customers will expect to have happen. Right now the code is based around changing the language mode of the active text editor. It shows up in the New File link, but is also available via the language picker and the "Change Language Mode" command. Using this command you can swap between C#->JavaScript->Go and the whole time you have the same fundamental text editor, you just change the language mode. I think that we certainly have the capability to close the active text editor and bring up the notebook editor, but it does raise some of the following issues in my mind.

  1. This is a bit of a destructive command, you can change a file from language to language, but changing from the text editor to a notebook editor you can't just change back.
  2. What would you do with the content in the file changing from a non-notebook file to a notebook file? These commands don't just work with an empty new file. Would the content go away? Push all the text into the first cell?
  3. Is a notebook type actually a language mode and appropriate to be in this list? To me it feels pretty fundamentally different from picking F#, or Java. Something like Jupyter supports different language modes inside of it, it's not a language mode in and of itself. Also what does this mean for something like github-issues?

Coming in newer to the core codebase here it actually feels to me like the notebook types are not actually appropriate language selections here. Just consider per point 3 above what exactly does this situation that I set up here mean?
image
If I change the editor language of a Jupyter notebook cell to github-issues I certainly don't expect that cell to turn into a notebook editor instance. Allowing notebook types as language selections in some cases, but not in others is starting to feel pretty special casey. But then the follow up question there is do we have adequate entry points to create a new notebook file if they are not allowed in the language mode change? New File ... as mentioned as a reasonable spot to add it.

My current thinking is that notebook types are not appropriate for the "Change Language Mode" command and associated actions (Language picker, New File change language link). But I'd like to check my understanding here, particularly with VS Code core folks.

@rchiodo
Copy link
Contributor

rchiodo commented Sep 20, 2021

I agree, language picker shouldn't let you pick 'jupyter'. It's weird and destructive. I think that's one of the reasons for this issue actually. We remove the 'jupyter' language, so then how does a user make a new notebook? Well they use the New File ... which lets them do more than just create text files.

@IanMatthewHuff
Copy link
Member

IanMatthewHuff commented Sep 20, 2021

Yeah, the comment on the initial issue from Sid sounded like "pick 'Jupyter' and get a notebook" via the language picker but that doesn't seem right to me. I agree on adding it to New File... just wanted to check my understanding on removing it from the language picker. I could see that path making sense to some users, but it just feels janky to me. I'm interested in taking a peek at that remove while I do the New File... add.

@IanMatthewHuff
Copy link
Member

Closing as it's added to New File... opened the issue 133486 on the vscode side for hiding notebook types in language picker.

@DonJayamanne DonJayamanne added the verified Verification succeeded label Sep 28, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
notebook-getting-started notebook-workflow Issues that interrupt expected or desirable behavior papercut 🩸 Something affecting the productivity of the team verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants