Grayout "Edit Notebook Metadata" for other file formats. (#7265)

* Grayed out edit-notebook-metadata

* Grayed out edit notebook metadata

* Added isVisible property for Edit notebook metadata

* Prettier code for Test Lint check

* Prettier code for Test Lint check
pull/7268/head
Vishnutheep B 2 years ago committed by GitHub
parent f6f5a1f538
commit f9bddf9690
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -517,7 +517,7 @@ const editNotebookMetadata: JupyterFrontEndPlugin<void> = {
translator: ITranslator | null,
notebookTools: INotebookTools | null
) => {
const { commands } = app;
const { commands, shell } = app;
translator = translator ?? nullTranslator;
const trans = translator.load('notebook');
@ -549,6 +549,9 @@ const editNotebookMetadata: JupyterFrontEndPlugin<void> = {
});
}
},
isVisible: () =>
shell.currentWidget !== null &&
shell.currentWidget instanceof NotebookPanel,
});
if (palette) {

Loading…
Cancel
Save