Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tutoral how to add new command in the menu under an existing category #168

Closed
pacospace opened this issue Jul 7, 2021 · 3 comments · Fixed by #181
Closed

Tutoral how to add new command in the menu under an existing category #168

pacospace opened this issue Jul 7, 2021 · 3 comments · Fixed by #181
Labels
enhancement New feature or request

Comments

@pacospace
Copy link

pacospace commented Jul 7, 2021

Problem

I'm working on a jupyterlab-extension for dependency management [1]. Some users requested feature to delete kernels directly from the UI, instead of going to the terminal, so the following solution was introduced:

preview

I did not find a way to add the new command Kernel Delete... to the menu under Kernel, as I think that should be the place.

Proposed Solution

  • Have an example on how to add command to menu on existing category.

Additional context

@NoobMaster1999
Copy link

I want to solve this issue. Can anyone please assign me the issue..???

@fcollonval
Copy link
Member

fcollonval commented Aug 20, 2021

Thanks for proposing your help. I'm unsure this requires a new example. The launcher example is adding an entry to the File>New submenu:

menu.fileMenu.newMenu.addGroup([{ command }], 30);

Basically you have to use the accessors of IMainMenu. Moreover in JupyterLab 3.1 a new mechanism to define menu from settings has been introduced. The menu example will be updated in #181.

if you want to help, I can provide you some pointer for #111, #134, #138 or #154.

@jtpio jtpio closed this as completed in #181 Sep 3, 2021
@pacospace
Copy link
Author

Thanks @fcollonval !!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants