Skip to content

Commit 782bb4e

Browse files
authored
Merge pull request #5287 from imrja8/fix/sidebar-truncation
fix(ui): truncate organization name properly in sidebar without clipp…
2 parents f4e1154 + d1fda63 commit 782bb4e

1 file changed

Lines changed: 10 additions & 9 deletions

File tree

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

Lines changed: 10 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,24 @@ 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">
664+
Enterprise
665+
</Badge>
665666
)}
666667
</div>
667668
</div>
668669
</div>
669670
<ChevronsUpDown
670-
className={cn("ml-auto", isCollapsed && "hidden")}
671+
className={cn("ml-auto shrink-0", isCollapsed && "hidden")}
671672
/>
672673
</SidebarMenuButton>
673674
</PopoverTrigger>

0 commit comments

Comments
 (0)