- Notifications
You must be signed in to change notification settings - Fork5.5k
Added Edit Notebook Metadata Option (#6402)#7099
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes from1 commit
Commits
Show all changes
21 commits Select commitHold shift + click to select a range
a4077bb Added Edit Notebook Metadata Option (#6402)
Dilip-Jainb2e380a [pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot]c597c36 Added Edit Notebook Metadata Option (#6402)
Dilip-Jain0691f87 [pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot]1fd2872 Merge branch 'jupyter:main' into edit-notebook-metadata
Dilip-Jain657313c Prettier Code for passing Test Lint check
Dilip-Jainab1fd64 Prettier Code for passing Test Lint check
Dilip-Jaine6600a9 Merge branch 'main' into edit-notebook-metadata
jtpioac9beab Merge branch 'main' into edit-notebook-metadata
jtpiod7061c2 Merge branch 'jupyter:main' into edit-notebook-metadata
Dilip-Jain5916885 adding the edit-notebook-metadata entry via schema
Dilip-Jaina5519f3 adding the edit-notebook-metadata entry via schema
Dilip-Jain4efdd7d adding the edit-notebook-metadata entry via schema
Dilip-Jaina2b8be8 adding the edit-notebook-metadata entry via schema
Dilip-Jain73188df adding the edit-notebook-metadata entry via schema
Dilip-Jainf9091c5 Merge branch 'main' into edit-notebook-metadata
jtpiodcbc9ad fix menu item
jtpio7a3db32 Add to the command palette
jtpio405b732 Update Playwright Snapshots
github-actions[bot]e73e9a4 Update Playwright Snapshots
github-actions[bot]b699a33 fix snapshots
jtpioFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
adding the edit-notebook-metadata entry via schema
adding the menu entry via the settings defined in the schema folder dropping the dependency on IMainMenu in the plugin
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
commit59168852f55e94441de19cac3478769e93ba1b8f
There are no files selected for viewing
16 changes: 11 additions & 5 deletionspackages/notebook-extension/src/index.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -63,6 +63,14 @@ const KERNEL_STATUS_FADE_OUT_CLASS = 'jp-NotebookKernelStatus-fade'; | ||
| */ | ||
| const SCROLLED_OUTPUTS_CLASS = 'jp-mod-outputsScrolled'; | ||
| /** | ||
| * The command IDs used by the notebook plugins. | ||
| */ | ||
| namespace CommandIDs { | ||
| export const openEditNotebookMetadata = 'notebook:edit-metadata'; | ||
| } | ||
| /** | ||
| * A plugin for the checkpoint indicator | ||
| */ | ||
| @@ -496,21 +504,19 @@ const trusted: JupyterFrontEndPlugin<void> = { | ||
| */ | ||
| const editNotebookMetadata: JupyterFrontEndPlugin<void> = { | ||
| id: '@jupyter-notebook/notebook-extension:edit-notebook-metadata', | ||
Dilip-Jain marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| description: 'Add a command to open right sidebar for Editing Notebook Metadata when clicking on "Edit Notebook Metadata" under Edit menu', | ||
| autoStart: true, | ||
| optional: [ITranslator, INotebookTools], | ||
| activate: ( | ||
| app: JupyterFrontEnd, | ||
| translator: ITranslator | null, | ||
| notebookTools: INotebookTools | null | ||
| ) => { | ||
| const { commands } = app; | ||
| translator = translator ?? nullTranslator; | ||
| const trans = translator.load('notebook'); | ||
| commands.addCommand(CommandIDs.openEditNotebookMetadata, { | ||
| label: trans.__('Edit Notebook Metadata'), | ||
| execute: async () => { | ||
| const command = 'application:toggle-panel'; | ||
| @@ -541,7 +547,7 @@ const editNotebookMetadata: JupyterFrontEndPlugin<void> = { | ||
| }); | ||
| // Add `Edit Notebook Metadata` option to Edit menu | ||
| //menu.editMenu.addItem({ type: 'command', command:CommandIDs.openEditNotebookMetadata, rank: 40 }); | ||
| }, | ||
| }; | ||
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.