From a6ccd60502d41ecd8ea6977c999c74648ae38683 Mon Sep 17 00:00:00 2001 From: Kyle Conroy Date: Tue, 19 Nov 2024 08:54:28 -0500 Subject: [PATCH 01/14] data-menu UI improvements --- .../configs/default/plugins/data_menu/data_menu.py | 4 ++-- .../default/plugins/data_menu/data_menu.vue | 7 ++++++- jdaviz/main_styles.vue | 14 +++++++++----- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/jdaviz/configs/default/plugins/data_menu/data_menu.py b/jdaviz/configs/default/plugins/data_menu/data_menu.py index a13a37d73c..b55fdb77a9 100644 --- a/jdaviz/configs/default/plugins/data_menu/data_menu.py +++ b/jdaviz/configs/default/plugins/data_menu/data_menu.py @@ -297,7 +297,7 @@ def _layers_changed(self, event={}): self.delete_tooltip = "Select layer(s) to delete" self.delete_enabled = False else: - self.delete_tooltip = f"Remove selected {selected_repr}..." + self.delete_tooltip = f"Remove selected {selected_repr}" self.delete_enabled = True # delete from entire app rules @@ -329,7 +329,7 @@ def _layers_changed(self, event={}): # subset edit rules if self.selected_n_subsets == 1 and self.selected_n_layers == 1: self.subset_edit_enabled = True - self.subset_edit_tooltip = f"Edit {self.layer_selected[0]}..." + self.subset_edit_tooltip = f"Edit {self.layer_selected[0]}" else: self.subset_edit_enabled = False if self.selected_n_subsets == 0: diff --git a/jdaviz/configs/default/plugins/data_menu/data_menu.vue b/jdaviz/configs/default/plugins/data_menu/data_menu.vue index 0a031f59b3..31cf389617 100644 --- a/jdaviz/configs/default/plugins/data_menu/data_menu.vue +++ b/jdaviz/configs/default/plugins/data_menu/data_menu.vue @@ -108,7 +108,7 @@ item-text="label" item-value="label" :hide-details="true" - style="padding-top: 8px !important; display: inline-block; width: 212px" + style="padding-top: 8px !important; padding-bottom: 4px !important; display: inline-block; width: 212px" > diff --git a/jdaviz/components/plugin_editable_select.vue b/jdaviz/components/plugin_editable_select.vue index 97694883be..5069c3ec16 100644 --- a/jdaviz/components/plugin_editable_select.vue +++ b/jdaviz/components/plugin_editable_select.vue @@ -16,6 +16,17 @@ item-value="label" persistent-hint > + + + diff --git a/jdaviz/configs/cubeviz/plugins/spectral_extraction/spectral_extraction.vue b/jdaviz/configs/cubeviz/plugins/spectral_extraction/spectral_extraction.vue index a9a910d9c6..ae4d7bc4b4 100644 --- a/jdaviz/configs/cubeviz/plugins/spectral_extraction/spectral_extraction.vue +++ b/jdaviz/configs/cubeviz/plugins/spectral_extraction/spectral_extraction.vue @@ -202,35 +202,30 @@
- - + See the for more details on aperture masking methods. - +
- - - + {{conflicting_aperture_error_message}} diff --git a/jdaviz/configs/default/plugins/collapse/collapse.vue b/jdaviz/configs/default/plugins/collapse/collapse.vue index 02e6fa1df0..4c471659ad 100644 --- a/jdaviz/configs/default/plugins/collapse/collapse.vue +++ b/jdaviz/configs/default/plugins/collapse/collapse.vue @@ -19,15 +19,14 @@ /> - + /> - - - + /> diff --git a/jdaviz/configs/default/plugins/export/export.vue b/jdaviz/configs/default/plugins/export/export.vue index 1a8ce2e34a..c932592eb7 100644 --- a/jdaviz/configs/default/plugins/export/export.vue +++ b/jdaviz/configs/default/plugins/export/export.vue @@ -30,17 +30,17 @@ > - - +
+ +
@@ -116,17 +116,17 @@ - + - + /> + @@ -152,19 +152,17 @@
- - +
+ +
@@ -183,17 +181,17 @@ > - - +
+ +
@@ -216,17 +214,17 @@ style="position: absolute; left: -100%" :widget="plugin_plot_selected_widget"/> - - +
+ +
@@ -320,19 +318,21 @@ diff --git a/jdaviz/configs/default/plugins/gaussian_smooth/gaussian_smooth.vue b/jdaviz/configs/default/plugins/gaussian_smooth/gaussian_smooth.vue index b4c90f3b39..c27712e088 100644 --- a/jdaviz/configs/default/plugins/gaussian_smooth/gaussian_smooth.vue +++ b/jdaviz/configs/default/plugins/gaussian_smooth/gaussian_smooth.vue @@ -8,18 +8,15 @@ :popout_button="popout_button" :scroll_to.sync="scroll_to"> - - - + Stretch - + :selected.sync="stretch_function_value" + label="Stretch Function" + api_hint="plg.stretch_function = " + :api_hints_enabled="api_hints_enabled" + /> - + :selected.sync="stretch_preset_value" + label="Stretch Percentile Preset" + api_hint="plg.stretch_preset = " + :api_hints_enabled="api_hints_enabled" + /> From 6c3f093451f4f7bf51a1a6b281dc19f508d95710 Mon Sep 17 00:00:00 2001 From: Kyle Conroy Date: Wed, 20 Nov 2024 08:26:01 -0500 Subject: [PATCH 07/14] fix icons for layer-select --- jdaviz/components/plugin_layer_select.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jdaviz/components/plugin_layer_select.vue b/jdaviz/components/plugin_layer_select.vue index 14a5ab7d39..72c5079aed 100644 --- a/jdaviz/components/plugin_layer_select.vue +++ b/jdaviz/components/plugin_layer_select.vue @@ -29,12 +29,12 @@
- + {{ item.label }} - + {{ item.label }} From bebd702e205088c0224e672378a55f3fedc48f4b Mon Sep 17 00:00:00 2001 From: Kyle Conroy Date: Wed, 20 Nov 2024 08:30:32 -0500 Subject: [PATCH 08/14] changelog --- CHANGES.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 676130399a..475804c861 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,7 +4,7 @@ New Features ------------ -* New design for viewer legend and data-menu. [#3220, #3254, #3263, #3264, #3271, #3272, #3274, #3289] +* New design for viewer legend and data-menu. [#3220, #3254, #3263, #3264, #3271, #3272, #3274, #3289, #3310] Cubeviz ^^^^^^^ From 483ed7bb8505795cfcf988fe83aabecd22789a7a Mon Sep 17 00:00:00 2001 From: Kyle Conroy Date: Fri, 22 Nov 2024 12:46:32 -0500 Subject: [PATCH 09/14] remove unnecessary v-row --- .../default/plugins/collapse/collapse.vue | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/jdaviz/configs/default/plugins/collapse/collapse.vue b/jdaviz/configs/default/plugins/collapse/collapse.vue index 4c471659ad..f8f2aa6258 100644 --- a/jdaviz/configs/default/plugins/collapse/collapse.vue +++ b/jdaviz/configs/default/plugins/collapse/collapse.vue @@ -18,16 +18,14 @@ hint="Select the data set to collapse." /> - - - + Date: Fri, 22 Nov 2024 14:43:22 -0500 Subject: [PATCH 10/14] API hint with plugin description --- jdaviz/app.vue | 3 +++ jdaviz/components/tray_plugin.vue | 6 ------ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/jdaviz/app.vue b/jdaviz/app.vue index ce756732ef..9c7152f65c 100644 --- a/jdaviz/app.vue +++ b/jdaviz/app.vue @@ -125,6 +125,9 @@ {{ trayItem.label }} + + plg = {{ config }}.plugins['{{ trayItem.label }}'] + {{ trayItem.tray_item_description }} diff --git a/jdaviz/components/tray_plugin.vue b/jdaviz/components/tray_plugin.vue index fe553e3bfe..8056e887d6 100644 --- a/jdaviz/components/tray_plugin.vue +++ b/jdaviz/components/tray_plugin.vue @@ -12,12 +12,6 @@
- - - plg = {{ config }}.plugins['{{ plugin_key }}'] - - - {{ getDisabledMsg() }} From c3201f74bc91800f2e75d0edbbe6e3454a5506e9 Mon Sep 17 00:00:00 2001 From: Kyle Conroy Date: Mon, 25 Nov 2024 09:02:52 -0500 Subject: [PATCH 11/14] custom API icons Co-authored-by: Jennifer Kotler --- jdaviz/app.py | 4 +- jdaviz/app.vue | 2 +- jdaviz/components/data_menu_add.vue | 3 +- jdaviz/components/hover_api_hint.vue | 32 ++--- .../default/plugins/data_menu/data_menu.vue | 2 + jdaviz/data/icons/api.svg | 105 ++++++++++++++ jdaviz/data/icons/api_lock.svg | 136 ++++++++++++++++++ 7 files changed, 262 insertions(+), 22 deletions(-) create mode 100644 jdaviz/data/icons/api.svg create mode 100644 jdaviz/data/icons/api_lock.svg diff --git a/jdaviz/app.py b/jdaviz/app.py index 526a8e6a1f..7fd931a7f4 100644 --- a/jdaviz/app.py +++ b/jdaviz/app.py @@ -232,7 +232,9 @@ class ApplicationState(State): 'radialtocheck': read_icon(os.path.join(ICON_DIR, 'radialtocheck.svg'), 'svg+xml'), 'checktoradial': read_icon(os.path.join(ICON_DIR, 'checktoradial.svg'), 'svg+xml'), 'nuer': read_icon(os.path.join(ICON_DIR, 'right-east.svg'), 'svg+xml'), - 'nuel': read_icon(os.path.join(ICON_DIR, 'left-east.svg'), 'svg+xml') + 'nuel': read_icon(os.path.join(ICON_DIR, 'left-east.svg'), 'svg+xml'), + 'api': read_icon(os.path.join(ICON_DIR, 'api.svg'), 'svg+xml'), + 'api-lock': read_icon(os.path.join(ICON_DIR, 'api_lock.svg'), 'svg+xml'), }, docstring="Custom application icons") viewer_icons = DictCallbackProperty({}, docstring="Indexed icons (numbers) for viewers across the app") # noqa diff --git a/jdaviz/app.vue b/jdaviz/app.vue index 9c7152f65c..3a529d5123 100644 --- a/jdaviz/app.vue +++ b/jdaviz/app.vue @@ -57,7 +57,7 @@ - mdi-code-tags + diff --git a/jdaviz/components/data_menu_add.vue b/jdaviz/components/data_menu_add.vue index 2d41844281..21612b869e 100644 --- a/jdaviz/components/data_menu_add.vue +++ b/jdaviz/components/data_menu_add.vue @@ -66,6 +66,7 @@ v-if="api_hints_enabled" :hover_api_hint.sync="hover_api_hint" :lock_hover_api_hint.sync="lock_hover_api_hint" + :icons="icons" /> @@ -80,6 +81,6 @@ module.exports = { lock_hover_api_hint: false, } }, - props: ['dataset_items', 'subset_tools', 'loaded_n_data', 'api_hints_enabled'], + props: ['dataset_items', 'subset_tools', 'loaded_n_data', 'api_hints_enabled', 'icons'], }; \ No newline at end of file diff --git a/jdaviz/components/hover_api_hint.vue b/jdaviz/components/hover_api_hint.vue index 59fba111d8..5bf9e8a0a0 100644 --- a/jdaviz/components/hover_api_hint.vue +++ b/jdaviz/components/hover_api_hint.vue @@ -6,28 +6,22 @@ {{ hover_api_hint }} - + - - - - mdi-code-tags - - - + + @@ -35,6 +29,6 @@ \ No newline at end of file diff --git a/jdaviz/configs/default/plugins/data_menu/data_menu.vue b/jdaviz/configs/default/plugins/data_menu/data_menu.vue index 686e1164d5..762efce4b5 100644 --- a/jdaviz/configs/default/plugins/data_menu/data_menu.vue +++ b/jdaviz/configs/default/plugins/data_menu/data_menu.vue @@ -141,6 +141,7 @@ :subset_tools="subset_tools" :loaded_n_data="loaded_n_data" :api_hints_enabled="api_hints_enabled" + :icons="icons" @add-data="(data_label) => {add_data_to_viewer({data_label: data_label})}" @create-subset="(subset_type) => {create_subset({subset_type: subset_type}); data_menu_open = false}" > @@ -208,6 +209,7 @@ v-if="api_hints_enabled" :hover_api_hint.sync="hover_api_hint" :lock_hover_api_hint.sync="lock_hover_api_hint" + :icons="icons" /> diff --git a/jdaviz/data/icons/api.svg b/jdaviz/data/icons/api.svg new file mode 100644 index 0000000000..4955459540 --- /dev/null +++ b/jdaviz/data/icons/api.svg @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + <API> + <API> + API + <api> + api + + + + + + + + + api + api + api + + + api + + + + + + api + API + + + + + + api + api + API + + + api + + + + + \ No newline at end of file diff --git a/jdaviz/data/icons/api_lock.svg b/jdaviz/data/icons/api_lock.svg new file mode 100644 index 0000000000..da8fba4533 --- /dev/null +++ b/jdaviz/data/icons/api_lock.svg @@ -0,0 +1,136 @@ + + + + + + + + + + + + + + + <API> + <API> + API + <api> + api + + + + + + + + + api + api + api + + + api + + + + + + api + API + api + api + API + + + + + + + + + api + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From 1e98773a93a91ab032d0b197974eda4c340c776a Mon Sep 17 00:00:00 2001 From: Kyle Conroy Date: Mon, 25 Nov 2024 13:12:46 -0500 Subject: [PATCH 12/14] improve dark-theme support --- jdaviz/configs/default/plugins/data_menu/data_menu.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jdaviz/configs/default/plugins/data_menu/data_menu.vue b/jdaviz/configs/default/plugins/data_menu/data_menu.vue index 762efce4b5..a19a278f78 100644 --- a/jdaviz/configs/default/plugins/data_menu/data_menu.vue +++ b/jdaviz/configs/default/plugins/data_menu/data_menu.vue @@ -94,8 +94,8 @@ style="cursor: pointer; display: inline-block; height: 100%; vertical-align: bottom;" @click="() => {open_orientation_plugin()}" > - mdi-compass-outline - linked by pixel + mdi-compass-outline + linked by pixel Date: Tue, 26 Nov 2024 08:59:46 -0500 Subject: [PATCH 13/14] Apply suggestions from code review Co-authored-by: Brett M. Morris --- jdaviz/components/glue_state_select.vue | 3 +-- jdaviz/components/plugin_select.vue | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/jdaviz/components/glue_state_select.vue b/jdaviz/components/glue_state_select.vue index 757913ef8f..3cae088f0b 100644 --- a/jdaviz/components/glue_state_select.vue +++ b/jdaviz/components/glue_state_select.vue @@ -23,8 +23,7 @@ diff --git a/jdaviz/components/plugin_select.vue b/jdaviz/components/plugin_select.vue index e8ca2d86f4..5e75c07721 100644 --- a/jdaviz/components/plugin_select.vue +++ b/jdaviz/components/plugin_select.vue @@ -69,8 +69,7 @@ From b9e3a22c7b1bf0b7387515399854347d86519e97 Mon Sep 17 00:00:00 2001 From: Kyle Conroy Date: Mon, 2 Dec 2024 08:26:23 -0500 Subject: [PATCH 14/14] orientation label over "linked by pixel" to mimic label over dropdown --- jdaviz/configs/default/plugins/data_menu/data_menu.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jdaviz/configs/default/plugins/data_menu/data_menu.vue b/jdaviz/configs/default/plugins/data_menu/data_menu.vue index a19a278f78..83e386a6c2 100644 --- a/jdaviz/configs/default/plugins/data_menu/data_menu.vue +++ b/jdaviz/configs/default/plugins/data_menu/data_menu.vue @@ -95,7 +95,8 @@ @click="() => {open_orientation_plugin()}" > mdi-compass-outline - linked by pixel + + linked by pixel