fix(PBI-79): PBI-rij selecteert weer in A′/B-modus; vinkje is aparte trigger
Voor PBI-79 maakte het hele PBI-kaartje in selectionMode (state A′ én B) de toggle. Daardoor: - klik op rij = bulk-toggle stories (teller liep op); - geen setActivePbi, dus StoryPanel kreeg geen content. Fix: in selectionMode wordt onClick = onSelect (PBI activeren → stories laden) en de tri-state-iconen verhuizen naar een eigen <button> in de actions-slot met stopPropagation. Toggle gedrag (bulk add/remove in B, upsertPbiIntent in A′) blijft ongewijzigd via die knop. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
0c36f4e4a1
commit
8d6fbdfc3d
1 changed files with 23 additions and 9 deletions
|
|
@ -124,7 +124,6 @@ function SortablePbiRow({
|
|||
}
|
||||
|
||||
if (selectionMode) {
|
||||
const isChecked = triState !== 'empty'
|
||||
return (
|
||||
<BacklogCard
|
||||
ref={setNodeRef}
|
||||
|
|
@ -132,24 +131,39 @@ function SortablePbiRow({
|
|||
title={pbi.title}
|
||||
code={pbi.code}
|
||||
priority={pbi.priority}
|
||||
isSelected={isChecked}
|
||||
isSelected={isSelected}
|
||||
role="button"
|
||||
tabIndex={0}
|
||||
aria-pressed={isChecked}
|
||||
onClick={onToggleCheck}
|
||||
onKeyDown={(e: React.KeyboardEvent) => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); onToggleCheck() } }}
|
||||
aria-pressed={isSelected}
|
||||
onClick={onSelect}
|
||||
onKeyDown={(e: React.KeyboardEvent) => {
|
||||
if (e.key === 'Enter' || e.key === ' ') {
|
||||
e.preventDefault()
|
||||
onSelect()
|
||||
}
|
||||
}}
|
||||
badge={
|
||||
<Badge className={cn('text-xs font-normal', PBI_STATUS_COLORS[pbi.status])}>
|
||||
{PBI_STATUS_LABELS[pbi.status]}
|
||||
</Badge>
|
||||
}
|
||||
actions={
|
||||
<div
|
||||
className="inline-flex items-center justify-center min-h-7 min-w-7 text-muted-foreground"
|
||||
aria-hidden="true"
|
||||
<button
|
||||
type="button"
|
||||
onClick={(e) => {
|
||||
e.stopPropagation()
|
||||
onToggleCheck()
|
||||
}}
|
||||
aria-pressed={triState !== 'empty'}
|
||||
aria-label={
|
||||
triState === 'full'
|
||||
? 'Stories uit sprint halen'
|
||||
: 'Stories aan sprint toevoegen'
|
||||
}
|
||||
className="inline-flex items-center justify-center min-h-7 min-w-7 text-muted-foreground hover:text-foreground rounded transition-colors"
|
||||
>
|
||||
<TriStateIcon state={triState} />
|
||||
</div>
|
||||
</button>
|
||||
}
|
||||
/>
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue