From b17b14363b2493c560e9262200296a07786ac6a8 Mon Sep 17 00:00:00 2001 From: Martin Cech Date: Thu, 7 Mar 2024 13:11:01 -0800 Subject: [PATCH 1/8] destructure the fetched object properly --- client/src/components/History/HistoryPublished.vue | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/client/src/components/History/HistoryPublished.vue b/client/src/components/History/HistoryPublished.vue index 15ee5952ba9..a9284130f10 100644 --- a/client/src/components/History/HistoryPublished.vue +++ b/client/src/components/History/HistoryPublished.vue @@ -14,9 +14,8 @@ const props = defineProps(); const history = ref({}); onMounted(async () => { - const result = await historyFetcher({ history_id: props.id }); - - history.value = result; + const { data } = await historyFetcher({ history_id: props.id }); + history.value = data; }); From bec4a1670dd06e56f60e157e3c0e51c338d49dd1 Mon Sep 17 00:00:00 2001 From: Martin Cech Date: Thu, 7 Mar 2024 13:13:29 -0800 Subject: [PATCH 2/8] remove periods from links --- client/src/components/Common/PublishedItem.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/components/Common/PublishedItem.vue b/client/src/components/Common/PublishedItem.vue index 7f4aa88fc25..7be9e46c5f9 100644 --- a/client/src/components/Common/PublishedItem.vue +++ b/client/src/components/Common/PublishedItem.vue @@ -82,11 +82,11 @@ const { showActivityBar, showToolbox } = usePanels();

Related Pages

- All published {{ plural }}. + All published {{ plural }}
- Published {{ plural }} by {{ owner }}. + Published {{ plural }} by {{ owner }}
From f529ffc884d70a6ab5c78f07e5c0a63f9c78b64a Mon Sep 17 00:00:00 2001 From: Martin Cech Date: Fri, 8 Mar 2024 13:49:27 -0800 Subject: [PATCH 3/8] fix missing initial filter for public grids --- client/src/components/Grid/GridHistory.vue | 5 +++-- client/src/components/Grid/GridList.vue | 7 +++++++ client/src/components/Grid/GridPage.vue | 5 +++-- client/src/entry/analysis/router.js | 10 ++++++---- 4 files changed, 19 insertions(+), 8 deletions(-) diff --git a/client/src/components/Grid/GridHistory.vue b/client/src/components/Grid/GridHistory.vue index 071ab611c15..fe61e4ab010 100644 --- a/client/src/components/Grid/GridHistory.vue +++ b/client/src/components/Grid/GridHistory.vue @@ -18,9 +18,10 @@ library.add(faPlus); interface Props { activeList?: "my" | "shared" | "published"; + username?: string; } -withDefaults(defineProps(), { +const props = withDefaults(defineProps(), { activeList: "my", }); @@ -66,6 +67,6 @@ withDefaults(defineProps(), { - + diff --git a/client/src/components/Grid/GridList.vue b/client/src/components/Grid/GridList.vue index 267cd0ec913..da08de2739c 100644 --- a/client/src/components/Grid/GridList.vue +++ b/client/src/components/Grid/GridList.vue @@ -37,6 +37,8 @@ interface Props { embedded?: boolean; // rows per page to be shown limit?: number; + // username for initial search + usernameSearch?: string; } const props = withDefaults(defineProps(), { @@ -213,6 +215,11 @@ function onSelectAll(current: boolean): void { * Initialize grid data */ onMounted(() => { + if (props.usernameSearch) { + const search_query = `user:${props.usernameSearch}`.trim(); + filterText.value = search_query; + onSearch(search_query); + } getGridData(); eventBus.on(onRouterPush); displayInitialMessage(); diff --git a/client/src/components/Grid/GridPage.vue b/client/src/components/Grid/GridPage.vue index e340c9eaecf..3508bba416f 100644 --- a/client/src/components/Grid/GridPage.vue +++ b/client/src/components/Grid/GridPage.vue @@ -17,9 +17,10 @@ library.add(faPlus); interface Props { activeList?: "my" | "published"; + username?: string; } -withDefaults(defineProps(), { +const props = withDefaults(defineProps(), { activeList: "my", }); @@ -47,6 +48,6 @@ withDefaults(defineProps(), { Public Pages - + diff --git a/client/src/entry/analysis/router.js b/client/src/entry/analysis/router.js index d5d6690122f..3d0c5f79273 100644 --- a/client/src/entry/analysis/router.js +++ b/client/src/entry/analysis/router.js @@ -281,9 +281,10 @@ export function getRouter(Galaxy) { { path: "histories/list_published", component: GridHistory, - props: { + props: (route) => ({ activeList: "published", - }, + username: route.query["f-username"], + }), }, { path: "histories/archived", @@ -381,9 +382,10 @@ export function getRouter(Galaxy) { { path: "pages/list_published", component: GridPage, - props: { + props: (route) => ({ activeList: "published", - }, + username: route.query["f-username"], + }), }, { path: "storage/history/:historyId", From 2583a492a64e022c2a67cc7db714b2fe74c6a317 Mon Sep 17 00:00:00 2001 From: Ahmed Awan Date: Fri, 8 Mar 2024 13:42:31 -0600 Subject: [PATCH 4/8] [24.0] Fix history panel arrow navigate by id bug For navigating history with arrow keys, we were tracking the next item by the `item.id` but items can have the same id and therefore, we were navigating across items. Changed it to `item.hid` instead because that is unique for the items visible for the current `historyId` and `filterText`. --- .../components/History/CurrentHistory/HistoryPanel.vue | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/client/src/components/History/CurrentHistory/HistoryPanel.vue b/client/src/components/History/CurrentHistory/HistoryPanel.vue index 8be2868a9c5..7e1d1e53f5c 100644 --- a/client/src/components/History/CurrentHistory/HistoryPanel.vue +++ b/client/src/components/History/CurrentHistory/HistoryPanel.vue @@ -80,7 +80,7 @@ const querySelectionBreak = ref(false); const dragTarget = ref(null); const contentItemRefs = computed(() => { return historyItems.value.reduce((acc: ContentItemRef, item) => { - acc[`item-${item.id}`] = ref(null); + acc[`item-${item.hid}`] = ref(null); return acc; }, {}); }); @@ -413,8 +413,8 @@ onMounted(async () => { await loadHistoryItems(); // if there is a listOffset, we are coming from a collection view, so focus on item at that offset if (props.listOffset) { - const itemId = historyItems.value[props.listOffset]?.id; - const itemElement = contentItemRefs.value[`item-${itemId}`]?.value?.$el as HTMLElement; + const itemHid = historyItems.value[props.listOffset]?.hid; + const itemElement = contentItemRefs.value[`item-${itemHid}`]?.value?.$el as HTMLElement; itemElement?.focus(); } }); @@ -427,7 +427,7 @@ function arrowNavigate(item: HistoryItem, eventKey: string) { nextItem = historyItems.value[historyItems.value.indexOf(item) - 1]; } if (nextItem) { - const itemElement = contentItemRefs.value[`item-${nextItem.id}`]?.value?.$el as HTMLElement; + const itemElement = contentItemRefs.value[`item-${nextItem.hid}`]?.value?.$el as HTMLElement; itemElement?.focus(); } return nextItem; @@ -586,7 +586,7 @@ function setItemDragstart(