Skip to content

Commit 8a8762f

Browse files
committed
fix(webapp): set min-width on MiddleTruncate component when text is truncated
When text is truncated, apply min-w-[360px] to the MiddleTruncate component to ensure the truncated text has adequate display space. This matches the max-width of the dropdown popup and prevents the component from becoming too narrow. Slack thread: https://triggerdotdev.slack.com/archives/C032WA2S43F/p1769451219774789?thread_ts=1769436524.157219&cid=C032WA2S43F https://claude.ai/code/session_01KrFXrmK7jz9sWTcS8pMtXL
1 parent 92dcd3d commit 8a8762f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,10 @@ export function MiddleTruncate({ text, className }: MiddleTruncateProps) {
122122
}, [calculateTruncation]);
123123

124124
const content = (
125-
<span ref={containerRef} className={cn("block", className)}>
125+
<span
126+
ref={containerRef}
127+
className={cn("block", isTruncated && "min-w-[360px]", className)}
128+
>
126129
{/* Hidden span for measuring text width */}
127130
<span
128131
ref={measureRef}

0 commit comments

Comments
 (0)