Skip to content

Commit 871c7b7

Browse files
authored
fix(web): truncate project names only when needed (pingdotgg#17208)
1 parent 7241e7e commit 871c7b7

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,8 @@ export function DraftHeroHeadline({
253253
<ComboboxTrigger
254254
render={<InlineButton tone="picker" />}
255255
data-draft-project-trigger=""
256-
className="pointer-events-auto max-w-64 align-baseline"
256+
// Leaves room for the trailing "?" so a truncated name keeps it on its line.
257+
className="pointer-events-auto max-w-[calc(100%-1em)] align-baseline"
257258
/>
258259
}
259260
>
@@ -354,7 +355,9 @@ export function DraftHeroHeadline({
354355
{isScratchDraft ? (
355356
<>What should we work on?</>
356357
) : hasResolvedProject ? (
357-
<>What should we build in {projectSelector}?</>
358+
<>
359+
What should we build in <span className="whitespace-nowrap">{projectSelector}?</span>
360+
</>
358361
) : canChooseProject ? (
359362
<>{projectSelector} to start</>
360363
) : (

0 commit comments

Comments
 (0)