Skip to content

Commit

Permalink
allow downstream override of plugin key
Browse files Browse the repository at this point in the history
when inheriting from upstream plugin, currently only used for Slice (called Time Selector in lcviz) and cubeviz's Spectral Extraction (will be used downstream by both lcviz and rampviz)
  • Loading branch information
kecnry committed Aug 21, 2024
1 parent 16592fa commit de97827
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion jdaviz/configs/cubeviz/plugins/slice/slice.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<j-tray-plugin
:config="config"
plugin_key="Slice"
:plugin_key="plugin_key || 'Slice'"
:api_hints_enabled.sync="api_hints_enabled"
:description="docs_description || 'Select slice of the cube to show in the image viewers. The slice can also be changed interactively in the spectrum viewer by activating the slice tool.'"
:irrelevant_msg="irrelevant_msg"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<j-tray-plugin
:config="config"
plugin_key="Spectral Extraction"
:plugin_key="plugin_key || Spectral Extraction"
:api_hints_enabled.sync="api_hints_enabled"
:description="docs_description || 'Extract a '+resulting_product_name+' from a spectral cube.'"
:link="docs_link || 'https://jdaviz.readthedocs.io/en/'+vdocs+'/'+config+'/plugins.html#spectral-extraction'"
Expand Down
1 change: 1 addition & 0 deletions jdaviz/core/template_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,7 @@ class PluginTemplateMixin(TemplateMixin):
_plugin_name = None # noqa overwritten by the registry - won't be populated by plugins instantiated directly
disabled_msg = Unicode("").tag(sync=True) # noqa if non-empty, will show this message in place of plugin content
irrelevant_msg = Unicode("").tag(sync=True) # noqa if non-empty, will exclude from the tray, and show this message in place of any content in other instances
plugin_key = Unicode("").tag(sync=True) # set to non-empty to override value in vue file (when supported by vue file)
docs_link = Unicode("").tag(sync=True) # set to non-empty to override value in vue file
docs_description = Unicode("").tag(sync=True) # set to non-empty to override value in vue file
plugin_opened = Bool(False).tag(sync=True) # noqa any instance of the plugin is open (recently sent an "alive" ping)
Expand Down

0 comments on commit de97827

Please sign in to comment.