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

Add "Create Console for Notebook" to Notebook menu and context menu #2189

Merged
merged 3 commits into from May 11, 2017

Conversation

@markroth8
Copy link
Contributor

@markroth8 markroth8 commented May 11, 2017

Fixes first part of #919.

Adds a new Notebook menu item to create a console for the active notebook.
Adds a context menu item that launches the same command.

Copy link
Member

@blink1073 blink1073 left a comment

One minor comment. Thanks for this!

commands.addCommand(CommandIDs.createConsoleForNotebook, {
label: 'Create Console for Notebook',
execute: args => {
let widget = tracker.currentWidget;
Copy link
Member

@blink1073 blink1073 May 11, 2017

If you use the getCurrent() function here, it will make sure the notebook is focused.

Copy link
Contributor

@ellisonbg ellisonbg left a comment

Nice!

@@ -70,6 +70,9 @@ namespace CommandIDs {
const switchKernel = 'notebook:switch-kernel';

export
const createConsoleForNotebook = 'notebook:create-console-for-notebook';
Copy link
Contributor

@ellisonbg ellisonbg May 11, 2017

I would call the command notebook:create-console to match the naming of the similar command in the fileeditor.

@blink1073
Copy link
Member

@blink1073 blink1073 commented May 11, 2017

One more thing, can you please add this to the command palette? Search for palette.addItem in the file for context.

@markroth8
Copy link
Contributor Author

@markroth8 markroth8 commented May 11, 2017

Gladly

@blink1073
Copy link
Member

@blink1073 blink1073 commented May 11, 2017

Thanks!

@blink1073 blink1073 merged commit e4bf37e into jupyterlab:master May 11, 2017
2 checks passed
@blink1073 blink1073 mentioned this pull request May 16, 2017
@lock lock bot locked as resolved and limited conversation to collaborators Aug 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants