Skip to content

Commit 45d92ef

Browse files
committed
fix(web): truncate project names only when needed
The draft heading cut project names off at a fixed width, even when there was enough room to show the whole name. Names now get a whole line before they truncate, and the ? stays with it.
1 parent 12069ee commit 45d92ef

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
@@ -237,7 +237,8 @@ export function DraftHeroHeadline({
237237
<MenuTrigger
238238
render={<InlineButton tone="picker" />}
239239
data-draft-project-trigger=""
240-
className="pointer-events-auto max-w-64 align-baseline"
240+
// Leaves room for the trailing "?" so a truncated name keeps it on its line.
241+
className="pointer-events-auto max-w-[calc(100%-1em)] align-baseline"
241242
/>
242243
}
243244
>
@@ -366,7 +367,9 @@ export function DraftHeroHeadline({
366367
{isScratchDraft ? (
367368
<>What should we work on?</>
368369
) : hasResolvedProject ? (
369-
<>What should we build in {projectSelector}?</>
370+
<>
371+
What should we build in <span className="whitespace-nowrap">{projectSelector}?</span>
372+
</>
370373
) : canChooseProject ? (
371374
<>{projectSelector} to start</>
372375
) : (

0 commit comments

Comments
 (0)