Skip to content

Commit b011415

Browse files
committed
feat(webapp): MiddleTruncate to take decent amount of space when possible
min-w-[360px] class allows to keep reasonable spacing when there is only one item on the list
1 parent 3df5767 commit b011415

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

apps/webapp/app/components/primitives/MiddleTruncate.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ export function MiddleTruncate({ text, className }: MiddleTruncateProps) {
141141
const content = (
142142
<span
143143
ref={containerRef}
144-
className={cn("block", isTruncated && "min-w-full", className)}
144+
className={cn("block", isTruncated && "min-w-[360px]", className)}
145145
>
146146
{/* Hidden span for measuring text width */}
147147
<span

apps/webapp/app/components/runs/v3/RunFilters.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,7 @@ function TasksDropdown({
655655
<TaskTriggerSourceIcon source={item.triggerSource} className="size-4 flex-none" />
656656
}
657657
>
658-
<MiddleTruncate text={item.slug} className="min-w-[360px]"/>
658+
<MiddleTruncate text={item.slug}/>
659659
</SelectItem>
660660
))}
661661
</SelectList>

0 commit comments

Comments
 (0)