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

Kernel-related shortcuts (e.g. restart, interrupt) do not work anymore #15599

Closed
krassowski opened this issue Jan 3, 2024 · 4 comments · Fixed by #15639
Closed

Kernel-related shortcuts (e.g. restart, interrupt) do not work anymore #15599

krassowski opened this issue Jan 3, 2024 · 4 comments · Fixed by #15639
Assignees
Labels
bug tag:Regression Behavior that had been broken, was fixed, and is broken again tag:Release Blocker A must-have bug for the milestone to which it is tagged
Milestone

Comments

@krassowski
Copy link
Member

Description

Shortcuts such as I I (interrupt) or 0 0 do not work in 4.1.0b0. Manually selecting the command from menu or command palette works. My custom shortcut (ctrl + R) for "restart and run up to selected cell" does not work anymore either.

This is likely an issue with the selector ([data-jp-kernel-user]:focus) due to changes introduced in #14115 (CC @gabalafou @brichet).

Reproduce

shortcuts-brokendoes-not-work

Expected behavior

  • Default shortcuts for kernel actions work
    • possibly adding a space before :focus would be sufficient to fix this
  • Shortcuts configured by users are ported over automatically or there should be a user-facing entry in the changelog documenting how/which shortcuts will need to be reconfigured (e.g. by updating selectors)

Context

  • JupyterLab version: 4.1.0b0
@krassowski krassowski added bug status:Needs Triage Applied to new issues that need triage tag:Release Blocker A must-have bug for the milestone to which it is tagged labels Jan 3, 2024
@krassowski
Copy link
Member Author

krassowski commented Jan 3, 2024

Also, it is worth checking if there are any other selectors with :focus touching the notebook node selected by data attributes. This will potentially affect extensions too; for known selectors we could indeed swap them in settings transparently but for shortcuts added in extensions it would be harder; so two other things we should do:

  • check the extensions in jupyterlab and jupyterlab-contrib for :focus containing selectors in schema
  • ensure there is an entry in extension migration guide explaining the changes which extension authors may be needed to make

@JasonWeill JasonWeill added tag:Regression Behavior that had been broken, was fixed, and is broken again and removed status:Needs Triage Applied to new issues that need triage labels Jan 3, 2024
@krassowski krassowski added this to the 4.1.0 milestone Jan 8, 2024
@brichet
Copy link
Contributor

brichet commented Jan 8, 2024

  • possibly adding a space before :focus would be sufficient to fix this

This would make some characters unusable in the cell input (like "i" in this case).
The selector "[data-jp-kernel-user] :focus:not(:read-write)" should avoid it.

@brichet
Copy link
Contributor

brichet commented Jan 8, 2024

  • check the extensions in jupyterlab

Searching for :focus selector in jupyterlab, I found that https://github.com/jupyterlab/jupyterlab/blob/main/examples/notebook/src/commands.ts has not been updated with the correct selectors.

For example:

{
selector: '.jp-Notebook.jp-mod-commandMode:focus',
keys: ['ArrowDown'],
command: COMMAND_IDS.selectBelow
},

Except for this file and the one you mentioned, I did not find any other :focus selector touching the notebook node in the schema of jupyterlab core extensions (searching for :focus in all non-CSS files).

@krassowski krassowski self-assigned this Jan 10, 2024
@krassowski
Copy link
Member Author

In jupyterlab-contrib there is:

Looking broader beyond repos maintained by Jupyter community, I see a few extensions, many personal configuration files and a few downstreams using old selectors e.g. https://github.com/datalayer/jupyter-ui CC @echarles

So I think there is a case for some automatic substitution of the old for new to make the transition smooth.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug tag:Regression Behavior that had been broken, was fixed, and is broken again tag:Release Blocker A must-have bug for the milestone to which it is tagged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants