From f615aab04299826ff39ad0d06d64912c1ecb5ca8 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 86e4914cb193..21996672ce24 100644 --- a/client/src/components/Collections/PairedListCollectionCreator.vue +++ b/client/src/components/Collections/PairedListCollectionCreator.vue @@ -91,6 +91,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); }); @@ -115,7 +119,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"); @@ -1137,6 +1145,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 21996672ce24..029b311cc111 100644 --- a/client/src/components/Collections/PairedListCollectionCreator.vue +++ b/client/src/components/Collections/PairedListCollectionCreator.vue @@ -1314,6 +1314,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 @@ -1360,7 +1362,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 fcdd334f05c2057175a3537f4931621939dd4b98 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 029b311cc111..c34f11a6a670 100644 --- a/client/src/components/Collections/PairedListCollectionCreator.vue +++ b/client/src/components/Collections/PairedListCollectionCreator.vue @@ -241,8 +241,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 c3a9bfe2a1708500f970bf6af4fb60de261a38b2 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. --- .../components/Collections/PairedListCollectionCreator.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/client/src/components/Collections/PairedListCollectionCreator.vue b/client/src/components/Collections/PairedListCollectionCreator.vue index c34f11a6a670..8fe179718645 100644 --- a/client/src/components/Collections/PairedListCollectionCreator.vue +++ b/client/src/components/Collections/PairedListCollectionCreator.vue @@ -91,6 +91,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; }); @@ -1140,6 +1144,7 @@ function _naiveStartingAndEndingLCS(s1: string, s2: string) { From 64060f2b9040a9dbb09a91845fa06dc0a0eb7ffa Mon Sep 17 00:00:00 2001 From: John Chilton Date: Wed, 4 Dec 2024 16:08:52 -0500 Subject: [PATCH 5/5] ListPairsUsability - if auto-pairing seems to work just show a clean summary. --- .../PairedListCollectionCreator.vue | 438 +++++++++--------- .../Collections/PairedListSummary.vue | 140 ++++++ .../Collections/common/CollectionCreator.vue | 5 +- 3 files changed, 358 insertions(+), 225 deletions(-) create mode 100644 client/src/components/Collections/PairedListSummary.vue diff --git a/client/src/components/Collections/PairedListCollectionCreator.vue b/client/src/components/Collections/PairedListCollectionCreator.vue index 8fe179718645..1a3efe483d8e 100644 --- a/client/src/components/Collections/PairedListCollectionCreator.vue +++ b/client/src/components/Collections/PairedListCollectionCreator.vue @@ -24,6 +24,7 @@ import type { DatasetPair } from "../History/adapters/buildCollectionModal"; import Heading from "../Common/Heading.vue"; import PairedElementView from "./PairedElementView.vue"; +import PairedListSummary from "./PairedListSummary.vue"; import UnpairedDatasetElementView from "./UnpairedDatasetElementView.vue"; import CollectionCreator from "@/components/Collections/common/CollectionCreator.vue"; @@ -74,6 +75,7 @@ const twoPassAutoPairing = ref(true); const removeExtensions = ref(true); const firstAutoPairDone = ref(false); const showPairingSection = ref(true); +const showSummary = ref(false); // Elements const workingElements = ref([]); @@ -226,8 +228,11 @@ function _elementsSetUp() { _validateElements(); _sortInitialList(); // attempt to autopair - if (props.fromSelection) { - autoPair(); + autoPair(); + if (generatedPairs.value.length > 0) { + showSummary.value = true; + } else { + showSummary.value = false; } } @@ -822,6 +827,16 @@ function _naiveStartingAndEndingLCS(s1: string, s2: string) { } return fwdLCS + revLCS; } + +function correctPairing() { + showSummary.value = false; + showPairingSection.value = true; +} + +function correctIdentifiers() { + showSummary.value = false; + showPairingSection.value = false; +} diff --git a/client/src/components/Collections/PairedListSummary.vue b/client/src/components/Collections/PairedListSummary.vue new file mode 100644 index 000000000000..eb883a082feb --- /dev/null +++ b/client/src/components/Collections/PairedListSummary.vue @@ -0,0 +1,140 @@ + + + + + diff --git a/client/src/components/Collections/common/CollectionCreator.vue b/client/src/components/Collections/common/CollectionCreator.vue index 7e2401d0bd7b..3170a6b78d10 100644 --- a/client/src/components/Collections/common/CollectionCreator.vue +++ b/client/src/components/Collections/common/CollectionCreator.vue @@ -39,12 +39,15 @@ interface Props { extensions?: string[]; extensionsToggle?: boolean; noItems?: boolean; + collectionType?: string; + showHelp?: boolean; } const props = withDefaults(defineProps(), { suggestedName: "", extensions: undefined, extensionsToggle: false, + showHelp: true, }); const emit = defineEmits<{ @@ -146,7 +149,7 @@ watch(
-
+