-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Changes interface menu to button #6793
Conversation
bot please update playwright snapshots |
Thanks @JasonWeill for looking into this. Wondering how that will work if at some point later we would like to allow for opening NBClassic as well? #6746 Would that mean adding a new icon to the toolbar? Potentially this could add some confusion as originally mentioned in jupyterlab/retrolab#256? cc @yuvipanda who might have an opinion on this (when multiple Jupyter frontends are being deployed together) |
The menu was a huge hit with our users, and one of the primary reasons we were able to move the data8 class with 1500+ students away from classic notebook - that they could easily switch back any time if needed. I would <3 if we could keep it that way - nobody (including me!) could make out what the button does or did, and it just looks like a logo. |
@yuvipanda The "interface" menu takes up a lot of horizontal space in the toolbar, considering that it only has one option in it. Even if we had two buttons, they would still take up less horizontal space than the interface menu/dropdown does today. I agree that the buttons in this PR look more like logos than actions. I can ask our UX designers if they can come up with icons that better convey "open this using a different application in a new tab". |
That would be a good thing to do indeed. Some ideas each with distinct pros/cons:
|
@krassowski How about replacing the single icon with a graphic showing both interfaces, with a toggle between them? Clicking on the graphic would open the other interface in a new tab. Here's a non-functional mockup: |
ead6e85
to
801fbfd
Compare
Looks fine; two thoughts:
|
While I understand this text-based toolbar takes a lot of space, I am kinda nervous about the upcoming notebook 7 change. Based on our experience getting both students and instructors to switch successfully to retrolab, knowing that they can easily switch back to classic - even if they never did - was extremely important. May I ask the super obvious text based switcher is left in place at least for one full release, as a trade-off of toolbar space? I think 'switch UI to open same document in a different way' is not particularly easy to recognize in icon form, as that's not a super common UI pattern that exists elsewhere. There isn't enough recognition of the icon differences between Jupyter (the project), the classic notebook, lab, etc for this to work in icon form currently. Please? |
Thanks @yuvipanda 👍 I agree the existing dropdown is more explicit and easier to understand which was the original motivation for jupyterlab/retrolab#309. Also the combination of notebook icon + switch + jupyter icon as proposed in #6793 (comment) almost becomes as large as the "Interface" text of the dropdown. Not sure we save a lot of space there. Otherwise if the issue is the space taken in the toolbar we could also try to find a shorter label than "Interface". Or make it configurable via the settings. |
As mentioned above, we should likely consider the case of also showing an entry for opening NBClassic (the classic notebook interface): #6746. In the case where JupyterLab 4, Notebook 7 and NBClassic 1 are all installed together on the same Jupyter Server. For reference there is a gist to try this on Binder: https://gist.github.com/jtpio/35a72862c8be13dee31b61ebac2d9786 Which means a single button in the notebook toolbar will not be enough to open either lab or nbclassic. The existing dropdown still looks like the most natural and less confusing approach I think. |
I appreciate you working a lot with us to try different approaches, @JasonWeill! I concur with @jtpio - the primary use case is being able to switch between three interfaces, not two. I understand that it may be 2 in the future, but I think for broader acceptance of notebook 7, being able to switch back and forth between the three interfaces is very vital. Even if people don't actually use it, there's a lot of resistance to switching that is easily dissolved by 'you can switch back any time you want easily, without having to edit URLs'. |
I had not realized that the dropdown was lost when retrolab became notebook v7. I would love for it to be back. As a JupyterHub admin who is going to have to handle this migration, it would make my life a million times easier. |
It's still here, but only showing JupyterLab for now because there is no dependency on the classic notebook anymore. Before it was installed by default because of the So as part of #6746:
Maybe option 1.would be enough to start with, and there is still time to consider 2. |
I would highly recommend option 2, with a notice period when the automatic dependency would be removed (8.x?). I think this migration is gonna be hard, and the small things we can do to make it easier will have a big payoff. |
Should this be closed now that #6847 has been merged? |
This reverts commit eca0a4e.
This reverts commit eca0a4e.
This reverts commit eca0a4e.
This reverts commit eca0a4e.
This reverts commit eca0a4e.
This reverts commit eca0a4e.
…Open in..." dropdown menu if there are multiple options, show single button otherwise (#6866) * add option to open in nbclassic if installed * account that getOption() can return truthy 'false' * immidiately convert nbclassicInstalled to boolean * Capitalize NbClassic as in PyPI per @JasonWeill * capitalize commandDescription * Update packages/lab-extension/src/index.ts Co-authored-by: Jason Weill <93281816+JasonWeill@users.noreply.github.com> * Update packages/lab-extension/src/index.ts Co-authored-by: Jason Weill <93281816+JasonWeill@users.noreply.github.com> * Update packages/lab-extension/src/index.ts Co-authored-by: Jason Weill <93281816+JasonWeill@users.noreply.github.com> * Update packages/lab-extension/src/index.ts Co-authored-by: Jason Weill <93281816+JasonWeill@users.noreply.github.com> * Update packages/lab-extension/src/index.ts Co-authored-by: Jason Weill <93281816+JasonWeill@users.noreply.github.com> * Update packages/lab-extension/src/index.ts Co-authored-by: Jason Weill <93281816+JasonWeill@users.noreply.github.com> * add openInNewIcon based on ##6793 by @JasonWeill * show single 'open' button if only one option is available * add button styling * add css class to toolbarButton * rename addCommand to addSwitcherCommand * set page_config["nbclassic_installed"] * Update snapshots * fix general.spec.ts lint problem as detected in CI run https://github.com/jupyter/notebook/actions/runs/5008582825/jobs/8976612053?pr=6866 * Use optional chaining instead of non-null assertion to fix lint error https://github.com/jupyter/notebook/actions/runs/5008628805/jobs/8976713072?pr=6866 * add new line to try to fix eslint error * fix prettier CI errors * Revert "fix general.spec.ts lint problem as detected in CI run https://github.com/jupyter/notebook/actions/runs/5008582825/jobs/8976612053?pr=6866" This reverts commit 9f0b544. * Revert "add openInNewIcon based on ##6793 by @JasonWeill" This reverts commit eca0a4e. * use launchIcon instead of openInNewIcon * fix nbclassic urlprefix * update general snapshots to account for use of launchIcon * update mobile snapshots to account for launchIcon * check if extension is enabled, not installed * add bundled server extension * Revert "add bundled server extension" This reverts commit 7d261db. * set page_config in initalize_handlers --------- Co-authored-by: Jason Weill <93281816+JasonWeill@users.noreply.github.com>
Closing as fixed by #6866, thanks! |
Fixes #6792, per coordination with @ellisonbg .
Changes the "Interface" dropdown menu back to a button, as it had been before jupyterlab/retrolab#309.
Demo video of switching back and forth:
Screen.Recording.2023-03-23.at.5.49.41.PM.mov
Missing:
kernelName
item (in practice, this item is not present yet when I do the check, so I always add the item at the end of the toolbar)