Skip to content

Commit 8092862

Browse files
Keep long outcome names inside their chip in project setup
The outcome chips were locked to a fixed 24px height with vertically centred content, so a name that wrapped to a second line rendered outside the rounded border. They now size to their content and align the remove button with the first line. Claude-Session: https://claude.ai/code/session_01H77BMkZ9GhK8D98TG4cpTg
1 parent dc1117c commit 8092862

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

packages/web/src/components/project/setup/ProjectSetupCard.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,18 +150,18 @@ function OutcomesBody({ setup }: { setup: Setup }) {
150150
'Reviewers pick from this list when they start a RoB 2 or ROBINS-I checklist.'
151151
: 'Only needed for RoB 2 or ROBINS-I. Safe to skip for now.'}
152152
</p>
153-
<div className='flex flex-wrap items-center gap-1'>
153+
<div className='flex flex-wrap items-start gap-1'>
154154
{setup.outcomes.map(outcome => (
155155
<span
156156
key={outcome.id}
157-
className='border-border bg-muted/50 inline-flex h-6 items-center gap-1 rounded-md border pr-1 pl-2 text-xs font-medium'
157+
className='border-border bg-muted/50 inline-flex max-w-full items-start gap-1 rounded-md border py-1 pr-1 pl-2 text-xs font-medium'
158158
>
159-
{outcome.name}
159+
<span className='min-w-0 break-words'>{outcome.name}</span>
160160
<button
161161
type='button'
162162
aria-label={`Remove ${outcome.name}`}
163163
onClick={() => remove(outcome.id)}
164-
className='text-muted-foreground hover:bg-border hover:text-foreground flex size-4 items-center justify-center rounded-sm'
164+
className='text-muted-foreground hover:bg-border hover:text-foreground flex size-4 shrink-0 items-center justify-center rounded-sm'
165165
>
166166
<XIcon className='size-2.5' strokeWidth={2.5} />
167167
</button>

0 commit comments

Comments
 (0)