Skip to content

Commit

Permalink
Merge pull request #1499 from Shelf-nu/small-sidebar-fix
Browse files Browse the repository at this point in the history
fix: overflow with too long org name in org selector on sidebar
  • Loading branch information
DonKoko authored Dec 10, 2024
2 parents e76a441 + d0a1429 commit b761af7
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions app/components/layout/sidebar/organization-selector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export default function OrganizationSelector() {
<DropdownMenuTrigger disabled={isSwitchingOrg} asChild>
<SidebarMenuButton
className={tw(
"size-full justify-center !p-1 data-[state=open]:bg-gray-50 data-[state=open]:text-sidebar-accent-foreground hover:bg-gray-50",
"size-full truncate !p-1 data-[state=open]:bg-gray-50 data-[state=open]:text-sidebar-accent-foreground hover:bg-gray-50",
open || openMobile ? "border" : ""
)}
>
Expand All @@ -91,8 +91,11 @@ export default function OrganizationSelector() {

<When truthy={open || openMobile}>
<>
<div className="flex-1 text-left text-sm leading-tight">
<span className="truncate font-semibold">
<div
className="max-w-[calc(100%-36px)] flex-1 text-left text-sm leading-tight"
title={currentOrganization.name}
>
<span className="block max-w-full truncate font-semibold">
{currentOrganization.name}
</span>
</div>
Expand Down

0 comments on commit b761af7

Please sign in to comment.