microsoft / vscode-jupyter-powertoys

PowerToys for Jupyter notebooks in VS Code
MIT License
72 stars 17 forks source link

Update to use new cell ContextKeys API for notebook run groups #50

Closed IanMatthewHuff closed 2 years ago

IanMatthewHuff commented 2 years ago

Due to previous API limitations the visibility of the icons to add cells to and from run groups were all keyed off the active notebook cell. Here is an example of the issue:

image

Note with two docs side by side the active selection is in the right document. But in the left document the cell UI is still visible and it's incorrect (it's allowing an add to a group that already has it). With the new support for per cell context resources we can now fix this up.

IanMatthewHuff commented 2 years ago

UpdatedContextKeys2

New context key behaviour.

  1. Document level commands are not all the same, they are per document
  2. Other visible cells don't "echo" the commands of the currently active cell
  3. Command palette commands now only show and work on the active document
  4. Document execute and command palette execute commands now disable if the document doesn't have anything in that run group.