Skip to content

Commit c1eee64

Browse files
msujawsclaude
andcommitted
feat: add distinct accent-staged color for staged items
Introduce a new accent-staged color (#F28F16 orange) to visually distinguish staged changes from selected items. Applied to: - Card border when bug status is staged - Assignee button border when assignee is staged This improves clarity between selection state and pending changes. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 4a2ab79 commit c1eee64

File tree

3 files changed

+34
-5
lines changed

3 files changed

+34
-5
lines changed

src/components/Board/Card.test.tsx

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,20 @@ describe('Card', () => {
224224

225225
expect(screen.getByText(/staged/i)).toBeInTheDocument()
226226
})
227+
228+
it('should show staged border with accent-staged color when status is staged', () => {
229+
const { container } = render(<Card bug={mockBug} isStaged={true} />)
230+
231+
const card = container.firstChild as HTMLElement
232+
expect(card.className).toContain('ring-accent-staged')
233+
})
234+
235+
it('should not show staged border when isStaged is false', () => {
236+
const { container } = render(<Card bug={mockBug} isStaged={false} />)
237+
238+
const card = container.firstChild as HTMLElement
239+
expect(card.className).not.toContain('ring-accent-staged')
240+
})
227241
})
228242

229243
describe('interaction', () => {
@@ -468,7 +482,7 @@ describe('Card', () => {
468482
expect(onClick).not.toHaveBeenCalled()
469483
})
470484

471-
it('should show isAssigneeStaged indicator when assignee is staged', () => {
485+
it('should show isAssigneeStaged indicator with accent-staged border when assignee is staged', () => {
472486
render(
473487
<Card
474488
bug={mockBug}
@@ -478,9 +492,23 @@ describe('Card', () => {
478492
/>,
479493
)
480494

481-
// The person icon button should have a visual indicator
495+
// The person icon button should have accent-staged border
496+
const button = screen.getByLabelText('Change assignee')
497+
expect(button.className).toContain('ring-accent-staged')
498+
})
499+
500+
it('should not show staged border on assignee button when assignee is not staged', () => {
501+
render(
502+
<Card
503+
bug={mockBug}
504+
allAssignees={mockAssignees}
505+
onAssigneeChange={vi.fn()}
506+
isAssigneeStaged={false}
507+
/>,
508+
)
509+
482510
const button = screen.getByLabelText('Change assignee')
483-
expect(button.className).toContain('ring')
511+
expect(button.className).not.toContain('ring-accent-staged')
484512
})
485513

486514
it('should open picker when Space key is pressed on selected card', async () => {

src/components/Board/Card.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ export function Card({
118118
return 'ring-2 ring-accent-primary shadow-xl'
119119
}
120120
if (isStaged) {
121-
return 'ring-2 ring-accent-primary/50'
121+
return 'ring-2 ring-accent-staged'
122122
}
123123
return 'hover:shadow-xl'
124124
}
@@ -192,7 +192,7 @@ export function Card({
192192
aria-label="Change assignee"
193193
onClick={handleAssigneeButtonClick}
194194
className={`flex items-center rounded p-0.5 transition-colors hover:bg-bg-tertiary hover:text-text-primary ${
195-
isAssigneeStaged ? 'ring-2 ring-accent-primary/50' : ''
195+
isAssigneeStaged ? 'ring-2 ring-accent-staged' : ''
196196
}`}
197197
>
198198
<span className="material-icons text-sm">person</span>

tailwind.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export default {
1414
'accent-success': '#10b981',
1515
'accent-error': '#ef4444',
1616
'accent-warning': '#f59e0b',
17+
'accent-staged': '#F28F16',
1718

1819
// Text colors
1920
'text-primary': '#f5f5f5',

0 commit comments

Comments
 (0)