Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[23.2] Fix tools missing in panel bug #17192

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions client/src/components/Panels/utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion client/src/stores/toolStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Loading