Skip to content

Commit a8ddfa2

Browse files
talissoncostaclaude
andcommitted
fix(dependencies): keep the staged chip visible beside a long name
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
1 parent 7944b0c commit a8ddfa2

2 files changed

Lines changed: 36 additions & 20 deletions

File tree

‎frontend/web/components/modals/create-feature/tabs/FeatureDependenciesTab/PrerequisitesTable/PrerequisitesTable.scss‎

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,18 @@
1515
background: var(--color-surface-muted);
1616
}
1717

18-
// Held for a change request: still listed, but on its way out.
19-
.prerequisite-row--staged-remove .btn-link {
18+
// A button only shrinks below its text with a min width.
19+
.prerequisite-name > .btn {
20+
min-width: 0;
21+
}
22+
23+
// Held for a change request: still listed, but on its way out. On the inner
24+
// span, as .btn-link clears text-decoration with !important.
25+
.prerequisite-row--staged-remove .prerequisite-name .btn-link {
2026
color: var(--color-text-secondary);
27+
}
28+
29+
.prerequisite-row--staged-remove .prerequisite-name__text {
2130
text-decoration: line-through;
2231
}
2332

‎frontend/web/components/modals/create-feature/tabs/FeatureDependenciesTab/PrerequisitesTable/PrerequisitesTable.tsx‎

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -121,25 +121,32 @@ const PrerequisitesTable: FC<PrerequisitesTableProps> = ({
121121
onClick={() => onSelect(edge)}
122122
pending={isRemoving === edge.prerequisite.id}
123123
>
124-
<TableCell className='font-weight-medium text-truncate'>
125-
<Button
126-
theme='text'
127-
onClick={(e: MouseEvent) => {
128-
e.stopPropagation()
129-
onSelect(edge)
130-
}}
131-
>
132-
{edge.prerequisite.name}
133-
</Button>
134-
{!!staged && (
135-
<Chip
136-
size='xs'
137-
variant={staged === 'add' ? 'accent' : 'neutral'}
138-
className='ms-2'
124+
<TableCell className='font-weight-medium'>
125+
{/* The name gives way to the chip, so a long name cannot hide
126+
what is about to happen to it. */}
127+
<div className='prerequisite-name d-flex align-items-center gap-2'>
128+
<Button
129+
theme='text'
130+
className='text-truncate'
131+
onClick={(e: MouseEvent) => {
132+
e.stopPropagation()
133+
onSelect(edge)
134+
}}
139135
>
140-
{staged === 'add' ? 'Staged: add' : 'Staged: remove'}
141-
</Chip>
142-
)}
136+
<span className='prerequisite-name__text'>
137+
{edge.prerequisite.name}
138+
</span>
139+
</Button>
140+
{!!staged && (
141+
<Chip
142+
size='xs'
143+
variant={staged === 'add' ? 'accent' : 'neutral'}
144+
className='flex-shrink-0'
145+
>
146+
{staged === 'add' ? 'Staged: add' : 'Staged: remove'}
147+
</Chip>
148+
)}
149+
</div>
143150
</TableCell>
144151
<TableCell>
145152
<StateToggle isEnabled={isEnabled} />

0 commit comments

Comments
 (0)