diff --git a/news/1 Enhancements/4730.md b/news/1 Enhancements/4730.md new file mode 100644 index 00000000000..130b662a327 --- /dev/null +++ b/news/1 Enhancements/4730.md @@ -0,0 +1 @@ +Minimize number of icons on the notebook toolbar (put the rest in overflow). diff --git a/package.json b/package.json index e96b9ca2e8c..b61e8713aa4 100644 --- a/package.json +++ b/package.json @@ -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" }, { @@ -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'" } ], diff --git a/resources/dark/interrupt.svg b/resources/dark/interrupt.svg new file mode 100644 index 00000000000..391089006ec --- /dev/null +++ b/resources/dark/interrupt.svg @@ -0,0 +1,3 @@ + + + diff --git a/resources/light/interrupt.svg b/resources/light/interrupt.svg new file mode 100644 index 00000000000..391089006ec --- /dev/null +++ b/resources/light/interrupt.svg @@ -0,0 +1,3 @@ + + +