Skip to content

Commit fe5402a

Browse files
authored
fix: truncate workspace selector (#715)
1 parent c436c2e commit fe5402a

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workspace-selector/workspace-selector.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,14 +139,18 @@ export function WorkspaceSelector({
139139
<div className='flex h-full min-w-0 flex-1 items-center text-left'>
140140
<span
141141
className={cn(
142-
'truncate font-medium text-sm',
142+
'flex-1 truncate font-medium text-sm',
143143
activeWorkspace?.id === workspace.id ? 'text-foreground' : 'text-muted-foreground'
144144
)}
145+
style={{ maxWidth: '168px' }}
145146
>
146147
{workspace.name}
147148
</span>
148149
</div>
149-
<div className='flex h-full w-6 flex-shrink-0 items-center justify-center'>
150+
<div
151+
className='flex h-full items-center justify-center'
152+
onClick={(e) => e.stopPropagation()}
153+
>
150154
{hoveredWorkspaceId === workspace.id && (
151155
<>
152156
{/* Leave Workspace - for non-admin users */}

apps/sim/app/workspace/[workspaceId]/w/components/sidebar/sidebar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,7 @@ export function Sidebar() {
764764
className='flex h-12 w-full cursor-pointer items-center gap-2 rounded-[14px] border bg-card pr-[10px] pl-3 shadow-xs transition-colors hover:bg-muted/50'
765765
>
766766
<Search className='h-4 w-4 text-muted-foreground' strokeWidth={2} />
767-
<span className='flex h-8 flex-1 items-center px-0 font-[350] text-muted-foreground text-sm leading-none'>
767+
<span className='flex h-8 flex-1 items-center px-0 text-muted-foreground text-sm leading-none'>
768768
Search anything
769769
</span>
770770
<kbd className='flex h-6 w-8 items-center justify-center rounded-[5px] border border-border bg-background font-mono text-[#CDCDCD] text-xs dark:text-[#454545]'>

0 commit comments

Comments
 (0)