Bug Bash issues fixes (#1162)

* Bug Bash issues fixes

* Remove rename from root of Temporary Workspace context menu

* Update comments

* Update comments
This commit is contained in:
Karthik chakravarthy
2021-12-12 19:41:15 -05:00
committed by GitHub
parent ada95eae1f
commit 469cd866e0
3 changed files with 14 additions and 6 deletions

View File

@@ -977,7 +977,7 @@ export default class Explorer {
/**
* This creates a new notebook file, then opens the notebook
*/
public onNewNotebookClicked(parent?: NotebookContentItem, isGithubTree?: boolean): void {
public async onNewNotebookClicked(parent?: NotebookContentItem, isGithubTree?: boolean): Promise<void> {
if (!useNotebook.getState().isNotebookEnabled || !this.notebookManager?.notebookContentClient) {
const error = "Attempt to create new notebook, but notebook is not enabled";
handleError(error, "Explorer/onNewNotebookClicked");
@@ -986,11 +986,9 @@ export default class Explorer {
const isPhoenixEnabled = NotebookUtil.isPhoenixEnabled();
if (isPhoenixEnabled) {
if (isGithubTree) {
async () => {
await this.allocateContainer();
parent = parent || this.resourceTree.myNotebooksContentRoot;
this.createNewNoteBook(parent, isGithubTree);
};
await this.allocateContainer();
parent = parent || this.resourceTree.myNotebooksContentRoot;
this.createNewNoteBook(parent, isGithubTree);
} else {
useDialog.getState().showOkCancelModalDialog(
Notebook.newNotebookModalTitle,