mirror of
https://github.com/supabase/supabase.git
synced 2026-05-25 13:13:51 +08:00
## Context When opening the logs detail panel, some of the fields can be clicked to add them as a filter. However the existing UX is that the clickable part is just the text which makes it target small <img width="233" height="127" alt="image" src="https://github.com/user-attachments/assets/1d876bcc-05cf-464c-bdbe-907229be0586" /> Am opting the following: - Make the whole row clickable - Make all rows clickable with the main action being "Copy {column}" - Only filterable columns will have the option to "Add as filter" ### After <img width="483" height="153" alt="image" src="https://github.com/user-attachments/assets/9d6e5479-fdbb-4609-839c-2bb7ad571b57" /> <img width="473" height="152" alt="image" src="https://github.com/user-attachments/assets/f22197df-fa59-4e01-be00-2557260374f8" /> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Row actions now consistently wrap rows and show a filter icon next to the label when a resolved filter is available; copy menu displays "Copy {label}". * **Style** * Standardized icon sizes and adjusted dropdown/row spacing; simplified text wrap/truncate behavior for field values; minor status text color refinement. * **Bug Fixes** * Dropdown row-action rendering made more robust to ensure menu wrappers render reliably. <!-- review_stack_entry_start --> [](https://app.coderabbit.ai/change-stack/supabase/supabase/pull/45936) <!-- review_stack_entry_end --> <!-- end of auto-generated comment: release notes by coderabbit.ai -->
35 lines
702 B
TypeScript
35 lines
702 B
TypeScript
import { Minus } from 'lucide-react'
|
|
import { cn } from 'ui'
|
|
|
|
import { getStatusColor } from '../DataTable.utils'
|
|
|
|
export const DataTableColumnStatusCode = ({
|
|
value,
|
|
level,
|
|
className,
|
|
}: {
|
|
value?: number | string
|
|
level?: string
|
|
className?: string
|
|
}) => {
|
|
const colors = getStatusColor(level)
|
|
if (!value) {
|
|
return <Minus className="h-4 w-4 text-muted-foreground/50" />
|
|
}
|
|
|
|
return (
|
|
<div className={cn('flex items-center relative', className)}>
|
|
<div
|
|
className={cn(
|
|
'flex items-center justify-center relative font-mono',
|
|
colors.text,
|
|
colors.bg,
|
|
colors.border
|
|
)}
|
|
>
|
|
{value}
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|