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

Renames Interface menu to "Open in", shortens menu options #6809

Closed
wants to merge 2 commits into from

Conversation

JasonWeill
Copy link
Collaborator

Fix for #6806.

Renames the "Interface" menu to "Open in" and renames the commands to just the name of the desired interface.

In Notebook view:

image

In Lab view:

image

Note that the commands have particularly short names because Lumino doesn't yet allow custom menu item labels; see jupyterlab/lumino#570 .

@github-actions
Copy link
Contributor

Binder 👈 Launch a Binder on branch JasonWeill/notebook/interface-menu-to-open-in

@JasonWeill JasonWeill marked this pull request as ready for review March 31, 2023 17:08
@JasonWeill
Copy link
Collaborator Author

bot please update playwright snapshots

@jtpio
Copy link
Member

jtpio commented Apr 1, 2023

Thanks @JasonWeill for looking into this.

Would it be possible to keep the longer form when the command is displayed in the command palette? With this change on Binder it doesn't seem possible to open with another interface via the command palette anymore:

image

But it shows entry with JupyterLab only:

image

@krassowski
Copy link
Member

Just as a hopefully helpful note: this can be implemented by using functional label testing for args['isPalette'] instead of hard-coded label. For example, see the terminal terminal:create-new command.

@JasonWeill
Copy link
Collaborator Author

Just as a hopefully helpful note: this can be implemented by using functional label testing for args['isPalette'] instead of hard-coded label. For example, see the terminal terminal:create-new command.

@krassowski I just pushed a change that adds a separate "short label" for use in the menu, making the longer "label" used in the command palette instead. When I built my changes locally, though, I still see the short label in both places. Can you please take a look?

@andrii-i
Copy link
Contributor

andrii-i commented Apr 19, 2023

@krassowski Attempting to implement approach described by you in notebook PR #6847, in this commit but I'm missing a lot of details and could really use a consultation if/when you would have some time. Do I need to have a separate addCommands function for this to work?

Edit: alternative approach where I register 2 commands with different labels but same functionality and assign one to the menu and one to the command palette seems to work (see #6847 Changed Files)

@jtpio
Copy link
Member

jtpio commented May 5, 2023

Closing as fixed by #6847, thanks!

@jtpio jtpio closed this May 5, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants