Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Add floating label for truncated column names

Kamil Ogórekaa7338238d52
diff --git a/studio/components/interfaces/Database/Schemas/SchemaGraph.tsx b/studio/components/interfaces/Database/Schemas/SchemaGraph.tsx
index 9124ae89f4e..8e1848854ed 100644
--- a/studio/components/interfaces/Database/Schemas/SchemaGraph.tsx
+++ b/studio/components/interfaces/Database/Schemas/SchemaGraph.tsx
@@ -230,8 +230,16 @@ function TableNode({ data, targetPosition, sourcePosition }: NodeProps<TableNode
>
<span
className={clsx(
- column.isPrimary ? 'border-l-2 border-l-brand-900 pl-[6px] pr-2' : 'px-2',
- 'text-ellipsis overflow-hidden whitespace-nowrap'
+ column.isPrimary && 'border-l-2 border-l-brand-900 pl-[6px] pr-2',
+ 'pl-2 text-ellipsis overflow-hidden whitespace-nowrap'
+ )}
+ >
+ {column.name}
+ </span>
+ <span
+ className={clsx(
+ column.isPrimary && 'ml-[2px] pl-[6px]',
+ 'absolute top-0 left-0 right-0 pl-2 bg-scale-500 text-ellipsis overflow-hidden whitespace-nowrap opacity-0 hover:opacity-100'
)}
>
{column.name}