Skip to content

Commit

Permalink
Change number of icons in notebook toolbar (#4747)
Browse files Browse the repository at this point in the history
* Fix icons

* Have trust command show up and nothing else if untrusted

* Add trust check to all commands

* Update based on discussion
  • Loading branch information
rchiodo committed Feb 11, 2021
1 parent 04711c5 commit da187f0
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 21 deletions.
1 change: 1 addition & 0 deletions news/1 Enhancements/4730.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Minimize number of icons on the notebook toolbar (put the rest in overflow).
39 changes: 18 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,10 @@
"command": "jupyter.notebookeditor.interruptkernel",
"title": "%jupyter.command.jupyter.interruptkernel.title%",
"category": "Notebook",
"icon": "$(primitive-square)",
"icon": {
"light": "resources/light/interrupt.svg",
"dark": "resources/dark/interrupt.svg"
},
"enablement": "notebookViewType == 'jupyter-notebook' && jupyter.isnotebooktrusted && jupyter.notebookeditor.canInterruptNotebookKernel"
},
{
Expand Down Expand Up @@ -785,55 +788,49 @@
{
"command": "jupyter.notebookeditor.runallcellsabove",
"title": "%DataScience.runAbove%",
"group": "navigation@1",
"when": "notebookViewType == 'jupyter-notebook'"
"group": "overflow@1",
"when": "notebookViewType == 'jupyter-notebook' && jupyter.isnotebooktrusted"
},
{
"command": "jupyter.notebookeditor.runcellandallbelow",
"title": "%DataScience.runBelow%",
"group": "navigation@2",
"when": "notebookViewType == 'jupyter-notebook'"
"group": "overflow@2",
"when": "notebookViewType == 'jupyter-notebook' && jupyter.isnotebooktrusted"
},
{
"command": "jupyter.notebookeditor.restartkernel",
"title": "%jupyter.command.jupyter.restartkernel.title%",
"group": "navigation@3",
"when": "notebookViewType == 'jupyter-notebook'"
"group": "navigation@1",
"when": "notebookViewType == 'jupyter-notebook' && jupyter.isnotebooktrusted && jupyter.notebookeditor.canrestartNotebookkernel"
},
{
"command": "jupyter.notebookeditor.interruptkernel",
"title": "%jupyter.command.jupyter.interruptkernel.title%",
"group": "navigation@4",
"when": "notebookViewType == 'jupyter-notebook'"
"group": "overflow@1",
"when": "notebookViewType == 'jupyter-notebook' && jupyter.isnotebooktrusted && jupyter.notebookeditor.canInterruptNotebookKernel"
},
{
"command": "jupyter.openVariableView",
"title": "%jupyter.command.jupyter.openVariableView.title%",
"group": "navigation@5",
"when": "notebookViewType == 'jupyter-notebook'"
"group": "navigation@2",
"when": "notebookViewType == 'jupyter-notebook' && jupyter.isnotebooktrusted"
},
{
"command": "jupyter.notebookeditor.export",
"title": "%DataScience.notebookExportAs%",
"group": "navigation@6",
"when": "notebookViewType == 'jupyter-notebook'"
"group": "navigation@3",
"when": "notebookViewType == 'jupyter-notebook' && jupyter.isnotebooktrusted"
},
{
"command": "jupyter.notebookeditor.trust",
"title": "%DataScience.trustNotebookCommandTitle%",
"group": "navigation@999",
"group": "navigation@1",
"when": "notebookViewType == 'jupyter-notebook' && !jupyter.isnotebooktrusted && jupyter.trustfeatureenabled"
},
{
"command": "jupyter.notebookeditor.trusted",
"title": "%DataScience.notebookIsTrusted%",
"group": "navigation@999",
"when": "notebookViewType == 'jupyter-notebook' && jupyter.isnotebooktrusted && jupyter.trustfeatureenabled"
},
{
"command": "jupyter.selectNativeJupyterUriFromToolBar",
"title": "%jupyter.command.jupyter.selectjupyteruri.title%",
"group": "navigation@1000",
"group": "overflow@1000",
"when": "notebookViewType == 'jupyter-notebook'"
}
],
Expand Down
3 changes: 3 additions & 0 deletions resources/dark/interrupt.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions resources/light/interrupt.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit da187f0

Please sign in to comment.