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

Open diff window on first click of .ipynb file in version control tab #2466

Closed
benlindsay opened this issue Jan 6, 2020 · 7 comments
Closed
Assignees

Comments

@benlindsay
Copy link

Feature: Notebook Editor, Interactive Window, Python Editor cells

Description

When clicking on an .ipynb file in from the version control tab, when I click the first time, it opens a notebook editor. When I click the second time, it opens the git diff window that I expect. It looks like this was the intentional design in response to microsoft/vscode-python#7905. However, I would appreciate it if the notebook editor wasn't opened at all, and the git diff window opened directly. The notebook editor can take a long time to open, and I have to wait for the whole notebook to load before I can open the git diff window. If it's a large notebook, or if I'm accessing a remote machine, this can take a while. The option to open the notebook editor is already there in the "Open File" button next to the file name in the version control tab.

Thanks for all your hard work on this extension! It's a fantastic tool that I rely on almost every day.

Details:

OS: Mac OS Mojave 10.14.6
VSCode version: 1.41.1
Python Extension version: 2019.11.50794

Microsoft Data Science for VS Code Engineering Team: @rchiodo, @IanMatthewHuff, @DavidKutu, @DonJayamanne, @greazer

@benlindsay benlindsay changed the title Don't open notebook editor when clicking on .ipynb file in version control tab Open diff window on first click of .ipynb file in version control tab Jan 6, 2020
@IanMatthewHuff
Copy link
Member

Hey @benlindsay . Thanks for the report (and glad that you like the extension). Due to how we handle the .ipynb files we have some limitations with how we open them up. However, it does seem like we should be showing the changes here in the diff window by default like for other file types. We'll look into it and see what we can do about this scenario.

@rchiodo
Copy link
Contributor

rchiodo commented Jan 6, 2020

There's also a setting that can disable auto open:
"python.dataScience.useNotebookEditor": false

@benlindsay
Copy link
Author

@rchiodo Thanks for pointing this out! That setting should work for me for now. I do still think that the default behavior from the version control tab should be opening a diff window (in an ideal world, an nbdime-powered one, but I think that's out-of-scope). In the future, when more extensions work in the notebook editor, I'll probably want to turn that setting back to true and still hope for a git diff window from the version control tab.

Thanks again to both of you!

@DonJayamanne DonJayamanne self-assigned this Mar 2, 2020
DonJayamanne referenced this issue in microsoft/vscode-python Mar 3, 2020
@IanMatthewHuff IanMatthewHuff self-assigned this Mar 10, 2020
@IanMatthewHuff
Copy link
Member

Raw diff now showing from the version control tab.
image.png
Validated.

@lock lock bot locked as resolved and limited conversation to collaborators Mar 17, 2020
@microsoft microsoft unlocked this conversation Nov 13, 2020
@DonJayamanne DonJayamanne transferred this issue from microsoft/vscode-python Nov 13, 2020
@benlindsay
Copy link
Author

This "python.dataScience.useNotebookEditor": false fix used to work fine for me, but at some point it stopped working for me. The behavior when I click on a changed notebook from the Source Control pane is to open 2 notebooks side by side, which do represent the old and new versions, but with no highlighting of any changes. Now it looks like the setting that controls whether to use the notebook editor by default on .ipynb files is "jupyter.useNotebookEditor", but that doesn't fix it for me either. There's also another setting: "notebook.diff.enablePreview" which also doesn't fix it.

This is on a remote machine accessed via the remote-ssh extension. I've verified that I've made the settings changes in all 3 possible places, User, Workspace, and Remote:

image

image

Any guesses as to why I'm experiencing this and what I can do to fix it?

@IanMatthewHuff
Copy link
Member

@benlindsay I'm pretty sure that we regressed this with our last release. I would reopen this issue, but I believe that we already have issue #633 tracking this right now. We'll be discussing it today at our triage.

@benlindsay
Copy link
Author

@IanMatthewHuff Ahh, great!! Thanks so much for the quick reply!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants