@@ -637,7 +637,7 @@ export function SideMenu({
637637 isCollapsed = { isCollapsed }
638638 />
639639 </ div >
640- < CollapsibleElement isCollapsed = { isCollapsed } >
640+ < CollapsibleElement isCollapsed = { isCollapsed } isDragging = { isDragging } >
641641 < AccountMenu isAdmin = { isAdmin } isImpersonating = { user . isImpersonating } />
642642 </ CollapsibleElement >
643643 </ div >
@@ -664,7 +664,11 @@ export function SideMenu({
664664 className = "min-w-0 flex-1"
665665 />
666666 { environment . type === "DEVELOPMENT" && project . engine === "V2" && (
667- < CollapsibleElement isCollapsed = { isCollapsed } className = "shrink-0" >
667+ < CollapsibleElement
668+ isCollapsed = { isCollapsed }
669+ isDragging = { isDragging }
670+ className = "shrink-0"
671+ >
668672 < Dialog >
669673 < TooltipProvider disableHoverableContent = { true } >
670674 < Tooltip >
@@ -1012,6 +1016,7 @@ export function SideMenu({
10121016 >
10131017 < HelpAndAI
10141018 isCollapsed = { isCollapsed }
1019+ isDragging = { isDragging }
10151020 organizationId = { organization . id }
10161021 projectId = { project . id }
10171022 onToggleCollapsed = { handleToggleCollapsed }
@@ -1716,21 +1721,28 @@ function Integrations({ organization }: { organization: MatchedOrganization }) {
17161721 */
17171722function CollapsibleElement ( {
17181723 isCollapsed,
1724+ isDragging = false ,
17191725 children,
17201726 className,
17211727} : {
17221728 isCollapsed : boolean ;
1729+ /**
1730+ * Fade the element out while the menu is being drag-resized. These are the secondary right-hand
1731+ * buttons (account, dev connection); hiding them during a drag stops them from overlapping the
1732+ * primary item on the left as the row narrows.
1733+ */
1734+ isDragging ?: boolean ;
17231735 children : ReactNode ;
17241736 className ?: string ;
17251737} ) {
17261738 return (
17271739 < div
17281740 className = { cn (
1729- "overflow-hidden transition-[max-width] duration-200" ,
1730- isCollapsed ? "max-w-0" : "max-w-[100px]" ,
1741+ "overflow-hidden transition-[max-width,opacity] duration-200" ,
1742+ isCollapsed ? "max-w-0 opacity-0" : "max-w-[100px] opacity-100" ,
1743+ isDragging && "pointer-events-none opacity-0" ,
17311744 className
17321745 ) }
1733- style = { { opacity : "var(--sm-label-opacity, 1)" } }
17341746 >
17351747 { children }
17361748 </ div >
@@ -1762,11 +1774,13 @@ function CollapsibleHeight({
17621774
17631775function HelpAndAI ( {
17641776 isCollapsed,
1777+ isDragging,
17651778 organizationId,
17661779 projectId,
17671780 onToggleCollapsed,
17681781} : {
17691782 isCollapsed : boolean ;
1783+ isDragging : boolean ;
17701784 organizationId : string ;
17711785 projectId : string ;
17721786 onToggleCollapsed : ( ) => void ;
@@ -1785,23 +1799,34 @@ function HelpAndAI({
17851799 organizationId = { organizationId }
17861800 projectId = { projectId }
17871801 />
1788- < CollapseMenuButton isCollapsed = { isCollapsed } onToggle = { onToggleCollapsed } />
1802+ < CollapseMenuButton
1803+ isCollapsed = { isCollapsed }
1804+ isDragging = { isDragging }
1805+ onToggle = { onToggleCollapsed }
1806+ />
17891807 </ div >
17901808 </ LayoutGroup >
17911809 ) ;
17921810}
17931811
17941812function CollapseMenuButton ( {
17951813 isCollapsed,
1814+ isDragging = false ,
17961815 onToggle,
17971816} : {
17981817 isCollapsed : boolean ;
1818+ isDragging ?: boolean ;
17991819 onToggle : ( ) => void ;
18001820} ) {
18011821 const [ isHovering , setIsHovering ] = useState ( false ) ;
18021822
18031823 return (
1804- < div >
1824+ < div
1825+ className = { cn (
1826+ "transition-opacity duration-200" ,
1827+ isDragging && "pointer-events-none opacity-0"
1828+ ) }
1829+ >
18051830 < TooltipProvider disableHoverableContent >
18061831 < Tooltip delayDuration = { isCollapsed ? 0 : 500 } >
18071832 < TooltipTrigger asChild >
0 commit comments