mirror of
https://github.com/supabase/supabase.git
synced 2026-12-04 15:39:13 +00:00
<img width="1305" height="861" alt="file-4841beec98e7fc8c1c9774747afc79a8" src="https://github.com/user-attachments/assets/5455f835-79d7-4e5f-9e12-b0203019084d" /> Replaces the colored severity dots on Issues with three ascending bars, filled up to the severity in its color: - Critical: three red bars - Warning: two yellow bars - Info: one gray bar Empty bars are neutral gray. The new `SeverityIndicator` component is used everywhere the dot was: the Issues sidebar list, the issue detail header, the overview stat cards, and the Issues card on Project Home. ## How to test 1. Open a project with open issues and go to **Issues**. 2. Check the sidebar list: each row shows bars matching its severity, and the second line stays aligned with the title. 3. Check the overview stat cards: Critical, Warning, and Info each show their bars next to the label. 4. Open an issue and check the bars next to the severity in the header. 5. Go to **Project Home** and check the Issues card. 6. Repeat in light and dark themes. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
38 lines
1.4 KiB
TypeScript
38 lines
1.4 KiB
TypeScript
import { ActivityIcon, GaugeIcon, ShieldIcon, type LucideIcon } from 'lucide-react'
|
|
|
|
import type { IssueCategory, IssueResourceType, IssueSeverity } from '@/data/issues/issue.types'
|
|
|
|
export const ISSUE_SEVERITIES: IssueSeverity[] = ['critical', 'warning', 'info']
|
|
export const ISSUE_CATEGORIES: IssueCategory[] = ['security', 'performance', 'health']
|
|
|
|
export const SEVERITY_LABELS: Record<IssueSeverity, string> = {
|
|
critical: 'Critical',
|
|
warning: 'Warning',
|
|
info: 'Info',
|
|
}
|
|
|
|
export const CATEGORY_LABELS: Record<IssueCategory, string> = {
|
|
security: 'Security',
|
|
performance: 'Performance',
|
|
health: 'Health',
|
|
}
|
|
|
|
export const CATEGORY_ICONS: Record<IssueCategory, LucideIcon> = {
|
|
security: ShieldIcon,
|
|
performance: GaugeIcon,
|
|
health: ActivityIcon,
|
|
}
|
|
|
|
export const RESOURCE_TYPE_NOUNS: Record<IssueResourceType, { one: string; other: string }> = {
|
|
bucket: { one: 'bucket', other: 'buckets' },
|
|
table: { one: 'table', other: 'tables' },
|
|
view: { one: 'view', other: 'views' },
|
|
materialized_view: { one: 'materialized view', other: 'materialized views' },
|
|
foreign_table: { one: 'foreign table', other: 'foreign tables' },
|
|
function: { one: 'function', other: 'functions' },
|
|
extension: { one: 'extension', other: 'extensions' },
|
|
auth: { one: 'Auth setting', other: 'Auth settings' },
|
|
ip_address: { one: 'IP address', other: 'IP addresses' },
|
|
project: { one: 'resource', other: 'resources' },
|
|
}
|