Skip to content
This repository has been archived by the owner on Feb 16, 2023. It is now read-only.

Simple button to switch back to classic notebook #157

Closed
Tracked by #2422
yuvipanda opened this issue Jun 7, 2021 · 5 comments · Fixed by #158
Closed
Tracked by #2422

Simple button to switch back to classic notebook #157

yuvipanda opened this issue Jun 7, 2021 · 5 comments · Fixed by #158
Labels
enhancement New feature or request

Comments

@yuvipanda
Copy link
Contributor

Problem

Retrolab is a great alternative to classic notebook, but bugs will still be found. To ease worries about exposing students to these bugs, having a simple way to switch to classic notebook (without having to fiddle with the URL) would be great.

Proposed Solution

A built in toolbar button that lets you switch to classic. This could also switch to lab if needed.

@jtpio
Copy link
Member

jtpio commented Jun 8, 2021

Thanks @yuvipanda.

Would having the same "Launch Classic Notebook" menu entry as in JupyterLab work?

image

@yuvipanda
Copy link
Contributor Author

@jtpio yes! Just on the menubar?

@jtpio
Copy link
Member

jtpio commented Jun 8, 2021

Just on the menubar?

It would also be available in the command palette.

Because then it would probably be a matter of just @jupyterlab/help-extension as a dependency, and the plugin here:

// @jupyterlab plugins

That would look like the following:

 require('@jupyterlab/help-extension').default.filter(({ id }) =>
  [
    '@jupyterlab/help-extension:launch-classic'
  ].includes(id)
),

@yuvipanda
Copy link
Contributor Author

@jtpio hmm, so it doesn't seem to open to the currently open notebook - just generically opens classic notebook. Since we have current context, I think we can do better.

@jtpio
Copy link
Member

jtpio commented Jun 8, 2021

So we can probably add a new plugin to RetroLab for this then.

There is already a plugin to do something similar (installed as a lab extension), but to go from JupyterLab to RetroLab:

image

commands.addCommand(CommandIDs.openRetro, {
label: 'Open in RetroLab',
execute: () => {
const current = notebookTracker.currentWidget;
if (!current) {
return;
}
const { context } = current;
window.open(`${baseUrl}retro/notebooks/${context.path}`);
},
isEnabled
});

yuvipanda added a commit to yuvipanda/retrolab that referenced this issue Jun 8, 2021
jtpio pushed a commit to yuvipanda/retrolab that referenced this issue Sep 3, 2021
@jtpio jtpio closed this as completed in #158 Sep 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants