Skip to content

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

fix: Delay between Hover (#18717)

Denzil Samuel1d06fc9f2ed0
diff --git a/studio/components/interfaces/Database/Tables/TableList.tsx b/studio/components/interfaces/Database/Tables/TableList.tsx
index 95985d1b08a..7be0c821889 100644
--- a/studio/components/interfaces/Database/Tables/TableList.tsx
+++ b/studio/components/interfaces/Database/Tables/TableList.tsx
@@ -201,7 +201,32 @@ const TableList = ({
tables.map((x: any, i: any) => (
<Table.tr key={x.id}>
<Table.td>
- <p title={x.name}>{x.name}</p>
+ {/* only show tooltips if required, to reduce noise */}
+ {x.name.length > 20 ? (
+ <Tooltip.Root delayDuration={0} disableHoverableContent={true}>
+ <Tooltip.Trigger
+ asChild
+ className="max-w-[95%] overflow-hidden text-ellipsis whitespace-nowrap"
+ >
+ <p>{x.name}</p>
+ </Tooltip.Trigger>
+ <Tooltip.Portal>
+ <Tooltip.Content side="bottom">
+ <Tooltip.Arrow className="radix-tooltip-arrow" />
+ <div
+ className={[
+ 'rounded bg-scale-100 py-1 px-2 leading-none shadow',
+ 'border border-scale-200',
+ ].join(' ')}
+ >
+ <span className="text-xs text-foreground">{x.name}</span>
+ </div>
+ </Tooltip.Content>
+ </Tooltip.Portal>
+ </Tooltip.Root>
+ ) : (
+ <p>{x.name}</p>
+ )}
</Table.td>
<Table.td className="hidden max-w-sm truncate lg:table-cell break-all whitespace-normal">
{x.comment !== null ? (