From dc299395ebfb11d6512bd762f56123e01f03ac31 Mon Sep 17 00:00:00 2001 From: Vishnutheep B Date: Fri, 16 Feb 2024 20:33:41 +0000 Subject: [PATCH 1/5] Grayed out edit-notebook-metadata --- packages/notebook-extension/src/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/notebook-extension/src/index.ts b/packages/notebook-extension/src/index.ts index 86fb9bc917..cd70b6c985 100644 --- a/packages/notebook-extension/src/index.ts +++ b/packages/notebook-extension/src/index.ts @@ -549,6 +549,8 @@ const editNotebookMetadata: JupyterFrontEndPlugin = { }); } }, + isEnabled: () => { app.shell.currentWidget !== null && + app.shell.currentWidget instanceof NotebookPanel } }); if (palette) { From 3ab0ff31934b5cba1131633254696a54b5e54a73 Mon Sep 17 00:00:00 2001 From: Vishnutheep B Date: Fri, 16 Feb 2024 20:42:11 +0000 Subject: [PATCH 2/5] Grayed out edit notebook metadata --- packages/notebook-extension/src/index.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/notebook-extension/src/index.ts b/packages/notebook-extension/src/index.ts index cd70b6c985..a0f1987745 100644 --- a/packages/notebook-extension/src/index.ts +++ b/packages/notebook-extension/src/index.ts @@ -517,7 +517,7 @@ const editNotebookMetadata: JupyterFrontEndPlugin = { translator: ITranslator | null, notebookTools: INotebookTools | null ) => { - const { commands } = app; + const { commands, shell } = app; translator = translator ?? nullTranslator; const trans = translator.load('notebook'); @@ -549,8 +549,7 @@ const editNotebookMetadata: JupyterFrontEndPlugin = { }); } }, - isEnabled: () => { app.shell.currentWidget !== null && - app.shell.currentWidget instanceof NotebookPanel } + isEnabled: () => shell.currentWidget !== null && shell.currentWidget instanceof NotebookPanel }); if (palette) { From 070dcd808bb132af56591428499c31dcf968e230 Mon Sep 17 00:00:00 2001 From: Vishnutheep B Date: Sun, 18 Feb 2024 16:51:56 +0000 Subject: [PATCH 3/5] Added isVisible property for Edit notebook metadata --- packages/notebook-extension/src/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/notebook-extension/src/index.ts b/packages/notebook-extension/src/index.ts index a0f1987745..401ba8533d 100644 --- a/packages/notebook-extension/src/index.ts +++ b/packages/notebook-extension/src/index.ts @@ -549,7 +549,9 @@ const editNotebookMetadata: JupyterFrontEndPlugin = { }); } }, - isEnabled: () => shell.currentWidget !== null && shell.currentWidget instanceof NotebookPanel + isVisible: () => + shell.currentWidget !== null && + shell.currentWidget instanceof NotebookPanel }); if (palette) { From 7af4331b965c5e247894d0cfef72a6d2144937f6 Mon Sep 17 00:00:00 2001 From: Vishnutheep B Date: Sun, 18 Feb 2024 17:01:40 +0000 Subject: [PATCH 4/5] Prettier code for Test Lint check --- packages/notebook-extension/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/notebook-extension/src/index.ts b/packages/notebook-extension/src/index.ts index 401ba8533d..1806f70f32 100644 --- a/packages/notebook-extension/src/index.ts +++ b/packages/notebook-extension/src/index.ts @@ -551,7 +551,7 @@ const editNotebookMetadata: JupyterFrontEndPlugin = { }, isVisible: () => shell.currentWidget !== null && - shell.currentWidget instanceof NotebookPanel + shell.currentWidget instanceof NotebookPanel }); if (palette) { From a13e10871e4689b717f8d5ba39ab6b6dfdd5d37e Mon Sep 17 00:00:00 2001 From: Vishnutheep B Date: Sun, 18 Feb 2024 17:07:32 +0000 Subject: [PATCH 5/5] Prettier code for Test Lint check --- packages/notebook-extension/src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/notebook-extension/src/index.ts b/packages/notebook-extension/src/index.ts index 1806f70f32..0ba7340cfe 100644 --- a/packages/notebook-extension/src/index.ts +++ b/packages/notebook-extension/src/index.ts @@ -550,8 +550,8 @@ const editNotebookMetadata: JupyterFrontEndPlugin = { } }, isVisible: () => - shell.currentWidget !== null && - shell.currentWidget instanceof NotebookPanel + shell.currentWidget !== null && + shell.currentWidget instanceof NotebookPanel, }); if (palette) {