From 1e435ec9b3d2fe298d5dce439aac1236395291d4 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Mon, 6 Jan 2025 11:41:35 -0500 Subject: [PATCH] Remove individual collection builders from history dropdown. --- .../SelectionOperations.test.js | 7 +- .../HistoryOperations/SelectionOperations.vue | 71 ------------------- 2 files changed, 1 insertion(+), 77 deletions(-) diff --git a/client/src/components/History/CurrentHistory/HistoryOperations/SelectionOperations.test.js b/client/src/components/History/CurrentHistory/HistoryOperations/SelectionOperations.test.js index c7f9594cf230..dba528c72b8b 100644 --- a/client/src/components/History/CurrentHistory/HistoryOperations/SelectionOperations.test.js +++ b/client/src/components/History/CurrentHistory/HistoryOperations/SelectionOperations.test.js @@ -207,20 +207,15 @@ describe("History Selection Operations", () => { }); it("should display collection building options only on active (non-deleted) items", async () => { - const buildListOption = '[data-description="build list"]'; - const buildListOfPairsOption = '[data-description="build list of pairs"]'; + const buildListOption = '[data-description="auto build list"]'; await wrapper.setProps({ filterText: "visible:true deleted:false" }); expect(wrapper.find(buildListOption).exists()).toBe(true); - expect(wrapper.find(buildListOfPairsOption).exists()).toBe(true); await wrapper.setProps({ filterText: "deleted:true" }); expect(wrapper.find(buildListOption).exists()).toBe(false); - expect(wrapper.find(buildListOfPairsOption).exists()).toBe(false); await wrapper.setProps({ filterText: "visible:any deleted:false" }); expect(wrapper.find(buildListOption).exists()).toBe(true); - expect(wrapper.find(buildListOfPairsOption).exists()).toBe(true); await wrapper.setProps({ filterText: "deleted:any" }); expect(wrapper.find(buildListOption).exists()).toBe(false); - expect(wrapper.find(buildListOfPairsOption).exists()).toBe(false); }); it("should display list building option when all are selected", async () => { diff --git a/client/src/components/History/CurrentHistory/HistoryOperations/SelectionOperations.vue b/client/src/components/History/CurrentHistory/HistoryOperations/SelectionOperations.vue index c978c95b8cfc..f356a7ff4afb 100644 --- a/client/src/components/History/CurrentHistory/HistoryOperations/SelectionOperations.vue +++ b/client/src/components/History/CurrentHistory/HistoryOperations/SelectionOperations.vue @@ -64,35 +64,6 @@ Advanced Build List - - - Build Dataset List - - - Build List of Dataset Pairs - - - Build List of Dataset Pairs (v2) - - - Build List with Optional Pairing - - - Build Collection from Rules - - @@ -168,7 +139,6 @@ :collection-type="collectionModalType" :filter-text="filterText" :selected-items="collectionSelection" - :use-beta-components="useBetaComponents" :show-modal.sync="collectionModalShow" hide-modal-on-create default-hide-source-items @@ -193,12 +163,9 @@ import { DatatypesProvider, DbKeyProvider } from "components/providers"; import SingleItemSelector from "components/SingleItemSelector"; import { StatelessTags } from "components/Tags"; -import { createDatasetCollection } from "@/components/History/model/queries"; import { useConfig } from "@/composables/config"; import { useCollectionBuilderItemSelection } from "@/stores/collectionBuilderItemsStore"; -import { buildRuleCollectionModal } from "../../adapters/buildCollectionModal"; - import CollectionCreatorModal from "@/components/Collections/CollectionCreatorModal.vue"; export default { @@ -230,7 +197,6 @@ export default { selectedDbKey: { id: "?", text: "unspecified (?)" }, selectedDatatype: { id: "auto", text: "Auto-detect" }, selectedTags: [], - useBetaComponents: false, }; }, computed: { @@ -407,48 +373,11 @@ export default { onSelectedDatatype(datatype) { this.selectedDatatype = datatype; }, - - // collection creation, fires up a modal - buildDatasetList() { - this.collectionModalType = "list"; - this.collectionSelection = Array.from(this.contentSelection.values()); - this.collectionModalShow = true; - }, buildDatasetListAll() { this.collectionModalType = "list"; this.collectionSelection = undefined; this.collectionModalShow = true; }, - buildListOfPairs() { - this.collectionModalType = "list:paired"; - this.collectionSelection = Array.from(this.contentSelection.values()); - this.useBetaComponents = false; - this.collectionModalShow = true; - }, - buildListOfPairsV2() { - this.collectionModalType = "list:paired"; - this.collectionSelection = Array.from(this.contentSelection.values()); - this.useBetaComponents = true; - this.collectionModalShow = true; - }, - buildListOfMixedPaired() { - this.collectionModalType = "list:paired_or_unpaired"; - this.collectionSelection = Array.from(this.contentSelection.values()); - this.collectionModalShow = true; - }, - createdCollection(collection) { - this.$emit("reset-selection"); - }, - async buildCollectionFromRules() { - const modalResult = await buildRuleCollectionModal(this.contentSelection, this.history.id); - await createDatasetCollection(this.history, modalResult); - - // have to hide the source items if that was requested - if (modalResult.hide_source_items) { - this.$emit("hide-selection", this.contentSelection); - } - this.$emit("reset-selection"); - }, }, };