Fix search for pinned notebooks (#12719)

* fix search for pinned notebooks

* fix filtering when verifying that a search folder is not a subdirectory from the current folder queries path

* Show book node on pinned notebooks search results

* fix parent node on pinned notebooks search results

* fix search for pinned notebook and modify how pinned notebooks are stored in workspace

* update format of pinned notebooks for users that used the september release version

* removed unused functions

* Address PR comments

* fix parent node for legacy version of jupyter books

* remove cast from book path
This commit is contained in:
Barbara Valdez
2020-10-06 11:54:42 -07:00
committed by GitHub
parent 288288df03
commit 825663fd77
10 changed files with 89 additions and 47 deletions

View File

@@ -39,6 +39,7 @@ export class BookTreeItem extends vscode.TreeItem {
private _nextUri: string;
public readonly version: string;
public command: vscode.Command;
public resourceUri: vscode.Uri;
constructor(public book: BookTreeItemFormat, icons: any) {
super(book.title, book.treeItemCollapsibleState);
@@ -74,6 +75,7 @@ export class BookTreeItem extends vscode.TreeItem {
}
else {
this.tooltip = this.book.type === BookTreeItemType.Book ? (this.book.version === BookVersion.v1 ? path.join(this.book.root, content) : this.book.root) : this.book.contentPath;
this.resourceUri = vscode.Uri.file(this.book.root);
}
}