[23.2] Fix tools missing in panel bug

Some tools would be filtered out from the tool panel needlessly
when organizing the `ToolPanel` in `Panels/utilities.ts`.
This commit is contained in:
Ahmed Awan
2023-12-14 23:35:33 +05:00
parent 1fd9cf33c0
commit 54865cebaa
2 changed files with 2 additions and 11 deletions
+1 -10
View File
@@ -158,22 +158,13 @@ export function getValidToolsInCurrentView(
isWorkflowPanel = false,
excludedSectionIds: string[] = []
) {
const addedToolTexts: string[] = [];
const toolEntries = Object.entries(toolsById).filter(([, tool]) => {
// filter out duplicate tools (different ids, same exact name+description)
// related ticket: https://github.com/galaxyproject/galaxy/issues/16145
const toolText = tool.name + tool.description;
if (addedToolTexts.includes(toolText)) {
return false;
} else {
addedToolTexts.push(toolText);
}
// filter on non-hidden, non-disabled, and workflow compatibile (based on props.workflow)
return (
!tool.hidden &&
tool.disabled !== true &&
!(isWorkflowPanel && !tool.is_workflow_compatible) &&
!excludedSectionIds.includes(tool.panel_section_id || "")
!excludedSectionIds.includes(tool.panel_section_id)
);
});
return Object.fromEntries(toolEntries);
+1 -1
View File
@@ -27,7 +27,7 @@ export interface Tool {
link: string;
min_width: number;
target: string;
panel_section_id: string | null;
panel_section_id: string;
panel_section_name: string | null;
form_style: string;
disabled?: boolean;