diff --git a/CHANGES.rst b/CHANGES.rst index 9873808c38..9ae34fee26 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 ^^^^^^^ diff --git a/jdaviz/app.py b/jdaviz/app.py index 556e0279a5..4a8837afb5 100644 --- a/jdaviz/app.py +++ b/jdaviz/app.py @@ -139,6 +139,7 @@ def to_unit(self, data, cid, values, original_units, target_units): 'j-child-layer-icon': 'components/child_layer_icon.vue', 'plugin-previews-temp-disabled': 'components/plugin_previews_temp_disabled.vue', # noqa 'plugin-table': 'components/plugin_table.vue', + 'plugin-select': 'components/plugin_select.vue', 'plugin-dataset-select': 'components/plugin_dataset_select.vue', 'plugin-subset-select': 'components/plugin_subset_select.vue', 'plugin-viewer-select': 'components/plugin_viewer_select.vue', @@ -156,6 +157,7 @@ def to_unit(self, data, cid, values, original_units, target_units): 'plugin-color-picker': 'components/plugin_color_picker.vue', 'plugin-input-header': 'components/plugin_input_header.vue', 'glue-state-sync-wrapper': 'components/glue_state_sync_wrapper.vue', + 'glue-state-select': 'components/glue_state_select.vue', 'data-menu-add': 'components/data_menu_add.vue', 'data-menu-remove': 'components/data_menu_remove.vue', 'data-menu-subset-edit': 'components/data_menu_subset_edit.vue', @@ -232,7 +234,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 ce756732ef..3a529d5123 100644 --- a/jdaviz/app.vue +++ b/jdaviz/app.vue @@ -57,7 +57,7 @@ - mdi-code-tags + @@ -125,6 +125,9 @@ {{ trayItem.label }} + + plg = {{ config }}.plugins['{{ trayItem.label }}'] + {{ trayItem.tray_item_description }} 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/glue_state_select.vue b/jdaviz/components/glue_state_select.vue new file mode 100644 index 0000000000..3cae088f0b --- /dev/null +++ b/jdaviz/components/glue_state_select.vue @@ -0,0 +1,36 @@ + + + + + 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/components/plugin_dataset_select.vue b/jdaviz/components/plugin_dataset_select.vue index df5f5ad0eb..40c8cc53ae 100644 --- a/jdaviz/components/plugin_dataset_select.vue +++ b/jdaviz/components/plugin_dataset_select.vue @@ -24,9 +24,13 @@ {{ data.item.label }} - - - {{ data.item.label }} + + + {{ api_hints_enabled ? + '\'' + data.item.label + '\'' + : + data.item.label + }} 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/components/plugin_subset_select.vue b/jdaviz/components/plugin_subset_select.vue index 472a449aff..072523e832 100644 --- a/jdaviz/components/plugin_subset_select.vue +++ b/jdaviz/components/plugin_subset_select.vue @@ -12,26 +12,33 @@ :hint="hint ? hint : 'Select subset.'" :rules="rules ? rules : []" :multiple="multiselect" - :chips="multiselect" + :chips="multiselect && !api_hints_enabled" item-text="label" item-value="label" persistent-hint > -