You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As seen on https://vgp.usegalaxy.org/ and reproduced on 23.2 locally if you add the following as config/plugins/activities/vgp.yaml and search for cut.
The correct results are being lost in the createSortedResultObject function because they are identified as belonging to "uncategorized" section.
The following diff demonstrates what the code expects for the search on a custom view to work (vgp view search works after applying this).
It is unclear to me how this was supposed to work, especially the VALID_SECTION_TYPES and getPanelSectionsForTool function hence creating this issue before I dive deeper.
diff --git a/client/src/components/Panels/utilities.ts b/client/src/components/Panels/utilities.ts
index 2eea547074..84417fdc9e 100644
--- a/client/src/components/Panels/utilities.ts+++ b/client/src/components/Panels/utilities.ts@@ -23,7 +23,8 @@ const UNSECTIONED_SECTION = {
name: "Unsectioned Tools",
description: "Tools that don't appear under any section in the unsearched panel",
};
-const VALID_SECTION_TYPES = ["edam_operations", "edam_topics"]; // other than `default`+const VALID_SECTION_TYPES = ["edam_operations", "edam_topics", "vgp_pipeline_tools"]; // other than `default`+// const VALID_SECTION_TYPES = ["edam_operations", "edam_topics"]; // other than `default`
/** These are keys used to order/sort results in `ToolSearch`.
* The value for each is the sort order, higher number = higher rank.
@@ -424,6 +425,7 @@ export function createSortedResultObject(
* @returns Array of section ids
*/
function getPanelSectionsForTool(tool: Tool, panelView: string) {
+ panelView = "generic:vgp_pipeline_tools"
if (panelView === "default" && tool.panel_section_id) {
if (tool.panel_section_id.startsWith("tool_")) {
return [tool.panel_section_id.split("tool_")[1]];
@@ -434,10 +436,12 @@ function getPanelSectionsForTool(tool: Tool, panelView: string) {
const sectionType = panelView.split(":")[1] as keyof Tool;
if (
sectionType &&
- VALID_SECTION_TYPES.includes(sectionType as string) &&- (tool[sectionType] as string[])?.length !== 0+ VALID_SECTION_TYPES.includes(sectionType as string)+ // VALID_SECTION_TYPES.includes(sectionType as string) &&+ // (tool[sectionType] as string[])?.length !== 0
) {
- return tool[sectionType] as string[];+ // return tool[sectionType] as string[];+ return ["vgp_pipeline_tools"]
} else {
return ["uncategorized"];
}
The text was updated successfully, but these errors were encountered:
martenson
changed the title
tool search for a custom view filters out correct matches
webworker tool search for a custom view filters out correct matches
Dec 18, 2023
As seen on https://vgp.usegalaxy.org/ and reproduced on 23.2 locally if you add the following as
config/plugins/activities/vgp.yaml
and search forcut
.The correct results are being lost in the
createSortedResultObject
function because they are identified as belonging to "uncategorized" section.The following diff demonstrates what the code expects for the search on a custom view to work (vgp view search works after applying this).
It is unclear to me how this was supposed to work, especially the
VALID_SECTION_TYPES
andgetPanelSectionsForTool
function hence creating this issue before I dive deeper.The text was updated successfully, but these errors were encountered: