From f80c777717017d05f849f74d8ef860b55972b8c2 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Wed, 4 Dec 2024 10:27:09 -0500 Subject: [PATCH 1/5] ListPairs Usability - don't auto-pair on empty filters. Disable the button and make it clear in the message it has to do with empty filters. --- .../Collections/PairedListCollectionCreator.vue | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/client/src/components/Collections/PairedListCollectionCreator.vue b/client/src/components/Collections/PairedListCollectionCreator.vue index ba46d2139934..2f214b759e4a 100644 --- a/client/src/components/Collections/PairedListCollectionCreator.vue +++ b/client/src/components/Collections/PairedListCollectionCreator.vue @@ -93,6 +93,10 @@ const hasFilter = computed(() => forwardFilter.value || reverseFilter.value); const strategy = ref(autoPairLCS); const duplicatePairNames = ref([]); +const canAutoPair = computed(() => { + return forwardFilter.value && reverseFilter.value; +}); + const forwardElements = computed(() => { return filterElements(workingElements.value, forwardFilter.value); }); @@ -117,7 +121,11 @@ const autoPairButton = computed(() => { let variant; let icon; let text; - if (!firstAutoPairDone.value && pairableElements.value.length > 0) { + if (!canAutoPair.value) { + variant = "secondary"; + icon = faLink; + text = localize("Specify simple filters to divide datasets into forward and reverse reads for pairing."); + } else if (!firstAutoPairDone.value && pairableElements.value.length > 0) { variant = "primary"; icon = faExclamationCircle; text = localize("Click to auto-pair datasets based on the current filters"); @@ -1141,6 +1149,7 @@ function _naiveStartingAndEndingLCS(s1: string, s2: string) { Date: Wed, 4 Dec 2024 10:42:39 -0500 Subject: [PATCH 2/5] ListPairs Usability - use new Galaxy green for component. How is a shade of green so evocative of a time. --- .../components/Collections/PairedListCollectionCreator.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/src/components/Collections/PairedListCollectionCreator.vue b/client/src/components/Collections/PairedListCollectionCreator.vue index 2f214b759e4a..e6cd629ea75a 100644 --- a/client/src/components/Collections/PairedListCollectionCreator.vue +++ b/client/src/components/Collections/PairedListCollectionCreator.vue @@ -1318,6 +1318,8 @@ $fa-font-path: "../../../node_modules/@fortawesome/fontawesome-free/webfonts/"; @import "~@fortawesome/fontawesome-free/scss/solid"; @import "~@fortawesome/fontawesome-free/scss/fontawesome"; @import "~@fortawesome/fontawesome-free/scss/brands"; +@import "~bootstrap/scss/_functions.scss"; +@import "theme/blue.scss"; .paired-column { text-align: center; // mess with these two to make center more/scss priority @@ -1364,7 +1366,7 @@ li.dataset.paired { white-space: nowrap; overflow: hidden; border: 2px solid grey; - background: #aff1af; + background: $state-success-bg; text-align: center; span { display: inline-block; From 3e6b12b0dafc137bfc8e72112928f8ce166acb7c Mon Sep 17 00:00:00 2001 From: John Chilton Date: Wed, 4 Dec 2024 10:53:58 -0500 Subject: [PATCH 3/5] ListPairs Usability - don't attempt failed auto-pair initially. It results in hiding all the data and a scary red messages when the user did literally nothing wrong. I think this is single biggest issue - it makes it seem like you cannot just manually pair these quickly. --- .../components/Collections/PairedListCollectionCreator.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/client/src/components/Collections/PairedListCollectionCreator.vue b/client/src/components/Collections/PairedListCollectionCreator.vue index e6cd629ea75a..1287d64b7f01 100644 --- a/client/src/components/Collections/PairedListCollectionCreator.vue +++ b/client/src/components/Collections/PairedListCollectionCreator.vue @@ -243,8 +243,11 @@ function initialFiltersSet() { illumina++; } }); - - if (illumina > dot12s && illumina > Rs) { + // if we cannot filter don't set an initial filter and hide all the data + if (illumina == 0 && dot12s == 0 && Rs == 0) { + forwardFilter.value = ""; + reverseFilter.value = ""; + } else if (illumina > dot12s && illumina > Rs) { changeFilters("illumina"); } else if (dot12s > illumina && dot12s > Rs) { changeFilters("dot12s"); From 0cc2bab49bb0ad745d11af3885f18b4a7178b760 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Wed, 4 Dec 2024 11:05:55 -0500 Subject: [PATCH 4/5] ListPairs Usability - disable the clear filter button if nothing to clear. --- .../Collections/PairedListCollectionCreator.vue | 5 +++++ lib/galaxy/selenium/navigates_galaxy.py | 12 +++++++++--- lib/galaxy_test/selenium/test_collection_builders.py | 3 +-- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/client/src/components/Collections/PairedListCollectionCreator.vue b/client/src/components/Collections/PairedListCollectionCreator.vue index 1287d64b7f01..d9150541ca90 100644 --- a/client/src/components/Collections/PairedListCollectionCreator.vue +++ b/client/src/components/Collections/PairedListCollectionCreator.vue @@ -93,6 +93,10 @@ const hasFilter = computed(() => forwardFilter.value || reverseFilter.value); const strategy = ref(autoPairLCS); const duplicatePairNames = ref([]); +const canClearFilters = computed(() => { + return forwardFilter.value || reverseFilter.value; +}); + const canAutoPair = computed(() => { return forwardFilter.value && reverseFilter.value; }); @@ -1144,6 +1148,7 @@ function _naiveStartingAndEndingLCS(s1: string, s2: string) { diff --git a/lib/galaxy/selenium/navigates_galaxy.py b/lib/galaxy/selenium/navigates_galaxy.py index 141d6e1c28ec..bccafc32e933 100644 --- a/lib/galaxy/selenium/navigates_galaxy.py +++ b/lib/galaxy/selenium/navigates_galaxy.py @@ -914,8 +914,7 @@ def upload_paired_list(self, test_paths, name="test", ext=None, genome=None, hid if not hide_source_items: self.collection_builder_hide_originals() - self.collection_builder_clear_filters() - # TODO: generalize and loop these clicks so we don't need the assert + self.ensure_collection_builder_filters_cleared() assert len(test_paths) == 2 self.collection_builder_click_paired_item("forward", 0) self.collection_builder_click_paired_item("reverse", 1) @@ -2053,8 +2052,15 @@ def collection_builder_hide_originals(self): def collection_builder_create(self): self.wait_for_and_click_selector("button.create-collection") + def ensure_collection_builder_filters_cleared(self): + clear_filters = self.components.collection_builders.clear_filters + element = clear_filters.wait_for_present() + if "disabled" not in element.get_attribute("class").split(" "): + self.collection_builder_clear_filters() + def collection_builder_clear_filters(self): - self.wait_for_and_click_selector("button.clear-filters-link") + clear_filters = self.components.collection_builders.clear_filters + clear_filters.wait_for_and_click() def collection_builder_click_paired_item(self, forward_or_reverse, item): assert forward_or_reverse in ["forward", "reverse"] diff --git a/lib/galaxy_test/selenium/test_collection_builders.py b/lib/galaxy_test/selenium/test_collection_builders.py index 24b47a825cf3..2c57e632e8b5 100644 --- a/lib/galaxy_test/selenium/test_collection_builders.py +++ b/lib/galaxy_test/selenium/test_collection_builders.py @@ -39,7 +39,6 @@ def test_build_paired_list_simple(self): self.perform_upload(self.get_filename("2.tabular")) self._wait_for_and_select([1, 2]) self._collection_dropdown("build list of pairs") - self.collection_builder_clear_filters() self.collection_builder_click_paired_item("forward", 0) self.collection_builder_click_paired_item("reverse", 1) self.collection_builder_set_name("my awesome paired list") @@ -61,7 +60,7 @@ def test_build_paired_list_show_original(self): self._wait_for_and_select([1, 2]) self._collection_dropdown("build list of pairs") collection_builders = self.components.collection_builders - collection_builders.clear_filters.wait_for_and_click() + self.ensure_collection_builder_filters_cleared() forward_column = collection_builders.forward_datasets.wait_for_visible() first_datset_forward = forward_column.find_elements(self.by.CSS_SELECTOR, "li")[0] first_datset_forward.click() From 3b47ca58686180359ff62620a89fe682cfa1df79 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Sun, 8 Dec 2024 17:41:15 -0500 Subject: [PATCH 5/5] Update client/src/components/Collections/PairedListCollectionCreator.vue Co-authored-by: Ahmed Hamid Awan --- .../src/components/Collections/PairedListCollectionCreator.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/components/Collections/PairedListCollectionCreator.vue b/client/src/components/Collections/PairedListCollectionCreator.vue index d9150541ca90..8ae36377742a 100644 --- a/client/src/components/Collections/PairedListCollectionCreator.vue +++ b/client/src/components/Collections/PairedListCollectionCreator.vue @@ -98,7 +98,7 @@ const canClearFilters = computed(() => { }); const canAutoPair = computed(() => { - return forwardFilter.value && reverseFilter.value; + return forwardFilter.value && reverseFilter.value && pairableElements.value.length > 0; }); const forwardElements = computed(() => {