From ffd048e97f2e57b2925e7d40142c16b9d37f0df0 Mon Sep 17 00:00:00 2001 From: Ahmed Awan Date: Mon, 25 Sep 2023 17:13:00 -0500 Subject: [PATCH] Refactor Tool Panel views into one Toolbox Changed the structure of toolbox received from the backend ToolBox is now an object of ToolSections (and Tools) by id Also consolidated `ToolBox` and `ToolBoxWorkflow` into one `ToolBox` that is contained within a `ToolPanel`. Removed Tool panel providers and ProviderAware tool boxes --- .../components/ActivityBar/ActivityBar.vue | 4 +- .../src/components/Common/PublishedItem.vue | 4 +- .../Panels/Buttons/FavoritesButton.vue | 3 +- .../Panels/Buttons/PanelViewMenuItem.vue | 4 +- .../components/Panels/Common/ToolSearch.vue | 73 +-- .../components/Panels/Common/ToolSection.vue | 307 +++++------ .../Panels/ProviderAwareToolBox.vue | 41 -- .../Panels/ProviderAwareToolBoxWorkflow.vue | 73 --- client/src/components/Panels/ToolBox.vue | 494 +++++++++++------- .../src/components/Panels/ToolBoxWorkflow.vue | 211 -------- client/src/components/Panels/ToolPanel.vue | 121 +++++ .../components/Panels/toolSearch.worker.js | 12 +- client/src/components/Panels/utilities.js | 294 +++++------ client/src/components/ToolsList/ToolsList.vue | 228 ++++---- .../components/ToolsList/ToolsListItem.vue | 12 + .../components/ToolsList/ToolsListTable.vue | 8 +- .../Toolshed/RepositoryDetails/Index.vue | 33 +- .../InstallationSettings.vue | 6 +- .../src/components/Workflow/Editor/Index.vue | 9 +- .../Workflow/Published/WorkflowPublished.vue | 4 +- .../WorkflowInvocationStep.vue | 7 +- .../providers/ToolPanelViewProvider.js | 40 -- .../components/providers/storeProviders.js | 1 - .../src/entry/analysis/modules/Analysis.vue | 4 +- client/src/store/index.js | 2 - client/src/store/toolStore.js | 71 --- client/src/stores/toolStore.ts | 239 +++++++++ client/src/stores/workflowStore.ts | 2 + lib/galaxy/tool_util/toolbox/base.py | 33 ++ lib/galaxy/tool_util/toolbox/panel.py | 16 +- lib/galaxy/webapps/galaxy/api/tools.py | 2 +- 31 files changed, 1242 insertions(+), 1116 deletions(-) delete mode 100644 client/src/components/Panels/ProviderAwareToolBox.vue delete mode 100644 client/src/components/Panels/ProviderAwareToolBoxWorkflow.vue delete mode 100644 client/src/components/Panels/ToolBoxWorkflow.vue create mode 100644 client/src/components/Panels/ToolPanel.vue delete mode 100644 client/src/components/providers/ToolPanelViewProvider.js delete mode 100644 client/src/store/toolStore.js create mode 100644 client/src/stores/toolStore.ts diff --git a/client/src/components/ActivityBar/ActivityBar.vue b/client/src/components/ActivityBar/ActivityBar.vue index e5b99c76f057..9dc3cf03f173 100644 --- a/client/src/components/ActivityBar/ActivityBar.vue +++ b/client/src/components/ActivityBar/ActivityBar.vue @@ -17,7 +17,7 @@ import NotificationItem from "./Items/NotificationItem.vue"; import UploadItem from "./Items/UploadItem.vue"; import ContextMenu from "@/components/Common/ContextMenu.vue"; import FlexPanel from "@/components/Panels/FlexPanel.vue"; -import ToolBox from "@/components/Panels/ProviderAwareToolBox.vue"; +import ToolPanel from "@/components/Panels/ToolPanel.vue"; import WorkflowBox from "@/components/Panels/WorkflowBox.vue"; const { config, isConfigLoaded } = useConfig(); @@ -211,7 +211,7 @@ function toggleContextMenu(evt: MouseEvent) { - + diff --git a/client/src/components/Common/PublishedItem.vue b/client/src/components/Common/PublishedItem.vue index 49b9e130f2db..246cae7db0b4 100644 --- a/client/src/components/Common/PublishedItem.vue +++ b/client/src/components/Common/PublishedItem.vue @@ -6,7 +6,7 @@ import { usePanels } from "@/composables/usePanels"; import ActivityBar from "@/components/ActivityBar/ActivityBar.vue"; import LoadingSpan from "@/components/LoadingSpan.vue"; import FlexPanel from "@/components/Panels/FlexPanel.vue"; -import ToolBox from "@/components/Panels/ProviderAwareToolBox.vue"; +import ToolPanel from "@/components/Panels/ToolPanel.vue"; import StatelessTags from "@/components/TagsMultiselect/StatelessTags.vue"; interface Item { @@ -54,7 +54,7 @@ const { showActivityBar, showToolbox } = usePanels();
- +
diff --git a/client/src/components/Panels/Buttons/FavoritesButton.vue b/client/src/components/Panels/Buttons/FavoritesButton.vue index cf2d29d51e31..95eff36c7166 100644 --- a/client/src/components/Panels/Buttons/FavoritesButton.vue +++ b/client/src/components/Panels/Buttons/FavoritesButton.vue @@ -23,6 +23,7 @@ export default { props: { query: { type: String, + required: true, }, }, data() { @@ -56,7 +57,7 @@ export default { if (this.toggle) { this.$emit("onFavorites", this.searchKey); } else { - this.$emit("onFavorites", null); + this.$emit("onFavorites", ""); } }, }, diff --git a/client/src/components/Panels/Buttons/PanelViewMenuItem.vue b/client/src/components/Panels/Buttons/PanelViewMenuItem.vue index 176a2c99fedb..c895bd6e500a 100644 --- a/client/src/components/Panels/Buttons/PanelViewMenuItem.vue +++ b/client/src/components/Panels/Buttons/PanelViewMenuItem.vue @@ -1,7 +1,7 @@ diff --git a/client/src/components/Panels/Common/ToolSearch.vue b/client/src/components/Panels/Common/ToolSearch.vue index 7c1d679bd4d2..062dc3ccab57 100644 --- a/client/src/components/Panels/Common/ToolSearch.vue +++ b/client/src/components/Panels/Common/ToolSearch.vue @@ -1,31 +1,20 @@ + - -