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

support for enabling/disabling a plugin #36

Closed
Tracked by #32
nclack opened this issue Nov 23, 2021 · 3 comments
Closed
Tracked by #32

support for enabling/disabling a plugin #36

nclack opened this issue Nov 23, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@nclack
Copy link
Collaborator

nclack commented Nov 23, 2021

napari's plugin install dialog allows plugins to be:

  • enabled/disabled
  • installed/uninstalled

I believe (un)install can be handled entirely on the napari side. When a plugin is uninstalled, I think we require napari to be restarted for the changes to take effect. That system should work for npe2 plugins as well.

However, some functionality should be added to npe2 to support enable/disable.

Some requirements:

  • it should be possible to get a list of all plugins that includes both the enabled and disabled
  • iter_compatible_* functions should omit disabled plugins
  • deactivate() should be invoked for plugins transitioning from the enabled to disabled state

I would love thoughts and input on the requirements. The description of this issue can be updated to keep them accurate.

Reference: Napari plugin install dialog

Screen Shot 2021-11-23 at 12 11 35 PM

@nclack nclack mentioned this issue Nov 23, 2021
17 tasks
@nclack nclack changed the title napari (un)install plugins window. enable/disable enable/disable support Nov 23, 2021
@nclack nclack changed the title enable/disable support support for enabling/disabling a plugin Nov 23, 2021
@tlambert03
Copy link
Collaborator

I believe (un)install can be handled entirely on the napari side. When a plugin is uninstalled, I think we require napari to be restarted for the changes to take effect.

Actually no, restart is not required (at least we try not to make it required), and that should be the case in npe2 as well.

We need a disabled list, and it needs to be restored from settings on startup (it should block addition of manifests from disabled plugins).

We then need events to alert things like menus to remove items when disabled

@tlambert03
Copy link
Collaborator

Note, the plugin manager in napari is a subclass of the one in npe1, partially so that it can be evented

@nclack
Copy link
Collaborator Author

nclack commented Mar 29, 2022

this was resolved in napari/napari#4086

@nclack nclack closed this as completed Mar 29, 2022
Repository owner moved this from Todo to Done in Plugin working group: Engineering and development Mar 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

2 participants