Skip to content

Commit bbca400

Browse files
committed
fix(ui): truncate organization name properly in sidebar without clipping descenders
1 parent 03cdd00 commit bbca400

1 file changed

Lines changed: 8 additions & 9 deletions

File tree

‎apps/dokploy/components/layouts/side.tsx‎

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ function SidebarLogo() {
616616
)}
617617
>
618618
{/* Organization Logo and Selector */}
619-
<SidebarMenuItem className={"w-full"}>
619+
<SidebarMenuItem className={"w-full min-w-0"}>
620620
<Popover
621621
open={organizationSelectorOpen}
622622
onOpenChange={setOrganizationSelectorOpen}
@@ -632,14 +632,13 @@ function SidebarLogo() {
632632
>
633633
<div
634634
className={cn(
635-
"flex items-center gap-2",
635+
"flex min-w-0 flex-1 items-center gap-2",
636636
isCollapsed && "justify-center",
637637
)}
638638
>
639639
<div
640640
className={cn(
641-
"flex items-center justify-center rounded-sm border",
642-
"size-6",
641+
"flex size-6 shrink-0 items-center justify-center rounded-sm border",
643642
)}
644643
>
645644
<Logo
@@ -652,22 +651,22 @@ function SidebarLogo() {
652651
</div>
653652
<div
654653
className={cn(
655-
"flex flex-col items-start",
654+
"flex flex-col items-start min-w-0 flex-1",
656655
isCollapsed && "hidden",
657656
)}
658657
>
659-
<div className="flex items-center gap-1.5">
660-
<p className="text-sm font-medium leading-none">
658+
<div className="flex items-center gap-1.5 min-w-0 w-full">
659+
<p className="text-sm font-medium truncate">
661660
{activeOrganization?.name ?? "Select Organization"}
662661
</p>
663662
{haveValidLicense && (
664-
<Badge variant="blue">Enterprise</Badge>
663+
<Badge variant="blue" className="shrink-0">Enterprise</Badge>
665664
)}
666665
</div>
667666
</div>
668667
</div>
669668
<ChevronsUpDown
670-
className={cn("ml-auto", isCollapsed && "hidden")}
669+
className={cn("ml-auto shrink-0", isCollapsed && "hidden")}
671670
/>
672671
</SidebarMenuButton>
673672
</PopoverTrigger>

0 commit comments

Comments
 (0)