diff --git a/CHANGES.rst b/CHANGES.rst
index efa17e696b..3a2492eab7 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -19,7 +19,7 @@ New Features
- Add button in Plot Options to apply preset RBG options to visible layers when in Monochromatic mode. [#2558, #2568]
-- Plugin "action" buttons disable and show icon indicating that an action is in progress. [#2560]
+- Plugin "action" buttons disable and show icon indicating that an action is in progress. [#2560, #2571]
- Plugin APIs now include a ``close_in_tray()`` method. [#2562]
diff --git a/docs/dev/ui_style_guide.rst b/docs/dev/ui_style_guide.rst
index f9f627c58d..d507f70f25 100644
--- a/docs/dev/ui_style_guide.rst
+++ b/docs/dev/ui_style_guide.rst
@@ -20,8 +20,12 @@ try to adhere to the following principles:
components are necessary in a single row. Always emphasize readability at the default/minimum
width of the plugin tray, rather than using columns that result in a ton of text overflow.
* Use ```` to align content to the right (such as action buttons).
-* Action buttons should use ```` with ``color="accent"`` if applying something
- to the viewers/apps/data, and ``color="primary"`` otherwise.
+* Action buttons should use ``text``
+ to control the color depending on whether the button affects things outside the plugin itself
+ (adding/modifying data collection or subset entries, etc) or are isolated to within the plugin
+ (adding model components in model fitting, etc). These buttons can be wrapped in tooltip components
+ and also have the capability of adding spinners (by passing a traitlet to ``:spinner``) or disabling
+ (by passing a traitlet to ``:disabled``).
* To remove vertical padding from rows (i.e., two successive buttons stacked vertically), use
````.
* Use new ``Header Text`` to separate content
@@ -85,13 +89,12 @@ try to adhere to the following principles:
- {add_model(e); validate()}"
>Action Text
-
+
diff --git a/jdaviz/app.py b/jdaviz/app.py
index e06a26924d..2ec4180432 100644
--- a/jdaviz/app.py
+++ b/jdaviz/app.py
@@ -140,6 +140,7 @@ def to_unit(self, data, cid, values, original_units, target_units):
'plugin-viewer-select': 'components/plugin_viewer_select.vue',
'plugin-layer-select': 'components/plugin_layer_select.vue',
'plugin-editable-select': 'components/plugin_editable_select.vue',
+ 'plugin-action-button': 'components/plugin_action_button.vue',
'plugin-add-results': 'components/plugin_add_results.vue',
'plugin-auto-label': 'components/plugin_auto_label.vue',
'plugin-file-import-select': 'components/plugin_file_import_select.vue',
diff --git a/jdaviz/components/plugin_action_button.vue b/jdaviz/components/plugin_action_button.vue
new file mode 100644
index 0000000000..5222eee794
--- /dev/null
+++ b/jdaviz/components/plugin_action_button.vue
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
diff --git a/jdaviz/components/plugin_add_results.vue b/jdaviz/components/plugin_add_results.vue
index c8db2dd96a..bdd7c4715c 100644
--- a/jdaviz/components/plugin_add_results.vue
+++ b/jdaviz/components/plugin_add_results.vue
@@ -54,22 +54,14 @@
-
-
-
+
+
{{action_label}}{{label_overwrite ? ' (Overwrite)' : ''}}
-
+
diff --git a/jdaviz/components/plugin_table.vue b/jdaviz/components/plugin_table.vue
index d6b56169b9..5d3fe56f52 100644
--- a/jdaviz/components/plugin_table.vue
+++ b/jdaviz/components/plugin_table.vue
@@ -54,12 +54,11 @@
- Clear Table
-
+
diff --git a/jdaviz/configs/default/plugins/export_plot/export_plot.vue b/jdaviz/configs/default/plugins/export_plot/export_plot.vue
index 1b59e64b67..43af03ed85 100644
--- a/jdaviz/configs/default/plugins/export_plot/export_plot.vue
+++ b/jdaviz/configs/default/plugins/export_plot/export_plot.vue
@@ -13,24 +13,22 @@
- save_figure('png')"
:disabled="movie_recording"
>
- Export to PNG
-
+ Export to PNG
+
- save_figure('svg')"
:disabled="movie_recording"
>
- Export to SVG
-
+ Export to SVG
+
diff --git a/jdaviz/configs/default/plugins/line_lists/line_lists.vue b/jdaviz/configs/default/plugins/line_lists/line_lists.vue
index 990d95bbea..ecf8a82c65 100644
--- a/jdaviz/configs/default/plugins/line_lists/line_lists.vue
+++ b/jdaviz/configs/default/plugins/line_lists/line_lists.vue
@@ -106,7 +106,9 @@
- Load List
+ Load List
diff --git a/jdaviz/configs/default/plugins/model_fitting/model_fitting.vue b/jdaviz/configs/default/plugins/model_fitting/model_fitting.vue
index 921a627e3a..b135882af0 100644
--- a/jdaviz/configs/default/plugins/model_fitting/model_fitting.vue
+++ b/jdaviz/configs/default/plugins/model_fitting/model_fitting.vue
@@ -74,13 +74,13 @@
- Add Component
-
+ >
+ Add Component
+
diff --git a/jdaviz/configs/default/plugins/plot_options/plot_options.py b/jdaviz/configs/default/plugins/plot_options/plot_options.py
index b4d4318a49..191f5169f7 100644
--- a/jdaviz/configs/default/plugins/plot_options/plot_options.py
+++ b/jdaviz/configs/default/plugins/plot_options/plot_options.py
@@ -22,7 +22,7 @@
from jdaviz.core.registries import tray_registry
from jdaviz.core.template_mixin import (PluginTemplateMixin, ViewerSelect, LayerSelect,
PlotOptionsSyncState, Plot,
- skip_if_no_updates_since_last_active)
+ skip_if_no_updates_since_last_active, with_spinner)
from jdaviz.core.user_api import PluginUserApi
from jdaviz.core.tools import ICON_DIR
from jdaviz.core.custom_traitlets import IntHandleEmpty
@@ -326,6 +326,7 @@ class PlotOptions(PluginTemplateMixin):
show_viewer_labels = Bool(True).tag(sync=True)
swatches_palette = List().tag(sync=True)
+ apply_RGB_presets_spinner = Bool(False).tag(sync=True)
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
@@ -605,6 +606,7 @@ def vue_set_value(self, data):
value = data.get('value')
setattr(self, attr_name, value)
+ @with_spinner('apply_RGB_presets_spinner')
def apply_RGB_presets(self):
"""
Applies preset colors, opacities, and stretch settings to all visible layers
diff --git a/jdaviz/configs/default/plugins/plot_options/plot_options.vue b/jdaviz/configs/default/plugins/plot_options/plot_options.vue
index 0f9778c8df..fbe6379994 100644
--- a/jdaviz/configs/default/plugins/plot_options/plot_options.vue
+++ b/jdaviz/configs/default/plugins/plot_options/plot_options.vue
@@ -71,7 +71,13 @@
- Assign Presets
+
+ Assign Presets
+
diff --git a/jdaviz/configs/default/plugins/subset_plugin/subset_plugin.vue b/jdaviz/configs/default/plugins/subset_plugin/subset_plugin.vue
index e6b13ae1f2..a4bd2f9752 100644
--- a/jdaviz/configs/default/plugins/subset_plugin/subset_plugin.vue
+++ b/jdaviz/configs/default/plugins/subset_plugin/subset_plugin.vue
@@ -114,12 +114,28 @@
- Freeze
+
+ Freeze
+
- Simplify
+
+ Simplify
+
- Update
+
+ Update
+
diff --git a/jdaviz/configs/imviz/plugins/aper_phot_simple/aper_phot_simple.vue b/jdaviz/configs/imviz/plugins/aper_phot_simple/aper_phot_simple.vue
index 32d867a064..cf022a417c 100644
--- a/jdaviz/configs/imviz/plugins/aper_phot_simple/aper_phot_simple.vue
+++ b/jdaviz/configs/imviz/plugins/aper_phot_simple/aper_phot_simple.vue
@@ -154,7 +154,14 @@
- Calculate
+
+ Calculate
+
diff --git a/jdaviz/configs/imviz/plugins/catalogs/catalogs.vue b/jdaviz/configs/imviz/plugins/catalogs/catalogs.vue
index 092c3398ce..d5b089d91f 100644
--- a/jdaviz/configs/imviz/plugins/catalogs/catalogs.vue
+++ b/jdaviz/configs/imviz/plugins/catalogs/catalogs.vue
@@ -29,10 +29,21 @@
- Clear
+
+ Clear
+
- Search
+
+ Search
+
diff --git a/jdaviz/configs/imviz/plugins/line_profile_xy/line_profile_xy.vue b/jdaviz/configs/imviz/plugins/line_profile_xy/line_profile_xy.vue
index 9304009000..04b443abad 100644
--- a/jdaviz/configs/imviz/plugins/line_profile_xy/line_profile_xy.vue
+++ b/jdaviz/configs/imviz/plugins/line_profile_xy/line_profile_xy.vue
@@ -34,7 +34,12 @@
- Plot
+
+ Plot
+