+
{{ props.option }}
From e3289f29786a5a1196bc80fc15c1e817a808294c Mon Sep 17 00:00:00 2001
From: Laila Los <44241786+ElectronicBlueberry@users.noreply.github.com>
Date: Tue, 8 Nov 2022 11:47:12 +0100
Subject: [PATCH 11/58] invert regular expression to fix performance concern
---
client/src/components/TagsMultiselect/StatelessTags.vue | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/client/src/components/TagsMultiselect/StatelessTags.vue b/client/src/components/TagsMultiselect/StatelessTags.vue
index 0aec49a173f..e657c7b7b43 100644
--- a/client/src/components/TagsMultiselect/StatelessTags.vue
+++ b/client/src/components/TagsMultiselect/StatelessTags.vue
@@ -57,13 +57,13 @@ function openMultiselect() {
const tags = computed(() => props.value.map((tag) => tag.replace(/^name:/, "#")));
-const validTagRegex = /^([^.:])+(.[^\s.:]+)*(:[^.:]+)?$/;
+const invalidTagRegex = /([.:\s][.:\s])|(^[.:])|([.:]$)|(^[\s]*$)/;
function isValid(tag) {
if (typeof tag === "string") {
- return Boolean(tag.match(validTagRegex));
+ return !tag.match(invalidTagRegex);
} else {
- return Boolean(tag.label.match(validTagRegex));
+ return !tag.label.match(invalidTagRegex);
}
}
From de8167b7c7a961c9d10d4fe7e1bea40ba50a41a7 Mon Sep 17 00:00:00 2001
From: Laila Los <44241786+ElectronicBlueberry@users.noreply.github.com>
Date: Tue, 8 Nov 2022 12:38:39 +0100
Subject: [PATCH 12/58] fix local tags always empty
---
client/src/composables/user.js | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/client/src/composables/user.js b/client/src/composables/user.js
index da3003587cb..74b265926dc 100644
--- a/client/src/composables/user.js
+++ b/client/src/composables/user.js
@@ -1,4 +1,4 @@
-import { computed, onMounted, inject, watch, ref } from "vue";
+import { computed, onMounted, inject, ref } from "vue";
/**
* composable user store wrapper
@@ -28,16 +28,6 @@ const localTags = ref([]);
export function useUserTags() {
const { currentUser } = useCurrentUser();
- watch(
- () => currentUser.value,
- (user) => {
- // reset local tags if user reloads
- if (user) {
- localTags.value = [];
- }
- }
- );
-
const userTags = computed(() => {
let tags;
From ad2d5c22be73c40c9c9d2f32d87b4a7c9f9adf9c Mon Sep 17 00:00:00 2001
From: Laila Los <44241786+ElectronicBlueberry@users.noreply.github.com>
Date: Tue, 8 Nov 2022 13:07:17 +0100
Subject: [PATCH 13/58] add tag-click fixed unit test
---
.../History/Content/ContentItem.test.js | 27 ++++++++++++++++---
.../History/Content/ContentItem.vue | 9 +++++--
client/src/components/Tags/model.js | 2 --
.../TagsMultiselect/StatelessTags.vue | 11 +++++---
client/src/components/TagsMultiselect/Tag.vue | 1 +
5 files changed, 38 insertions(+), 12 deletions(-)
diff --git a/client/src/components/History/Content/ContentItem.test.js b/client/src/components/History/Content/ContentItem.test.js
index e731b526132..a18c047cd55 100644
--- a/client/src/components/History/Content/ContentItem.test.js
+++ b/client/src/components/History/Content/ContentItem.test.js
@@ -36,44 +36,63 @@ describe("ContentItem", () => {
DatasetDetails: true,
vueTagsInput: false,
},
+ provide: {
+ store: {
+ dispatch: jest.fn,
+ getters: {},
+ },
+ },
});
});
it("check basics", async () => {
expect(wrapper.attributes("data-hid")).toBe("1");
expect(wrapper.find(".content-title").text()).toBe("name");
- const tags = wrapper.find(".alltags").findAll(".ti-tag");
+ const tags = wrapper.find(".stateless-tags").findAll(".tag");
+
// verify tags
expect(tags.length).toBe(3);
+
for (let i = 0; i < 3; i++) {
expect(tags.at(i).text()).toBe(`tag${i + 1}`);
- await tags.at(i).find(".tag-name").trigger("click");
+
+ await tags.at(i).trigger("click");
expect(wrapper.emitted()["tag-click"][i][0]).toBe(`tag${i + 1}`);
}
+
// close all tags
for (let i = 0; i < 3; i++) {
- const tagRemover = wrapper.find(".ti-icon-close");
+ const tagRemover = wrapper.find(`.tag[data-option=tag${i + 1}] button`);
+
await tagRemover.trigger("click");
expect(wrapper.emitted()["tag-change"][i][1]).not.toContain(`tag${i + 1}`);
}
+
await wrapper.setProps({ isHistoryItem: false, item: { tags: [] } });
- expect(wrapper.find(".alltags").exists()).toBe(false);
+ expect(wrapper.find(".stateless-tags").exists()).toBe(false);
+
// expansion button
const $el = wrapper.find(".cursor-pointer");
$el.trigger("click");
expect(wrapper.emitted()["update:expand-dataset"]).toBeDefined();
+
// select and unselect
const noSelector = wrapper.find(".selector > svg");
expect(noSelector.exists()).toBe(false);
+
await wrapper.setProps({ selectable: true });
expect(wrapper.classes()).toEqual(expect.arrayContaining(["alert-success"]));
+
const selector = wrapper.find(".selector > svg");
expect(selector.attributes("data-icon")).toBe("square");
selector.trigger("click");
+
await localVue.nextTick();
expect(wrapper.emitted()["update:selected"][0][0]).toBe(true);
+
await wrapper.setProps({ selected: true });
selector.trigger("click");
+
await localVue.nextTick();
expect(wrapper.emitted()["update:selected"][1][0]).toBe(false);
expect(wrapper.classes()).toEqual(expect.arrayContaining(["alert-info"]));
diff --git a/client/src/components/History/Content/ContentItem.vue b/client/src/components/History/Content/ContentItem.vue
index 359a70a12aa..a4316608678 100644
--- a/client/src/components/History/Content/ContentItem.vue
+++ b/client/src/components/History/Content/ContentItem.vue
@@ -98,7 +98,12 @@
:disabled="tagsDisabled"
@tag-click="onTagClick"
@input="onTags" /-->
-
+
-
diff --git a/client/src/components/History/Content/ContentOptions.vue b/client/src/components/History/Content/ContentOptions.vue
index c2a9d8e4c49..d1b442cc73d 100644
--- a/client/src/components/History/Content/ContentOptions.vue
+++ b/client/src/components/History/Content/ContentOptions.vue
@@ -17,6 +17,7 @@
v-if="isDataset"
:disabled="displayDisabled"
:title="displayButtonTitle"
+ :tabindex="tabindex"
class="display-btn px-1"
size="sm"
variant="link"
@@ -28,6 +29,7 @@
v-if="writable && isHistoryItem"
:disabled="editDisabled"
:title="editButtonTitle"
+ :tabindex="tabindex"
class="edit-btn px-1"
size="sm"
variant="link"
@@ -37,6 +39,7 @@
From 617b9ee6eaa8720bbae619404f8201fc5e40df4b Mon Sep 17 00:00:00 2001
From: Laila Los <44241786+ElectronicBlueberry@users.noreply.github.com>
Date: Tue, 8 Nov 2022 16:13:13 +0100
Subject: [PATCH 17/58] fix selenium test history panel
---
client/src/components/TagsMultiselect/StatelessTags.vue | 1 -
client/src/utils/navigation/navigation.yml | 4 ++--
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/client/src/components/TagsMultiselect/StatelessTags.vue b/client/src/components/TagsMultiselect/StatelessTags.vue
index bfad0e9b7bd..9bfd9735dfa 100644
--- a/client/src/components/TagsMultiselect/StatelessTags.vue
+++ b/client/src/components/TagsMultiselect/StatelessTags.vue
@@ -90,7 +90,6 @@ library.add(faTags, faCheck, faTimes, faPlus);
v-if="!disabled"
placeholder="Add Tags"
ref="multiselectElement"
- class=""
:value="tags"
:options="userTags"
:multiple="true"
diff --git a/client/src/utils/navigation/navigation.yml b/client/src/utils/navigation/navigation.yml
index 9ec0762b59a..8dba8b9c72c 100644
--- a/client/src/utils/navigation/navigation.yml
+++ b/client/src/utils/navigation/navigation.yml
@@ -188,7 +188,7 @@ history_panel:
# Action buttons...
download_button: '${_} .download-btn'
info_button: '${_} .params-btn'
- alltags: '${_} .alltags .ti-tags'
+ alltags: '${_} .stateless-tags .tags'
metadata_file_download: '${_} [data-description="download ${metadata_name}"]'
dataset_operations_dropdown: '${_} .dataset-actions'
@@ -202,7 +202,7 @@ history_panel:
form: '${_} [data-description="edit form"]'
name_input: '${_} [data-description="name input"]'
annotation_input: '${_} [data-description="annotation input"]'
- tags_input: '${_} .tags input'
+ tags_input: '${_} .stateless-tags button'
save_button: '${_} [data-description="editor save button"]'
# history tags
From 40adc9f9a5416ff88087f1deb5bbb5847d2b80b1 Mon Sep 17 00:00:00 2001
From: Laila Los <44241786+ElectronicBlueberry@users.noreply.github.com>
Date: Tue, 8 Nov 2022 16:19:16 +0100
Subject: [PATCH 18/58] only show pointer on clickable tags
---
client/src/components/TagsMultiselect/Tag.vue | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/client/src/components/TagsMultiselect/Tag.vue b/client/src/components/TagsMultiselect/Tag.vue
index 97ec4bf0c3d..56fd4f1d990 100644
--- a/client/src/components/TagsMultiselect/Tag.vue
+++ b/client/src/components/TagsMultiselect/Tag.vue
@@ -69,7 +69,6 @@ library.add(faTimes);
font-size: $font-size-base * 0.95;
color: black;
border-radius: 4px;
- cursor: pointer;
padding: 0 0.5rem;
&.editable {
@@ -77,7 +76,9 @@ library.add(faTimes);
}
&.clickable {
+ cursor: pointer;
position: relative;
+
&:hover {
&:before {
content: "";
From 7598a033cb79160b297745ce2d33b46802edad0d Mon Sep 17 00:00:00 2001
From: Laila Los <44241786+ElectronicBlueberry@users.noreply.github.com>
Date: Tue, 8 Nov 2022 16:23:35 +0100
Subject: [PATCH 19/58] fix tag delete button
---
client/src/components/TagsMultiselect/StatelessTags.vue | 4 ++--
client/src/components/TagsMultiselect/Tag.vue | 1 +
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/client/src/components/TagsMultiselect/StatelessTags.vue b/client/src/components/TagsMultiselect/StatelessTags.vue
index 9bfd9735dfa..5b0fdc828e2 100644
--- a/client/src/components/TagsMultiselect/StatelessTags.vue
+++ b/client/src/components/TagsMultiselect/StatelessTags.vue
@@ -38,8 +38,8 @@ function onInput(val) {
}
function onDelete(tag) {
- const val = [...props.value];
- const index = props.value.indexOf(tag.trim());
+ const val = [...tags.value];
+ const index = tags.value.indexOf(tag);
val.splice(index, 1);
emit("input", val);
}
diff --git a/client/src/components/TagsMultiselect/Tag.vue b/client/src/components/TagsMultiselect/Tag.vue
index 56fd4f1d990..f362fe30647 100644
--- a/client/src/components/TagsMultiselect/Tag.vue
+++ b/client/src/components/TagsMultiselect/Tag.vue
@@ -90,6 +90,7 @@ library.add(faTimes);
border: 2px solid;
border-color: inherit;
border-radius: inherit;
+ pointer-events: none;
}
}
}
From 6ac6ef15b6e1267f8fcaa744f9276ed8c8432194 Mon Sep 17 00:00:00 2001
From: Laila Los <44241786+ElectronicBlueberry@users.noreply.github.com>
Date: Tue, 8 Nov 2022 17:17:03 +0100
Subject: [PATCH 20/58] fix wrong sr annotations
---
client/src/components/TagsMultiselect/StatelessTags.vue | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/client/src/components/TagsMultiselect/StatelessTags.vue b/client/src/components/TagsMultiselect/StatelessTags.vue
index 5b0fdc828e2..b42c0572e72 100644
--- a/client/src/components/TagsMultiselect/StatelessTags.vue
+++ b/client/src/components/TagsMultiselect/StatelessTags.vue
@@ -127,13 +127,13 @@ library.add(faTags, faCheck, faTimes, faPlus);
- add tag
+ remove tag
- remove tag
+ add tag
From eb5a6aefafac82de0ed75048240f79bbc3c89a6a Mon Sep 17 00:00:00 2001
From: Laila Los <44241786+ElectronicBlueberry@users.noreply.github.com>
Date: Wed, 16 Nov 2022 16:26:05 +0100
Subject: [PATCH 21/58] remove never hit test route replace tag selectors
---
client/src/components/TagsMultiselect/Tag.vue | 2 +-
client/src/utils/navigation/navigation.yml | 9 ++++-----
lib/galaxy/selenium/navigates_galaxy.py | 6 ------
3 files changed, 5 insertions(+), 12 deletions(-)
diff --git a/client/src/components/TagsMultiselect/Tag.vue b/client/src/components/TagsMultiselect/Tag.vue
index f362fe30647..48c8621621c 100644
--- a/client/src/components/TagsMultiselect/Tag.vue
+++ b/client/src/components/TagsMultiselect/Tag.vue
@@ -48,7 +48,7 @@ library.add(faTimes);
v-if="editable"
size="sm"
variant="link"
- class="px-1 py-0"
+ class="px-1 py-0 tag-delete-button"
tabindex="-1"
@click.prevent.stop="onDelete">
diff --git a/client/src/utils/navigation/navigation.yml b/client/src/utils/navigation/navigation.yml
index 8dba8b9c72c..a4238e17488 100644
--- a/client/src/utils/navigation/navigation.yml
+++ b/client/src/utils/navigation/navigation.yml
@@ -251,11 +251,10 @@ history_panel:
contents: '.history-index .content-item'
empty_message: '.empty-message'
size: '.history-size'
- tag_icon: '.actions .history-tag-btn'
- tag_area: '.details .tags-display'
- tag_area_input: '.details .tags-display .tags-input input'
- tag_close_btn: '.tags-display .ti-icon-close'
- tags: 'li.ti-tag.ti-valid .tag-name'
+ tag_area: '.details .stateless-tags'
+ tag_area_input: '.details .stateless-tags .multiselect button'
+ tag_close_btn: '.tags-display .tag-delete-button'
+ tags: '.tag span'
annotation_icon: '.actions .history-annotate-btn'
annotation_area: '.details .history-annotation'
diff --git a/lib/galaxy/selenium/navigates_galaxy.py b/lib/galaxy/selenium/navigates_galaxy.py
index ebb40283497..913160870de 100644
--- a/lib/galaxy/selenium/navigates_galaxy.py
+++ b/lib/galaxy/selenium/navigates_galaxy.py
@@ -1515,14 +1515,8 @@ class NavigatesGalaxy(HasDriver):
@edit_details
def history_panel_add_tags(self, tags):
- tag_icon = self.components.history_panel.tag_icon
- tag_area = self.components.history_panel.tag_area
tag_area_input = self.components.history_panel.tag_area_input
- # if the tag editor is not present but the tag_icon is, then click it
- if not tag_icon.is_absent and (tag_area.is_absent or not tag_area.is_displayed):
- tag_icon.wait_for_and_click()
-
input_element = tag_area_input.wait_for_and_click()
self.sleep_for(self.wait_types.UX_RENDER)
From bc4a36ebf93c42f45865b07d7c429e43612b79e9 Mon Sep 17 00:00:00 2001
From: Laila Los <44241786+ElectronicBlueberry@users.noreply.github.com>
Date: Thu, 17 Nov 2022 16:28:29 +0100
Subject: [PATCH 22/58] add noFetch prop to user composable
---
client/src/composables/user.js | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/client/src/composables/user.js b/client/src/composables/user.js
index 74b265926dc..4d2c42245e5 100644
--- a/client/src/composables/user.js
+++ b/client/src/composables/user.js
@@ -1,16 +1,19 @@
-import { computed, onMounted, inject, ref } from "vue";
+import { computed, onMounted, inject, ref, unref } from "vue";
/**
* composable user store wrapper
+ * @param { boolean | ref } noFetch when true, the user will not be fetched from the server
* @returns currentUser computed
*/
-export function useCurrentUser() {
+export function useCurrentUser(noFetch = false) {
const store = inject("store");
const currentUser = computed(() => store.getters["user/currentUser"]);
onMounted(() => {
- store.dispatch("user/loadUser");
+ if (!unref(noFetch)) {
+ store.dispatch("user/loadUser");
+ }
});
const addFavoriteTool = async (toolId) => await store.dispatch("user/addFavoriteTool", toolId);
@@ -26,7 +29,7 @@ const localTags = ref([]);
* Keeps tracks of the tags the current user has used.
*/
export function useUserTags() {
- const { currentUser } = useCurrentUser();
+ const { currentUser } = useCurrentUser(true);
const userTags = computed(() => {
let tags;
From 7ed588a8d0d90cb2dc0b6b2be5c74ecf6f64e360 Mon Sep 17 00:00:00 2001
From: Laila Los <44241786+ElectronicBlueberry@users.noreply.github.com>
Date: Thu, 17 Nov 2022 17:07:39 +0100
Subject: [PATCH 23/58] add filterable prop fix multi-history-view tags
filterable
---
client/src/components/History/Content/ContentItem.vue | 7 +++++--
.../History/CurrentCollection/CollectionPanel.vue | 2 ++
.../src/components/History/CurrentHistory/HistoryPanel.vue | 2 ++
client/src/components/History/Index.vue | 1 +
4 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/client/src/components/History/Content/ContentItem.vue b/client/src/components/History/Content/ContentItem.vue
index a4a2244ccf7..40753abe8ea 100644
--- a/client/src/components/History/Content/ContentItem.vue
+++ b/client/src/components/History/Content/ContentItem.vue
@@ -76,7 +76,7 @@
v-if="!tagsDisabled || hasTags"
:value="tags"
:disabled="tagsDisabled"
- :clickable="true"
+ :clickable="filterable"
@input="onTags"
@tag-click="onTagClick" />
@@ -126,6 +126,7 @@ export default {
name: { type: String, required: true },
selected: { type: Boolean, default: false },
selectable: { type: Boolean, default: false },
+ filterable: { type: Boolean, default: false },
},
computed: {
jobState() {
@@ -232,7 +233,9 @@ export default {
updateContentFields(this.item, { tags: newTags });
},
onTagClick(tag) {
- this.$emit("tag-click", tag);
+ if (this.filterable) {
+ this.$emit("tag-click", tag);
+ }
},
toggleHighlights() {
this.$emit("toggleHighlights", this.item);
diff --git a/client/src/components/History/CurrentCollection/CollectionPanel.vue b/client/src/components/History/CurrentCollection/CollectionPanel.vue
index 68af5a016f4..eb69d0ee598 100644
--- a/client/src/components/History/CurrentCollection/CollectionPanel.vue
+++ b/client/src/components/History/CurrentCollection/CollectionPanel.vue
@@ -28,6 +28,7 @@
:name="item.element_identifier"
:expand-dataset="isExpanded(item)"
:is-dataset="item.element_type == 'hda'"
+ :filterable="filterable"
@update:expand-dataset="setExpanded(item, $event)"
@view-collection="onViewSubCollection" />
@@ -63,6 +64,7 @@ export default {
history: { type: Object, required: true },
selectedCollections: { type: Array, required: true },
showControls: { type: Boolean, default: true },
+ filterable: { type: Boolean, default: false },
},
data() {
return {
diff --git a/client/src/components/History/CurrentHistory/HistoryPanel.vue b/client/src/components/History/CurrentHistory/HistoryPanel.vue
index 45b4cafeb58..af66154bcd7 100644
--- a/client/src/components/History/CurrentHistory/HistoryPanel.vue
+++ b/client/src/components/History/CurrentHistory/HistoryPanel.vue
@@ -123,6 +123,7 @@
:highlight="getHighlight(item)"
:selected="isSelected(item)"
:selectable="showSelection"
+ :filterable="filterable"
@tag-click="onTagClick"
@tag-change="onTagChange"
@toggleHighlights="toggleHighlights"
@@ -194,6 +195,7 @@ export default {
filter: { type: String, default: "" },
writable: { type: Boolean, default: true },
showControls: { type: Boolean, default: true },
+ filterable: { type: Boolean, default: false },
},
data() {
return {
diff --git a/client/src/components/History/Index.vue b/client/src/components/History/Index.vue
index da6677092f2..91aff574db1 100644
--- a/client/src/components/History/Index.vue
+++ b/client/src/components/History/Index.vue
@@ -6,6 +6,7 @@
v-if="!breadcrumbs.length"
:list-offset="listOffset"
:history="currentHistory"
+ :filterable="true"
v-on="handlers"
@view-collection="onViewCollection">
From 46ab32f19775cf5f418997d2a42afe03836b85dc Mon Sep 17 00:00:00 2001
From: Laila Los <44241786+ElectronicBlueberry@users.noreply.github.com>
Date: Fri, 18 Nov 2022 12:12:25 +0100
Subject: [PATCH 24/58] fix content-item test
---
client/src/components/History/Content/ContentItem.test.js | 1 +
1 file changed, 1 insertion(+)
diff --git a/client/src/components/History/Content/ContentItem.test.js b/client/src/components/History/Content/ContentItem.test.js
index a18c047cd55..ce8e4673233 100644
--- a/client/src/components/History/Content/ContentItem.test.js
+++ b/client/src/components/History/Content/ContentItem.test.js
@@ -30,6 +30,7 @@ describe("ContentItem", () => {
name: "name",
selected: false,
selectable: false,
+ filterable: true,
},
localVue,
stubs: {
From 6589dd502ca86e81eaf6310ce25c12fa265a8c77 Mon Sep 17 00:00:00 2001
From: Laila Los <44241786+ElectronicBlueberry@users.noreply.github.com>
Date: Fri, 18 Nov 2022 12:30:53 +0100
Subject: [PATCH 25/58] fix appearance for no options
---
client/src/components/TagsMultiselect/StatelessTags.vue | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/client/src/components/TagsMultiselect/StatelessTags.vue b/client/src/components/TagsMultiselect/StatelessTags.vue
index b42c0572e72..10339849d31 100644
--- a/client/src/components/TagsMultiselect/StatelessTags.vue
+++ b/client/src/components/TagsMultiselect/StatelessTags.vue
@@ -108,7 +108,9 @@ library.add(faTags, faCheck, faTimes, faPlus);
@click="onTagClicked">
- Type to add new tag
+
+ Type to add new tag
+
From 680d99ea1e26d55f0ae24bd23732c705e745131f Mon Sep 17 00:00:00 2001
From: Laila Los <44241786+ElectronicBlueberry@users.noreply.github.com>
Date: Fri, 18 Nov 2022 13:23:32 +0100
Subject: [PATCH 26/58] fix selenium tag input
---
client/src/utils/navigation/navigation.yml | 6 ++++--
lib/galaxy/selenium/navigates_galaxy.py | 6 +++---
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/client/src/utils/navigation/navigation.yml b/client/src/utils/navigation/navigation.yml
index a4238e17488..73476258437 100644
--- a/client/src/utils/navigation/navigation.yml
+++ b/client/src/utils/navigation/navigation.yml
@@ -237,7 +237,8 @@ history_panel:
title_input: '.dataset-collection-panel .controls .title input'
subtitle: '.dataset-collection-panel .controls .title .subtitle'
elements_warning: '.dataset-collection-panel .controls .elements-warning'
- tag_area_input: '.controls .tags-display .tags-input input'
+ tag_area_button: '.details .stateless-tags .multiselect button'
+ tag_area_input: '.details .stateless-tags .multiselect input'
list_items: '.dataset-collection-panel .listing .content-item'
selectors:
@@ -252,7 +253,8 @@ history_panel:
empty_message: '.empty-message'
size: '.history-size'
tag_area: '.details .stateless-tags'
- tag_area_input: '.details .stateless-tags .multiselect button'
+ tag_area_button: '.details .stateless-tags .multiselect button'
+ tag_area_input: '.details .stateless-tags .multiselect input'
tag_close_btn: '.tags-display .tag-delete-button'
tags: '.tag span'
diff --git a/lib/galaxy/selenium/navigates_galaxy.py b/lib/galaxy/selenium/navigates_galaxy.py
index 913160870de..127dad124b3 100644
--- a/lib/galaxy/selenium/navigates_galaxy.py
+++ b/lib/galaxy/selenium/navigates_galaxy.py
@@ -1515,10 +1515,10 @@ class NavigatesGalaxy(HasDriver):
@edit_details
def history_panel_add_tags(self, tags):
- tag_area_input = self.components.history_panel.tag_area_input
+ tag_area_button = self.components.history_panel.tag_area_button
- input_element = tag_area_input.wait_for_and_click()
- self.sleep_for(self.wait_types.UX_RENDER)
+ tag_area_button.wait_for_and_click()
+ input_element = self.components.history_panel.tag_area_input.wait_for_visible()
for tag in tags:
input_element.send_keys(tag)
From a42a5c6a237beee4c51cf94483c14ab2e6228870 Mon Sep 17 00:00:00 2001
From: Laila Los <44241786+ElectronicBlueberry@users.noreply.github.com>
Date: Fri, 18 Nov 2022 13:49:36 +0100
Subject: [PATCH 27/58] fix input multiple tags at once
---
client/src/components/TagsMultiselect/StatelessTags.vue | 1 +
lib/galaxy/selenium/navigates_galaxy.py | 2 ++
2 files changed, 3 insertions(+)
diff --git a/client/src/components/TagsMultiselect/StatelessTags.vue b/client/src/components/TagsMultiselect/StatelessTags.vue
index 10339849d31..fa7cec725e2 100644
--- a/client/src/components/TagsMultiselect/StatelessTags.vue
+++ b/client/src/components/TagsMultiselect/StatelessTags.vue
@@ -94,6 +94,7 @@ library.add(faTags, faCheck, faTimes, faPlus);
:options="userTags"
:multiple="true"
:taggable="true"
+ :closeOnSelect="false"
@tag="onAddTag"
@input="onInput"
@open="onOpen"
diff --git a/lib/galaxy/selenium/navigates_galaxy.py b/lib/galaxy/selenium/navigates_galaxy.py
index 127dad124b3..255acecda96 100644
--- a/lib/galaxy/selenium/navigates_galaxy.py
+++ b/lib/galaxy/selenium/navigates_galaxy.py
@@ -1525,6 +1525,8 @@ class NavigatesGalaxy(HasDriver):
self.send_enter(input_element)
self.sleep_for(self.wait_types.UX_RENDER)
+ self.send_escape(input_element)
+
@edit_details
def history_panel_rename(self, new_name):
editable_text_input_element = self.history_panel_name_input()
From 542711e1bbed648bd3fee860217cf967620e47d5 Mon Sep 17 00:00:00 2001
From: Laila Los <44241786+ElectronicBlueberry@users.noreply.github.com>
Date: Fri, 18 Nov 2022 14:18:36 +0100
Subject: [PATCH 28/58] add hover brightness without filter
---
.../History/Content/ContentItem.vue | 20 +++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/client/src/components/History/Content/ContentItem.vue b/client/src/components/History/Content/ContentItem.vue
index 40753abe8ea..967189e3fc8 100644
--- a/client/src/components/History/Content/ContentItem.vue
+++ b/client/src/components/History/Content/ContentItem.vue
@@ -245,6 +245,7 @@ export default {
From 6e2e18ab23a90f32a78d5e7f6b64c5106d568dcc Mon Sep 17 00:00:00 2001
From: Laila Los <44241786+ElectronicBlueberry@users.noreply.github.com>
Date: Fri, 18 Nov 2022 14:57:30 +0100
Subject: [PATCH 29/58] darken chevron
---
client/src/components/TagsMultiselect/StatelessTags.vue | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/client/src/components/TagsMultiselect/StatelessTags.vue b/client/src/components/TagsMultiselect/StatelessTags.vue
index fa7cec725e2..333c7773288 100644
--- a/client/src/components/TagsMultiselect/StatelessTags.vue
+++ b/client/src/components/TagsMultiselect/StatelessTags.vue
@@ -171,6 +171,10 @@ library.add(faTags, faCheck, faTimes, faPlus);
padding: 0 0.25rem;
z-index: 1;
height: $font-size-base * 2;
+
+ &::before {
+ border-color: $text-color transparent transparent;
+ }
}
.multiselect__placeholder {
From 4dc8532ca032a810bbb279c19c86a2dbec0d2eab Mon Sep 17 00:00:00 2001
From: Laila Los <44241786+ElectronicBlueberry@users.noreply.github.com>
Date: Fri, 18 Nov 2022 14:58:27 +0100
Subject: [PATCH 30/58] fix hover brightness on focused items
---
client/src/components/History/Content/ContentItem.vue | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/client/src/components/History/Content/ContentItem.vue b/client/src/components/History/Content/ContentItem.vue
index 967189e3fc8..0b26cddafe8 100644
--- a/client/src/components/History/Content/ContentItem.vue
+++ b/client/src/components/History/Content/ContentItem.vue
@@ -267,11 +267,12 @@ export default {
@each $state, $bg-color in $states {
&.alert-#{$state}:hover {
- &:focus {
+ &:focus,
+ &:focus-within {
background-color: scale-color($bg-color, $lightness: -5%);
}
- &:not(:focus) {
+ &:not(:focus, :focus-within) {
background-color: lighten($bg-color, 5%);
}
}
From b00d152c47c1a133b877b2a6c39ef086a469765f Mon Sep 17 00:00:00 2001
From: Laila Los <44241786+ElectronicBlueberry@users.noreply.github.com>
Date: Fri, 18 Nov 2022 15:02:16 +0100
Subject: [PATCH 31/58] add warning when attempting to add invalid tag
---
client/src/components/TagsMultiselect/StatelessTags.vue | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/client/src/components/TagsMultiselect/StatelessTags.vue b/client/src/components/TagsMultiselect/StatelessTags.vue
index 333c7773288..2f9947ad9a5 100644
--- a/client/src/components/TagsMultiselect/StatelessTags.vue
+++ b/client/src/components/TagsMultiselect/StatelessTags.vue
@@ -4,6 +4,7 @@ import Tag from "./Tag.vue";
import { ref, computed } from "vue";
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
import { useUserTags } from "composables/user";
+import { useToast } from "composables/toast";
const props = defineProps({
value: {
@@ -23,6 +24,7 @@ const props = defineProps({
const emit = defineEmits(["input", "tag-click"]);
const { userTags, addLocalTag } = useUserTags();
+const { warning } = useToast();
function onAddTag(tag) {
const newTag = tag.trim();
@@ -30,6 +32,8 @@ function onAddTag(tag) {
if (isValid(newTag)) {
addLocalTag(newTag);
emit("input", [...props.value, newTag]);
+ } else {
+ warning(`"${newTag}" is not a valid tag.`, "Invalid Tag");
}
}
From 863a2ca4e05a2d9e51fdee55e3eb68deb71f7404 Mon Sep 17 00:00:00 2001
From: Laila Los <44241786+ElectronicBlueberry@users.noreply.github.com>
Date: Mon, 28 Nov 2022 12:49:54 +0100
Subject: [PATCH 32/58] fix selenium tag selectors
---
client/src/utils/navigation/navigation.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/client/src/utils/navigation/navigation.yml b/client/src/utils/navigation/navigation.yml
index 73476258437..461ddf620fc 100644
--- a/client/src/utils/navigation/navigation.yml
+++ b/client/src/utils/navigation/navigation.yml
@@ -158,7 +158,7 @@ history_panel:
info_button: '${_} .params-btn'
tool_help_button: '${_} .fa.fa-question'
rerun_button: '${_} .rerun-btn'
- alltags: '${_} .alltags .ti-tags'
+ alltags: '${_} .stateless-tags .tag'
# history content item
content_item:
@@ -188,7 +188,7 @@ history_panel:
# Action buttons...
download_button: '${_} .download-btn'
info_button: '${_} .params-btn'
- alltags: '${_} .stateless-tags .tags'
+ alltags: '${_} .stateless-tags .tag'
metadata_file_download: '${_} [data-description="download ${metadata_name}"]'
dataset_operations_dropdown: '${_} .dataset-actions'
From c6388694de834277ee51fdd898305cd8aba4e96f Mon Sep 17 00:00:00 2001
From: Laila Los <44241786+ElectronicBlueberry@users.noreply.github.com>
Date: Mon, 28 Nov 2022 15:24:53 +0100
Subject: [PATCH 33/58] reintroduce toggle-link
---
.../History/Content/ContentItem.vue | 1 +
.../TagsMultiselect/StatelessTags.vue | 58 ++++++++++++++++++-
client/src/composables/utils/uid.js | 14 +++++
3 files changed, 72 insertions(+), 1 deletion(-)
create mode 100644 client/src/composables/utils/uid.js
diff --git a/client/src/components/History/Content/ContentItem.vue b/client/src/components/History/Content/ContentItem.vue
index 0b26cddafe8..b8cf53d6e81 100644
--- a/client/src/components/History/Content/ContentItem.vue
+++ b/client/src/components/History/Content/ContentItem.vue
@@ -77,6 +77,7 @@
:value="tags"
:disabled="tagsDisabled"
:clickable="filterable"
+ :useToggleLink="false"
@input="onTags"
@tag-click="onTagClick" />
diff --git a/client/src/components/TagsMultiselect/StatelessTags.vue b/client/src/components/TagsMultiselect/StatelessTags.vue
index 2f9947ad9a5..2c7c036e253 100644
--- a/client/src/components/TagsMultiselect/StatelessTags.vue
+++ b/client/src/components/TagsMultiselect/StatelessTags.vue
@@ -5,6 +5,7 @@ import { ref, computed } from "vue";
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
import { useUserTags } from "composables/user";
import { useToast } from "composables/toast";
+import { useUid } from "composables/utils/uid";
const props = defineProps({
value: {
@@ -19,6 +20,14 @@ const props = defineProps({
type: Boolean,
default: false,
},
+ useToggleLink: {
+ type: Boolean,
+ default: true,
+ },
+ maxVisibleTags: {
+ type: Number,
+ default: 5,
+ },
});
const emit = defineEmits(["input", "tag-click"]);
@@ -66,6 +75,25 @@ function openMultiselect() {
const tags = computed(() => props.value.map((tag) => tag.replace(/^name:/, "#")));
+const toggledOpen = ref(false);
+const toggleButtonId = useUid("toggle-link-");
+
+const trimmedTags = computed(() => {
+ if (!props.useToggleLink || toggledOpen.value) {
+ return tags.value;
+ } else {
+ return tags.value.slice(0, props.maxVisibleTags);
+ }
+});
+
+const slicedTags = computed(() => {
+ if (!props.useToggleLink) {
+ return [];
+ } else {
+ return tags.value.slice(props.maxVisibleTags);
+ }
+});
+
const invalidTagRegex = /([.:\s][.:\s])|(^[.:])|([.:]$)|(^[\s]*$)/;
function isValid(tag) {
@@ -149,12 +177,30 @@ library.add(faTags, faCheck, faTimes, faPlus);
+ (toggledOpen = true)">
+ {{ slicedTags.length }} more...
+
+
+
+
+
@@ -164,6 +210,16 @@ library.add(faTags, faCheck, faTimes, faPlus);
@import "scss/theme/blue.scss";
.stateless-tags {
+ .toggle-link {
+ padding: 0;
+ border: none;
+
+ &:hover {
+ background-color: transparent;
+ border: none;
+ }
+ }
+
&:deep(.multiselect) {
min-height: unset;
display: flex;
diff --git a/client/src/composables/utils/uid.js b/client/src/composables/utils/uid.js
new file mode 100644
index 00000000000..812bc1edf7e
--- /dev/null
+++ b/client/src/composables/utils/uid.js
@@ -0,0 +1,14 @@
+import { computed, unref } from "vue";
+
+var idCounter = 0;
+
+/**
+ * Returns a page-unique id with and optional reactive prefix
+ */
+export function useUid(prefix = "") {
+ const id = idCounter;
+ idCounter += 1;
+
+ const uid = computed(() => `${unref(prefix)}${id}`);
+ return uid;
+}
From ffeb447f410aa1641a0e5db3e76813f1fd7da4f7 Mon Sep 17 00:00:00 2001
From: Laila Los <44241786+ElectronicBlueberry@users.noreply.github.com>
Date: Mon, 28 Nov 2022 15:34:35 +0100
Subject: [PATCH 34/58] fix selenium selectors
---
client/src/utils/navigation/navigation.yml | 8 ++++----
lib/galaxy_test/selenium/test_history_panel.py | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/client/src/utils/navigation/navigation.yml b/client/src/utils/navigation/navigation.yml
index 461ddf620fc..81ff0f34969 100644
--- a/client/src/utils/navigation/navigation.yml
+++ b/client/src/utils/navigation/navigation.yml
@@ -208,12 +208,12 @@ history_panel:
# history tags
tag_editor:
selectors:
- _: '${scope} .details .tags'
+ _: '${scope} .details .stateless-tags'
toggle: '${_} .toggle-link'
- display: '${_} .tag-area .tag-name'
+ display: '${_} .tag span'
input: '${_} input'
- tag_area: '${_} .tag-area'
- tag_close_btn: '${_} .ti-icon-close'
+ tag_area: '${_} .multiselect__tags'
+ tag_close_btn: '${_} .tag-delete-button'
multi_operations:
selectors:
diff --git a/lib/galaxy_test/selenium/test_history_panel.py b/lib/galaxy_test/selenium/test_history_panel.py
index 883022b028d..3e367ca2ac1 100644
--- a/lib/galaxy_test/selenium/test_history_panel.py
+++ b/lib/galaxy_test/selenium/test_history_panel.py
@@ -106,7 +106,7 @@ class TestHistoryPanel(SeleniumTestCase):
assert_no_tags()
# add new tags to empty tags area
- tags_size = 5
+ tags_size = 6
tags = add_tags(tags_size)
assert_current_tags(tags)
From 7855a2a81f6800215dc222634c3437568ab93c61 Mon Sep 17 00:00:00 2001
From: Laila Los <44241786+ElectronicBlueberry@users.noreply.github.com>
Date: Mon, 28 Nov 2022 15:52:06 +0100
Subject: [PATCH 35/58] fix js-lint errors
---
client/src/components/TagsMultiselect/StatelessTags.vue | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/client/src/components/TagsMultiselect/StatelessTags.vue b/client/src/components/TagsMultiselect/StatelessTags.vue
index 2c7c036e253..ef2bcc3edbb 100644
--- a/client/src/components/TagsMultiselect/StatelessTags.vue
+++ b/client/src/components/TagsMultiselect/StatelessTags.vue
@@ -120,8 +120,8 @@ library.add(faTags, faCheck, faTimes, faPlus);