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

Determine how to ship Jupyter Keybindings for Native Notebooks #4233

Closed
linette-zyy opened this issue Dec 15, 2020 · 8 comments
Closed

Determine how to ship Jupyter Keybindings for Native Notebooks #4233

linette-zyy opened this issue Dec 15, 2020 · 8 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug

Comments

@linette-zyy
Copy link

Environment data

image

Steps to reproduce

  1. Run cell and export as Jupyter notebook named 'tester.ipynb' in interactive window.
  2. Open tester.ipynb in editor
  3. Hit o on a code cell with output and verify that outputs disappear.
  4. Hit z and verify a deleted cell reappears
  5. Hit l on a code cell and verify line numbers appear

Expected behaviour

Hit o on a code cell with output and verify that outputs disappear.
Hit z and verify a deleted cell reappears
Hit l on a code cell and verify line numbers appear

Actual behaviour

Hit o on a code cell with output and that outputs did not disappear.
Hit z and a deleted cell did not reappear
Hit l with no line numbers appear
image

@linette-zyy linette-zyy added the bug Issue identified by VS Code Team member as probable bug label Dec 15, 2020
@linette-zyy
Copy link
Author

This issue is not reproduce on stable build.

@IanMatthewHuff
Copy link
Member

Thanks. Some of these might just be differences with the new notebook UI on insiders. Will look into it.

@greazer greazer added vscode-notebook upstream-vscode Blocked on upstream VS code labels Jan 4, 2021
@greazer
Copy link
Member

greazer commented Jan 5, 2021

We need to make sure that if we solve this in the jupyter extension we don't cause problems for users who customize keyboard shortcuts in general.

@DonJayamanne
Copy link
Contributor

Suggestion from VS Code microsoft/vscode#106679

@DonJayamanne DonJayamanne changed the title Hit 'o', Hit 'z' and Hit 'l' on a code cell does not work in notebook editor. Jupyter Keybindings for Notebooks Jan 12, 2021
@DonJayamanne
Copy link
Contributor

DonJayamanne commented Jan 13, 2021

Solution as proposed by VS Code

Option 1 (preferred by VS Code): Create a new extension to ship keybindings

  • New extension will be dependency of Jupyter extension
  • Category should not contain keymap (see previous comment in VS Code repo for details)
  • All key bindings should go into this
  • This way, if users don't want default Jupyter key bindings, they can disable this new extension & (optionally install another extension if someone creates it).
  • Also easy for users to discover & disable this key bindings (if they don't want jupyter key bindings)
    Problem: Unfortunately VS Code doesn't support disabling of dependant extensions (I have pass this info to VS Code).

Option 2: Add all key bindings in the Juypyter extension with when clause to disable it

  • In the when clause make a reference to a config setting (we alraedy do this today()
  • If that setting is set, then such key bindings will not be enabled.
  • This allows users to disable jupyter style keybindings.
  • Not VSCodes preferred option (as key bindings are generally separate extensions).

Right now Option 1 does not work, hence we will need to go with Option 2

@greazer greazer changed the title Jupyter Keybindings for Notebooks Determine how to ship Jupyter Keybindings for Native Notebooks Jan 20, 2021
@DonJayamanne
Copy link
Contributor

Shortcuts to be added are in #4376

@DonJayamanne DonJayamanne self-assigned this Jan 21, 2021
@DonJayamanne
Copy link
Contributor

DonJayamanne commented Jan 21, 2021

Closing this issue as we have a solution & the issue is tracked in #4376

@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
bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

4 participants