From 5dbf3b0c8d5e63acd66d0b58c902e9314f2f77a9 Mon Sep 17 00:00:00 2001 From: Ahmed Awan Date: Tue, 3 Dec 2024 14:22:11 -0600 Subject: [PATCH] add a message and link to upload tab if no initial elements This meant also adjusting the creator(s) content to prioritize the alert message with the link. --- .../Collections/CollectionCreatorModal.vue | 15 +- .../Collections/ListCollectionCreator.vue | 499 +++++++++--------- .../Collections/PairCollectionCreator.vue | 245 ++++----- .../PairedListCollectionCreator.vue | 449 ++++++++-------- .../Collections/common/CollectionCreator.vue | 178 ++++--- 5 files changed, 693 insertions(+), 693 deletions(-) diff --git a/client/src/components/Collections/CollectionCreatorModal.vue b/client/src/components/Collections/CollectionCreatorModal.vue index 6788503a60a6..334f6586e0da 100644 --- a/client/src/components/Collections/CollectionCreatorModal.vue +++ b/client/src/components/Collections/CollectionCreatorModal.vue @@ -6,7 +6,6 @@ import { computed, ref, watch } from "vue"; import type { HDASummary, HistoryItemSummary, HistorySummary } from "@/api"; import { createDatasetCollection } from "@/components/History/model/queries"; -import { useGlobalUploadModal } from "@/composables/globalUploadModal.js"; import { useCollectionBuilderItemsStore } from "@/stores/collectionBuilderItemsStore"; import { useHistoryStore } from "@/stores/historyStore"; import localize from "@/utils/localization"; @@ -21,8 +20,6 @@ import Heading from "@/components/Common/Heading.vue"; import GenericItem from "@/components/History/Content/GenericItem.vue"; import LoadingSpan from "@/components/LoadingSpan.vue"; -const { openGlobalUploadModal } = useGlobalUploadModal(); - interface Props { historyId: string; showModal: boolean; @@ -263,12 +260,6 @@ function resetModal() { {{ historyItemsError }} - - {{ localize("No items available to create a collection.") }} - - Upload some datasets and try again. - - @@ -295,7 +286,7 @@ function resetModal() {
-
+
- {{ localize("No datasets were selected") }} - {{ localize("At least one element is needed for the collection. You may need to") }} - - {{ localize("cancel") }} - - {{ localize("and reselect new elements.") }} - - -
- -
-
-
- - {{ - localize( - "No elements in your history are valid for this list. You may need to switch to a different history." - ) - }} - - {{ localize("The following extensions are required for this list: ") }} -
    -
  • - {{ extension }} -
  • -
-
-
- {{ localize("The following selections could not be included due to problems:") }}
  • {{ problem }}
- {{ localize("At least one element is needed for the collection. You may need to") }} - - {{ localize("cancel") }} - - {{ localize("and reselect new elements.") }}
+
-
- -
+
+ + {{ + localize("Collections cannot have duplicated names. The following list names are duplicated: ") + }} +
    +
  1. {{ name }}
  2. +
+ {{ localize("Please fix these duplicates and try again.") }} +
-
-
- - {{ localize("The following selections could not be included due to problems:") }} -
    -
  • - {{ problem }} -
  • -
-
-
- -
- + + + +
diff --git a/client/src/components/Collections/PairCollectionCreator.vue b/client/src/components/Collections/PairCollectionCreator.vue index f7a9ab5f6d5a..d174224e37fd 100644 --- a/client/src/components/Collections/PairCollectionCreator.vue +++ b/client/src/components/Collections/PairCollectionCreator.vue @@ -345,149 +345,150 @@ function _naiveStartingAndEndingLCS(s1: string, s2: string) {
-
+
- {{ localize("No datasets were selected.") }} - {{ localize("Exactly two elements needed for the collection. You may need to") }} - - {{ localize("cancel") }} - - {{ localize("and reselect new elements.") }} - - -
- -
-
-
- - {{ - localize( - "No elements in your history are valid for this pair. You may need to switch to a different history." - ) - }} - - {{ localize("The following extensions are required for this pair: ") }} -
    -
  • - {{ extension }} -
  • -
-
-
- {{ localize("The following selections could not be included due to problems:") }}
  • {{ problem }}
- {{ localize("Exactly two elements needed for the collection. You may need to") }} - - {{ localize("cancel") }} - - {{ localize("and reselect new elements.") }} +
+
+
+ + {{ localize("Exactly two elements are needed for the pair.") }} + + + {{ localize("Cancel") }} + + {{ localize("and reselect new elements.") }} + -
+
-
-
- - {{ localize("The following selections could not be included due to problems:") }} -
    -
  • - {{ problem }} -
  • -
-
-
-
- - {{ localize("Exactly two elements are needed for the pair.") }} - - + + + + + +
diff --git a/client/src/components/Collections/PairedListCollectionCreator.vue b/client/src/components/Collections/PairedListCollectionCreator.vue index d6e0f385aecb..206f41a13285 100644 --- a/client/src/components/Collections/PairedListCollectionCreator.vue +++ b/client/src/components/Collections/PairedListCollectionCreator.vue @@ -817,261 +817,260 @@ function _naiveStartingAndEndingLCS(s1: string, s2: string) {
-
+
- {{ noElementsHeader }} - {{ ALL_INVALID_ELEMENTS_PART_ONE }} - - {{ CANCEL_TEXT }} - - {{ allInvalidElementsPartTwo }} + {{ INVALID_HEADER }} +
    +
  • + {{ problem }} +
  • +
-
- -
-
- +
+ {{ localize( - "No elements in your history are valid for this collection. You may need to switch to a different history." + "Could not automatically create any pairs from the given dataset names. You may want to choose or enter different filters and try auto-pairing again." ) }} - - {{ localize("The following extensions are required for this collection: ") }} -
    -
  • - {{ extension }} -
  • -
+ + + {{ CANCEL_TEXT }} + + {{ allInvalidElementsPartTwo }}
- - {{ INVALID_HEADER }} +
+
+ + {{ + localize("Collections cannot have duplicated names. The following list names are duplicated: ") + }}
    -
  • - {{ problem }} -
  • +
  • {{ name }}
- {{ ALL_INVALID_ELEMENTS_PART_ONE }} - - {{ CANCEL_TEXT }} - - {{ allInvalidElementsPartTwo }} -
-
- -
-
-
-
- - {{ INVALID_HEADER }} -
    -
  • - {{ problem }} -
  • -
-
-
- - {{ ALL_INVALID_ELEMENTS_PART_ONE }} - - {{ CANCEL_TEXT }} - - {{ allInvalidElementsPartTwo }} + {{ localize("Please fix these duplicates and try again.") }} -
- -
-
-
- - {{ INVALID_HEADER }} -
    -
  • - {{ problem }} -
  • -
-
-
-
- + + +
diff --git a/client/src/components/Collections/common/CollectionCreator.vue b/client/src/components/Collections/common/CollectionCreator.vue index c080744dbe3d..7e2401d0bd7b 100644 --- a/client/src/components/Collections/common/CollectionCreator.vue +++ b/client/src/components/Collections/common/CollectionCreator.vue @@ -1,7 +1,7 @@