Pinning Notebooks on Notebooks view (#11963)

* initial commit

* added tests

* code cleanup and more tests

* add missed util test

* changes to address comments

* remove pin from resources
This commit is contained in:
Maddy
2020-08-31 08:53:11 -07:00
committed by GitHub
parent b4a3325a21
commit ae830d9e64
15 changed files with 506 additions and 26 deletions

View File

@@ -59,6 +59,14 @@
"type": "number",
"default": 60000,
"description": "%notebook.remoteBookDownloadTimeout.description%"
},
"notebook.pinnedNotebooks": {
"type": "array",
"default": [],
"description": "%notebook.pinnedNotebooks.description%",
"items": {
"type": "string"
}
}
}
},
@@ -247,6 +255,21 @@
"dark": "resources/dark/open_notebook_inverse.svg",
"light": "resources/light/open_notebook.svg"
}
},
{
"command": "notebook.command.pinNotebook",
"title": "%title.pinNotebook%",
"category": "%books-preview-category%",
"icon": "$(pinned)"
},
{
"command": "notebook.command.unpinNotebook",
"title": "%title.unpinNotebook%",
"category": "%books-preview-category%",
"icon": {
"dark": "resources/dark/unpin_inverse.svg",
"light": "resources/light/unpin.svg"
}
}
],
"languages": [
@@ -364,6 +387,14 @@
{
"command": "notebook.command.revealInBooksViewlet",
"when": "false"
},
{
"command": "notebook.command.pinNotebook",
"when": "false"
},
{
"command": "notebook.command.unpinNotebook",
"when": "false"
}
],
"notebooks/title": [
@@ -424,6 +455,16 @@
{
"command": "notebook.command.closeNotebook",
"when": "view == bookTreeView && viewItem == savedNotebook"
},
{
"command": "notebook.command.pinNotebook",
"when": "view == bookTreeView && viewItem == savedNotebook",
"group": "inline"
},
{
"command": "notebook.command.unpinNotebook",
"when": "view == pinnedBooksView || view == bookTreeView && viewItem == pinnedNotebook",
"group": "inline"
}
],
"view/title": [
@@ -454,6 +495,11 @@
},
"views": {
"notebooks": [
{
"id": "pinnedBooksView",
"name": "%title.PinnedBooks%",
"when": "showPinnedbooks"
},
{
"id": "bookTreeView",
"name": "%title.SavedBooks%"