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

@@ -35,7 +35,8 @@ export class BookModel {
public readonly bookPath: string,
public readonly openAsUntitled: boolean,
public readonly isNotebook: boolean,
private _extensionContext: vscode.ExtensionContext) {
private _extensionContext: vscode.ExtensionContext,
public readonly notebookRootPath?: string) {
this._bookItems = [];
}
@@ -107,7 +108,7 @@ export class BookModel {
let notebookItem = new BookTreeItem({
title: pathDetails.name,
contentPath: this.bookPath,
root: pathDetails.dir,
root: this.notebookRootPath ? this.notebookRootPath : pathDetails.dir,
tableOfContents: { sections: undefined },
page: { sections: undefined },
type: BookTreeItemType.Notebook,