Skip to content

Commit 74dfbb6

Browse files
authored
fix(web): composer banner titles truncate beside their icon instead of wrapping (pingdotgg#17699)
Co-authored-by: maria-rcks <[email protected]>
1 parent 818e2be commit 74dfbb6

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎apps/web/src/components/chat/ComposerBanner.tsx‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,9 @@ function Row({
201201
"not-has-[>[data-slot=composer-banner-actions]]:grid-cols-[var(--composer-banner-icon-column)_minmax(0,1fr)]",
202202
"[&:is(button)]:cursor-pointer [&:is(button)]:rounded-md [&:is(button)]:focus-visible:outline-2 [&:is(button)]:focus-visible:-outline-offset-2 [&:is(button)]:focus-visible:outline-ring",
203203
// Actions share the title row while the title fits and move below it otherwise.
204-
layout === "wrap-actions" && "flex flex-wrap *:data-[slot=composer-banner-content]:grow",
204+
// The content's max width keeps it beside the icon, so a long title truncates instead of wrapping.
205+
layout === "wrap-actions" &&
206+
"flex flex-wrap *:data-[slot=composer-banner-content]:max-w-[calc(100%-var(--composer-banner-icon-column)-var(--spacing))] *:data-[slot=composer-banner-content]:grow",
205207
layout === "approval" && "items-start gap-x-2 gap-y-3",
206208
className,
207209
),

0 commit comments

Comments
 (0)