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

Replace "Interface" dropdown with button if only one option is present #6792

Closed
JasonWeill opened this issue Mar 23, 2023 · 4 comments · Fixed by #6866
Closed

Replace "Interface" dropdown with button if only one option is present #6792

JasonWeill opened this issue Mar 23, 2023 · 4 comments · Fixed by #6866
Labels
Milestone

Comments

@JasonWeill
Copy link
Collaborator

JasonWeill commented Mar 23, 2023

The "Interface" dropdown in JupyterLab is a large dropdown in the toolbar with only one option, "Open With Jupyter Notebook":

image

… and in Jupyter Notebook, it's a dropdown with one option, "Open With JupyterLab":

image

If only one option is present, replace this dropdown with a single button with an icon for the other interface, also on the toolbar, to save space.

In addition, add a command to the right-click context menu on the notebook body to "Open With" the other interface.

This was found during a Bug Bash by @ellisonbg .

@JasonWeill JasonWeill added the bug label Mar 23, 2023
@jupyterlab-probot jupyterlab-probot bot added the status:Needs Triage Applied to issues that need triage label Mar 23, 2023
@jtpio
Copy link
Member

jtpio commented Mar 23, 2023

For reference there used be buttons in the toolbar before (in RetroLab): jupyterlab/retrolab#256

Which was then switched to a menu to avoid confusion: jupyterlab/retrolab#309

There is also #6746

@JasonWeill
Copy link
Collaborator Author

JasonWeill commented Mar 23, 2023

Thanks @jtpio! From jupyterlab/retrolab#309, here's the "before" picture showing RetroLab with buttons for "open in JupyterLab" (Jupyter logo with 3 moons) and "open in classic notebook" (Jupyter logo with no moons).

notebook-chromium-linux

@RRosio RRosio removed the status:Needs Triage Applied to issues that need triage label Mar 28, 2023
@RRosio RRosio added this to the 7.0 milestone Mar 28, 2023
@JasonWeill JasonWeill changed the title Replace "Interface" dropdown with button Replace "Interface" dropdown with button if only one option is present Mar 30, 2023
@JasonWeill
Copy link
Collaborator Author

After discussion with @ellisonbg , this requested change is revised to:

  1. If the interface menu has only one option, display a button using a UI as demonstrated in Changes interface menu to button #6793.
  2. If the interface menu has more than one option, display a menu with multiple choices.

@jtpio
Copy link
Member

jtpio commented Apr 3, 2023

this requested change is revised to:

Will that change actually be needed if #6746 is implemented?

If notebook depends on both nbclassic and jupyterlab, there will always be at least two entries.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.