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

Only show "Shut Down Kernel" if kernel is running #12919

Merged

Conversation

krassowski
Copy link
Member

References

Fixes #11392

Code changes

Added .jp-mod-running as explored earlier in #11392 (comment)

User-facing changes

"Shut Down Kernel" only shows up for things with a kernel

shut-down

Backwards-incompatible changes

None

@jupyterlab-probot
Copy link

Thanks for making a pull request to jupyterlab!
To try out this branch on binder, follow this link: Binder

@krassowski krassowski added the bug label Aug 7, 2022
@krassowski krassowski added this to the 3.4.x milestone Aug 7, 2022
@krassowski
Copy link
Member Author

bot please update snapshots

@krassowski krassowski force-pushed the shut-down-kernel-only-if-kernel branch from bbb12c7 to 0878902 Compare August 8, 2022 00:09
Copy link
Member

@fcollonval fcollonval left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @krassowski

Would you mind moving up a bit the fake mouse pointer in https://github.com/krassowski/jupyterlab/blob/0878902a485a4316c791c5e8baa8d90ccaeb7bd2/galata/test/documentation/general.test.ts#L217

This will keep consistent its position with the Copy Shareable Link menu entry.

@krassowski krassowski force-pushed the shut-down-kernel-only-if-kernel branch 2 times, most recently from 1f86374 to 72f8d27 Compare August 8, 2022 21:52
@@ -38,7 +38,7 @@ export function generateArrow(
* @returns The svg to inject in the page
*/
export function positionMouse(position: { x: number; y: number }): string {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking if we should make the signature something like position: { x: number | ElementHandle, y: number | ElementHandle } to allow setting one of the coordinates manually while the other would be in the middle of BBox of the element. We can extract this to a new issue (along with changing the cursor to something nicer, and adding it to more screenshots).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice suggestion.

@krassowski krassowski force-pushed the shut-down-kernel-only-if-kernel branch from 72f8d27 to 4fdbe15 Compare August 8, 2022 22:42
@krassowski
Copy link
Member Author

Thanks @krassowski

Would you mind moving up a bit the fake mouse pointer in https://github.com/krassowski/jupyterlab/blob/0878902a485a4316c791c5e8baa8d90ccaeb7bd2/galata/test/documentation/general.test.ts#L217

This will keep consistent its position with the Copy Shareable Link menu entry.

Thanks, done!

Copy link
Member

@fcollonval fcollonval left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @krassowski

@fcollonval fcollonval merged commit adafbab into jupyterlab:master Aug 9, 2022
@fcollonval
Copy link
Member

@meeseeksdev please backport to 3.4.x

@lumberbot-app
Copy link

lumberbot-app bot commented Aug 9, 2022

Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

  1. Checkout backport branch and update it.
git checkout 3.4.x
git pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:
git cherry-pick -x -m1 adafbabcef3315bc706381d533d229115c07b5a6
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
git commit -am 'Backport PR #12919: Only show "Shut Down Kernel" if kernel is running'
  1. Push to a named branch:
git push YOURFORK 3.4.x:auto-backport-of-pr-12919-on-3.4.x
  1. Create a PR against branch 3.4.x, I would have named this PR:

"Backport PR #12919 on branch 3.4.x (Only show "Shut Down Kernel" if kernel is running)"

And apply the correct labels and milestones.

Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon!

Remember to remove the Still Needs Manual Backport label once the PR gets merged.

If these instructions are inaccurate, feel free to suggest an improvement.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 10, 2023
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.

Filebrowser Context Menu should exclude Shut Down kernel for documents that don't support a kernel
2 participants