-
Notifications
You must be signed in to change notification settings - Fork 77
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
Add a PluginConfig plugin (UI to manage other plugins) #1085
Conversation
ba42250
to
0e44408
Compare
Rebased |
0e44408
to
eb63d2a
Compare
Rebased |
@pllim, can you try this PR version with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PluginConfig loaded fine in stginga. But when I Edit on Zoom and set it to autoload. Then I hit Save and quit Ginga. Next time I start Ginga back up (via stginga), Zoom does not autoload. Is that expected behavior?
(I am on Windows 11.)
I do see this in my ~/.ginga/plugins.yml
(at the end):
- category: Utils
enabled: true
hidden: false
module: Zoom
name: Zoom
ptype: global
start: true
workspace: left
@pllim, this worked for me in |
Maybe try on your Linux box at work and see if there is any difference? |
On Linux box, I seem to have the opposite problem. I turn off auto-start but it auto-starts anyway. This is what is in my - category: Utils
enabled: true
hidden: false
module: Zoom
name: Zoom
ptype: global
start: false
workspace: left But if I disable it altogether, then it does not auto-start but then it is also not loaded, so I cannot use it at all in that case. |
Oooh.. dark mode is kinda cool! 😺 Can't claim any credit for any kind of "dark mode". Have no idea why that would happen (ginga doesn't do "themes" or "skins"), sounds like something is a bit wonky with the installation. |
This adds a global plugin called "PluginConfig" which can be used to easily manage which plugins are enabled/disabled for the Ginga reference viewer. Additionally, it allows the user to configure how the plugins appear under the menus. Documentation has been added to the manual.
e0b955b
to
44e8667
Compare
Rebased. |
Do you have Zoom listed in your |
or |
And do you have a |
No. There is no
There is also no
Yes. |
Doh... I just noticed this in my def post_gui_config(ginga):
# Auto start global plugins
ginga.start_global_plugin('Zoom')
ginga.start_global_plugin('Header') So, this makes me wonder how well this new |
Anything done in |
I can add something to the docstring help to indicate customization that is not handled, or overrides, the plugin. |
Is it too much to ask for the PluginConfig to check if something is being overwritten and if so, update the listing accordingly to indicate as such in the plugin GUI? |
It would be very difficult in the case of a python file that can do anything. In your particular case shown, the |
I realize that is a change, but this is a major release, and I think it is way cleaner and hopefully more understandable and simpler to use than having to customize a python file. |
In that case, should |
That is how global plugins are started. I think the best thing is to deprecate the idea that one should use Is this a file that is written by STScI tools? In that case |
Indeed, it is. See https://github.com/spacetelescope/stginga/blob/master/stginga/examples/configs/ginga_config.py |
I think based on our conversations and findings thus far, my conclusion is that while this plugin seems handy for new users of vanilla Ginga, it is less so for downstream packages that might ship their own custom Ginga configurations (on the contrary, it might be confusing). So as long as this does not break any existing config override (like you pointed out), I don't see why it should not be merged. Clearer documentation on such limitations would be very nice indeed. Thanks! |
Ok, picture becoming clearer. There are several ways to address this. Check out this solution. |
- update documentation on reference viewer customization
Thanks for your patience and testing, @pllim. |
This adds a global plugin called "PluginConfig" which can be used to easily manage which plugins are enabled/disabled for the Ginga reference viewer. Additionally, it allows the user to configure how the plugins appear under the menus, and some other attributes. It shows up under the "Debug" operations submenu.
Documentation has been added to the manual.