From 18300ad130116b48e68e2bfd48e1f1c59fc1ec1a Mon Sep 17 00:00:00 2001 From: Oliver Bryan Date: Sat, 31 Jan 2026 15:19:02 +0000 Subject: [PATCH] scrollabe issue table --- .../frontend/src/components/issues-table.tsx | 276 +++++++++--------- packages/frontend/src/pages/Issues.tsx | 16 +- 2 files changed, 147 insertions(+), 145 deletions(-) diff --git a/packages/frontend/src/components/issues-table.tsx b/packages/frontend/src/components/issues-table.tsx index 65cde89..79d5c41 100644 --- a/packages/frontend/src/components/issues-table.tsx +++ b/packages/frontend/src/components/issues-table.tsx @@ -3,7 +3,6 @@ import Avatar from "@/components/avatar"; import { useSelection } from "@/components/selection-provider"; import StatusTag from "@/components/status-tag"; import Icon, { type IconName } from "@/components/ui/icon"; -import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table"; import { useIssues, useSelectedOrganisation, useSelectedProject } from "@/lib/query/hooks"; import { cn } from "@/lib/utils"; @@ -155,144 +154,149 @@ export function IssuesTable({ const showAssignee = columns.assignee == null || columns.assignee === true; return ( - - - - {showId && ( - - ID - - )} - {showTitle && Title} - {showDescription && ( - Description - )} - {/* below is kept blank to fill the space, used as the "Assignee" column */} - {showAssignee && } - - - - {issues.map((issueData) => { - const isSelected = issueData.Issue.id === selectedIssueId; - return ( - { - if (isSelected) { - selectIssue(null); - return; - } - selectIssue(issueData); - }} - > - {showId && ( - - +
+ + + {showId && ( + + )} + {showTitle && ( + + )} + {showDescription && ( + + )} + {showAssignee && } + + + + {issues.map((issueData) => { + const isSelected = issueData.Issue.id === selectedIssueId; + return ( + { + if (isSelected) { + selectIssue(null); + return; + } + selectIssue(issueData); + }} + > + {showId && ( + + )} + {showTitle && ( + + )} + {showDescription && ( + + )} + {showAssignee && ( +
+ ID + Title + Description +
- {issueData.Issue.number.toString().padStart(3, "0")} - - - )} - {showTitle && ( - - + {issueData.Issue.number.toString().padStart(3, "0")} + + - {selectedOrganisation?.Organisation.features.issueTypes && - issueTypes[issueData.Issue.type] && ( - - )} - {selectedOrganisation?.Organisation.features.issueStatus && - (columns.status == null || columns.status === true) && ( - - )} - {issueData.Issue.title} - - - )} - {showDescription && ( - - + {selectedOrganisation?.Organisation.features.issueTypes && + issueTypes[issueData.Issue.type] && ( + + )} + {selectedOrganisation?.Organisation.features.issueStatus && + (columns.status == null || columns.status === true) && ( + + )} + {issueData.Issue.title} + + - {issueData.Issue.description} - - - )} - {showAssignee && ( - - + {issueData.Issue.description} + + - {selectedOrganisation?.Organisation.features.issueAssigneesShownInTable && - issueData.Assignees && - issueData.Assignees.length > 0 && ( -
- {issueData.Assignees.slice(0, 3).map((assignee) => ( - - ))} - {issueData.Assignees.length > 3 && ( - - +{issueData.Assignees.length - 3} - - )} -
- )} - - - )} - - ); - })} - -
+ + {selectedOrganisation?.Organisation.features.issueAssigneesShownInTable && + issueData.Assignees && + issueData.Assignees.length > 0 && ( +
+ {issueData.Assignees.slice(0, 3).map((assignee) => ( + + ))} + {issueData.Assignees.length > 3 && ( + + +{issueData.Assignees.length - 3} + + )} +
+ )} +
+ + )} + + ); + })} + + + ); } diff --git a/packages/frontend/src/pages/Issues.tsx b/packages/frontend/src/pages/Issues.tsx index 7645a4a..aeac8e6 100644 --- a/packages/frontend/src/pages/Issues.tsx +++ b/packages/frontend/src/pages/Issues.tsx @@ -667,15 +667,13 @@ export default function Issues() { {selectedOrganisationId && selectedProjectId && issuesData.length > 0 && ( - -
- -
+ + {selectedIssue && !showIssueModal && (