Skip to content

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

fix: text overflow for menu items should not hide action button

TzeYiing837de6364894
diff --git a/studio/components/layouts/SQLEditorLayout/SQLEditorMenuOld.tsx b/studio/components/layouts/SQLEditorLayout/SQLEditorMenuOld.tsx
index d8a84a53ff2..1f01fc62a04 100644
--- a/studio/components/layouts/SQLEditorLayout/SQLEditorMenuOld.tsx
+++ b/studio/components/layouts/SQLEditorLayout/SQLEditorMenuOld.tsx
@@ -40,6 +40,7 @@ const OpenQueryItem = observer(({ tabInfo }: { tabInfo: any }) => {
name={name}
action={active && <DropdownMenu tabInfo={tabInfo} />}
onClick={() => sqlEditorStore.selectTab(id)}
+ textClassName="w-44"
/>
)
})
diff --git a/studio/components/ui/ProductMenu/ProductMenuItem.tsx b/studio/components/ui/ProductMenu/ProductMenuItem.tsx
index 52b590104f2..db1090ecb59 100644
--- a/studio/components/ui/ProductMenu/ProductMenuItem.tsx
+++ b/studio/components/ui/ProductMenu/ProductMenuItem.tsx
@@ -10,6 +10,7 @@ interface Props {
url?: string
target?: '_blank' | '_self'
onClick?: () => void
+ textClassName?: string
}
const ProductMenuItem: FC<Props> = ({
@@ -20,11 +21,14 @@ const ProductMenuItem: FC<Props> = ({
url = '',
target = '_self',
onClick,
+ textClassName = '',
}) => {
const menuItem = (
<Menu.Item icon={icon} rounded active={isActive} onClick={onClick}>
<div className="flex w-full justify-between">
- <Typography.Text className="truncate flex items-center">{name}</Typography.Text>
+ <span className={'truncate flex items-center ' + textClassName}>
+ {name}
+ </span>
{action}
</div>
</Menu.Item>