diff --git a/webui2/src/components/bugs/BugRow.tsx b/webui2/src/components/bugs/BugRow.tsx index 2629af235d74ad3591dbbb41413706d2924f40ae..5d58e1226bfd3f60591ccb5ead0af3b1456eabfd 100644 --- a/webui2/src/components/bugs/BugRow.tsx +++ b/webui2/src/components/bugs/BugRow.tsx @@ -16,11 +16,11 @@ interface BugRowProps { createdAt: string; commentCount: number; repo: string; - onLabelClick?: (name: string) => void; } // Single row in the issue list. Shows status icon, title, labels, author and -// comment count. Labels are clickable to filter the list by that label. +// comment count. +/** @deprecated Use IssueRow composition components instead. */ export function BugRow({ humanId, status, @@ -30,7 +30,6 @@ export function BugRow({ createdAt, commentCount, repo, - onLabelClick, }: BugRowProps) { const isOpen = status === Status.Open; const StatusIcon = isOpen ? CircleDot : CircleCheck; @@ -59,7 +58,6 @@ export function BugRow({ key={label.name} name={label.name} color={label.color} - onClick={onLabelClick} /> ))} diff --git a/webui2/src/routes/$repo/_issues/issues/index.tsx b/webui2/src/routes/$repo/_issues/issues/index.tsx index bba68297461a51604fcea17523da1b2b13f7437e..dcdb301e16b195a9e01c39fbc95636ee4b46874a 100644 --- a/webui2/src/routes/$repo/_issues/issues/index.tsx +++ b/webui2/src/routes/$repo/_issues/issues/index.tsx @@ -1,12 +1,14 @@ import { useReadQuery } from "@apollo/client/react"; import { createFileRoute, Link, useNavigate } from "@tanstack/react-router"; +import { formatDistanceToNow } from "date-fns"; import { CircleDot, CircleCheck, ChevronLeft, ChevronRight } from "lucide-react"; import { useState } from "react"; import * as v from "valibot"; import { type BugListQuery, BugListDocument } from "@/__generated__/graphql"; -import { BugRow } from "@/components/bugs/BugRow"; import { IssueFilters } from "@/components/bugs/IssueFilters"; +import * as IssueRow from "@/components/bugs/IssueRow"; +import { LabelBadgeLink } from "@/components/bugs/LabelBadge"; import type { SortValue } from "@/components/bugs/IssueFilters"; import { QueryInput } from "@/components/bugs/QueryInput"; import { Button } from "@/components/ui/button"; @@ -204,28 +206,55 @@ function RouteComponent() { )} {bugs?.nodes.map((bug) => ( - { - if (!selectedLabels.includes(name)) { - applyFilters( - statusFilter, - [...selectedLabels, name], - selectedAuthorQuery, - parsed.freeText, - ); - } - }} - /> + + +
+ + + {bug.title} + + {bug.labels.map((label) => ( + e.stopPropagation()} + /> + ))} + + + #{bug.humanId} opened{" "} + {formatDistanceToNow(new Date(bug.createdAt), { addSuffix: true })} by{" "} + + {bug.author.displayName} + + +
+ +
))} {totalPages > 1 && (