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

The app shutdown behavior should be customizable #8063

Open
blink1073 opened this issue Mar 20, 2020 · 5 comments
Open

The app shutdown behavior should be customizable #8063

blink1073 opened this issue Mar 20, 2020 · 5 comments
Milestone

Comments

@blink1073
Copy link
Member

Description

Currently the app shutdown behavior is provided as a command in the main menu extension. That command cannot easily be overridden by deployments that want to provide a custom shutdown behavior. For example, they may want to close all open notebooks so that there are no zombie kernels are started the next time the user starts a kernel.

The solution is to pull it out into a separate plugin definition and allow it to be overridden, and document it similar to copy sharable link.

@blink1073 blink1073 added this to the 2.1 milestone Mar 20, 2020
@blink1073 blink1073 self-assigned this Mar 20, 2020
@jasongrout
Copy link
Contributor

This sounds like a great idea. We've also had commands hardcoded in the main menu that were not easy to override. Perhaps this should be the general pattern?

@blink1073
Copy link
Member Author

I agree. Our app has a workaround for now to remove the item directly from the file menu by command id. I'll save this for 3.0.

@blink1073 blink1073 modified the milestones: 2.1, 3.0 Mar 20, 2020
@jasongrout
Copy link
Contributor

Note that a more invasive hack would be going into the command registry and modifying the command to always be not visible or enabled (maybe you can also directly remove it?). That would disable the command system-wide, rather than just from the menu.

@blink1073
Copy link
Member Author

Looking at the command registry apis, it isn't possible for someone other than the command registerer to affect a registered command.

@jasongrout
Copy link
Contributor

Not unless you throw off the hood and use internal details evil grin. I thought we were talking about hacks...

@blink1073 blink1073 modified the milestones: 3.0, Future Aug 21, 2020
@blink1073 blink1073 removed their assignment Mar 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants