refactor(web): update issue config to use icon-based status and bar-based priority

Replace dotColor with iconColor for status, replace shortLabel with
bars count for priority indicators to match Linear's visual style.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Jiayuan Zhang 2026-03-21 14:23:44 +08:00
parent da7a45e15d
commit 931ca53b17

View file

@ -69,26 +69,26 @@ export const STATUS_ORDER: IssueStatus[] = [
export const STATUS_CONFIG: Record<
IssueStatus,
{ label: string; color: string; dotColor: string }
{ label: string; iconColor: string }
> = {
backlog: { label: "Backlog", color: "text-muted-foreground", dotColor: "bg-muted-foreground" },
todo: { label: "Todo", color: "text-blue-600", dotColor: "bg-blue-500" },
in_progress: { label: "In Progress", color: "text-yellow-600", dotColor: "bg-yellow-500" },
in_review: { label: "In Review", color: "text-purple-600", dotColor: "bg-purple-500" },
done: { label: "Done", color: "text-green-600", dotColor: "bg-green-500" },
blocked: { label: "Blocked", color: "text-red-600", dotColor: "bg-red-500" },
cancelled: { label: "Cancelled", color: "text-muted-foreground", dotColor: "bg-muted-foreground/40" },
backlog: { label: "Backlog", iconColor: "text-muted-foreground" },
todo: { label: "Todo", iconColor: "text-muted-foreground" },
in_progress: { label: "In Progress", iconColor: "text-yellow-500" },
in_review: { label: "In Review", iconColor: "text-blue-500" },
done: { label: "Done", iconColor: "text-green-500" },
blocked: { label: "Blocked", iconColor: "text-red-500" },
cancelled: { label: "Cancelled", iconColor: "text-muted-foreground/50" },
};
export const PRIORITY_CONFIG: Record<
IssuePriority,
{ label: string; shortLabel: string; color: string }
{ label: string; bars: number; color: string }
> = {
urgent: { label: "Urgent", shortLabel: "P0", color: "text-red-600" },
high: { label: "High", shortLabel: "P1", color: "text-orange-500" },
medium: { label: "Medium", shortLabel: "P2", color: "text-yellow-500" },
low: { label: "Low", shortLabel: "P3", color: "text-blue-500" },
none: { label: "No priority", shortLabel: "—", color: "text-muted-foreground" },
urgent: { label: "Urgent", bars: 4, color: "text-orange-500" },
high: { label: "High", bars: 3, color: "text-orange-400" },
medium: { label: "Medium", bars: 2, color: "text-yellow-500" },
low: { label: "Low", bars: 1, color: "text-blue-400" },
none: { label: "No priority", bars: 0, color: "text-muted-foreground" },
};
// ---------------------------------------------------------------------------