diff --git a/webui2/src/components/shared/__snapshots__/status-tabs.test.tsx.snap b/webui2/src/components/shared/__snapshots__/status-tabs.test.tsx.snap index e55762d983c2334eee8d445483a68ab8c9090d99..81024d35b13a24994d14ab1b4a65e2df5ce93ce5 100644 --- a/webui2/src/components/shared/__snapshots__/status-tabs.test.tsx.snap +++ b/webui2/src/components/shared/__snapshots__/status-tabs.test.tsx.snap @@ -10,7 +10,7 @@ exports[`StatusTabs/Default matches snapshot 1`] = ` > 12 @@ -44,7 +44,7 @@ exports[`StatusTabs/Default matches snapshot 1`] = ` > 5 diff --git a/webui2/src/components/shared/status-tabs.tsx b/webui2/src/components/shared/status-tabs.tsx index 39eb9fb5c75705163b54b460fde425006bcb6763..b426113666fd587cfe64b830ce32647ed12a89c3 100644 --- a/webui2/src/components/shared/status-tabs.tsx +++ b/webui2/src/components/shared/status-tabs.tsx @@ -46,21 +46,22 @@ export const Tab: LinkComponent = (props) => { }; interface IndicatorProps { + active?: boolean; className?: string; } -export function OpenIndicator({ className }: IndicatorProps) { +export function OpenIndicator({ active, className }: IndicatorProps) { return ( ); } -export function ClosedIndicator({ className }: IndicatorProps) { +export function ClosedIndicator({ active, className }: IndicatorProps) { return ( ); } @@ -71,7 +72,7 @@ interface CountProps { export function Count({ children }: CountProps) { return ( - + {children} ); diff --git a/webui2/src/routes/$repo/_issues/issues/index.tsx b/webui2/src/routes/$repo/_issues/issues/index.tsx index ccdbf4cb49fc2d93a9660af3b2a597ba24465ae9..ae729fe9673d3190ce41464de0df6ef24c6027b3 100644 --- a/webui2/src/routes/$repo/_issues/issues/index.tsx +++ b/webui2/src/routes/$repo/_issues/issues/index.tsx @@ -1,13 +1,14 @@ import { useReadQuery } from "@apollo/client/react"; import { createFileRoute, Link, useNavigate } from "@tanstack/react-router"; import { formatDistanceToNow } from "date-fns"; -import { CircleDot, CircleCheck, Search } from "lucide-react"; +import { Search } from "lucide-react"; import { useMemo, useState } from "react"; import * as v from "valibot"; import { type BugListQuery, BugListDocument } from "@/__generated__/graphql"; import { IssueFilters } from "@/components/shared/issue-filters"; import * as IssueRow from "@/components/shared/issue-row"; +import * as StatusTabs from "@/components/shared/status-tabs"; import { LabelBadgeLink } from "@/components/shared/label-badge"; import { EmptyState } from "@/components/shared/empty-state"; import * as Pagination from "@/components/shared/pagination"; @@ -17,7 +18,6 @@ import { Button } from "@/components/ui/button"; import { Skeleton } from "@/components/ui/skeleton"; import type { SortValue, StatusFilter } from "@/lib/query-utils"; import { buildBaseQuery, buildQueryString, parseQueryString } from "@/lib/query-utils"; -import { cn } from "@/lib/utils"; const issuesSearchSchema = v.object({ q: v.fallback(v.string(), "status:open"), @@ -182,53 +182,28 @@ function RouteComponent() {
{/* Open / Closed toggle + filter dropdowns */}
-
- + - + Open - - {openCount} - - - - {openCount} + + - + Closed - - {closedCount} - - -
+ {closedCount} + +
{/* Open / Closed toggle */} -
- + - + Open - - {openCount} - - - - {openCount} + + - + Closed - - {closedCount} - - -
+ {closedCount} + + {bugs?.nodes.length === 0 && ( No {statusFilter} issues.