Skip to content

Commit f44f90d

Browse files
committed
feat(board): add column-specific empty state messages
Replace generic "No bugs here!" message with unique messages for each column: Backlog bankruptcy, Clean slate, All clear, QE standing by, and Ship it.
1 parent e1a4dc4 commit f44f90d

File tree

5 files changed

+35
-18
lines changed

5 files changed

+35
-18
lines changed

src/components/Board/BacklogSection.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,12 @@ describe('BacklogSection', () => {
8383
describe('empty state', () => {
8484
it('should show empty state when no bugs', () => {
8585
render(<BacklogSection {...defaultProps} bugs={[]} />)
86-
expect(screen.getByText(/No bugs here/)).toBeInTheDocument()
86+
expect(screen.getByText(/Backlog bankruptcy/)).toBeInTheDocument()
8787
})
8888

8989
it('should align empty state towards top', () => {
9090
render(<BacklogSection {...defaultProps} bugs={[]} />)
91-
const emptyState = screen.getByText(/No bugs here/).parentElement
91+
const emptyState = screen.getByText(/Backlog bankruptcy/).parentElement
9292
expect(emptyState).toHaveClass('justify-start')
9393
})
9494
})

src/components/Board/BacklogSection.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,11 +226,11 @@ export function BacklogSection({
226226
<span className="material-icons text-4xl">
227227
{hasActiveFilters ? 'filter_alt_off' : 'celebration'}
228228
</span>
229-
<p className="text-sm">No bugs here! 🎉</p>
229+
<p className="text-sm">Backlog bankruptcy!</p>
230230
{hasActiveFilters ? (
231231
<p className="text-xs">Try adjusting your filters to see more bugs.</p>
232232
) : (
233-
<p className="text-xs">Time to celebrate!</p>
233+
<p className="text-xs">The best kind of bankruptcy.</p>
234234
)}
235235
</div>
236236
)}

src/components/Board/Board.test.tsx

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -380,9 +380,14 @@ describe('Board', () => {
380380
it('should show empty state when no bugs', () => {
381381
render(<Board {...defaultProps} bugs={[]} />)
382382

383-
// 4 board columns + 1 backlog section = 5 empty messages
384-
const emptyMessages = screen.getAllByText(/no bugs here/i)
385-
expect(emptyMessages.length).toBe(5)
383+
// Each column has its own empty state message
384+
// Backlog: "Backlog bankruptcy!", Todo: "Clean slate!", In Progress: "All clear!",
385+
// In Testing: "QE standing by!", Done: "Ship it!"
386+
expect(screen.getByText(/backlog bankruptcy/i)).toBeInTheDocument()
387+
expect(screen.getByText(/clean slate/i)).toBeInTheDocument()
388+
expect(screen.getByText(/all clear/i)).toBeInTheDocument()
389+
expect(screen.getByText(/QE standing by/i)).toBeInTheDocument()
390+
expect(screen.getByText(/ship it/i)).toBeInTheDocument()
386391
})
387392
})
388393

@@ -748,8 +753,12 @@ describe('Board', () => {
748753
fireEvent.keyDown(document, { key: 'ArrowDown' })
749754
fireEvent.keyDown(document, { key: 'Shift' })
750755

751-
// 4 board columns + 1 backlog section = 5 empty messages
752-
expect(screen.getAllByText(/no bugs here/i).length).toBe(5)
756+
// Each column should show its empty state message
757+
expect(screen.getByText(/backlog bankruptcy/i)).toBeInTheDocument()
758+
expect(screen.getByText(/clean slate/i)).toBeInTheDocument()
759+
expect(screen.getByText(/all clear/i)).toBeInTheDocument()
760+
expect(screen.getByText(/QE standing by/i)).toBeInTheDocument()
761+
expect(screen.getByText(/ship it/i)).toBeInTheDocument()
753762
})
754763
})
755764

src/components/Board/Column.test.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -126,19 +126,19 @@ describe('Column', () => {
126126
it('should show empty state when no bugs', () => {
127127
render(<Column {...defaultProps} bugs={[]} />)
128128

129-
expect(screen.getByText(/no bugs here/i)).toBeInTheDocument()
129+
expect(screen.getByText(/backlog bankruptcy/i)).toBeInTheDocument()
130130
})
131131

132-
it('should show playful empty state message', () => {
132+
it('should show column-specific empty state subtitle', () => {
133133
render(<Column {...defaultProps} bugs={[]} />)
134134

135-
expect(screen.getByText(/time to celebrate/i)).toBeInTheDocument()
135+
expect(screen.getByText(/the best kind of bankruptcy/i)).toBeInTheDocument()
136136
})
137137

138138
it('should align empty state towards top of column', () => {
139139
render(<Column {...defaultProps} bugs={[]} />)
140140

141-
const emptyState = screen.getByText(/no bugs here/i).parentElement
141+
const emptyState = screen.getByText(/backlog bankruptcy/i).parentElement
142142
expect(emptyState).toHaveClass('justify-start')
143143
})
144144

@@ -152,14 +152,14 @@ describe('Column', () => {
152152
render(<Column {...defaultProps} bugs={[]} hasActiveFilters={false} />)
153153

154154
expect(screen.queryByText(/try adjusting your filters/i)).not.toBeInTheDocument()
155-
expect(screen.getByText(/no bugs here/i)).toBeInTheDocument()
155+
expect(screen.getByText(/backlog bankruptcy/i)).toBeInTheDocument()
156156
})
157157

158-
it('should show celebration message without filter guidance when filters active but bugs exist', () => {
158+
it('should show bugs without empty state when filters active but bugs exist', () => {
159159
render(<Column {...defaultProps} bugs={mockBugs} hasActiveFilters={true} />)
160160

161161
// Should show bugs, not empty state
162-
expect(screen.queryByText(/no bugs here/i)).not.toBeInTheDocument()
162+
expect(screen.queryByText(/backlog bankruptcy/i)).not.toBeInTheDocument()
163163
expect(screen.queryByText(/try adjusting your filters/i)).not.toBeInTheDocument()
164164
})
165165
})

src/components/Board/Column.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,14 @@ const columnDescriptions: Record<KanbanColumn, string> = {
6464
done: 'Bugs with status RESOLVED/VERIFIED/CLOSED and resolution FIXED (last 2 weeks)',
6565
}
6666

67+
const columnEmptyMessages: Record<KanbanColumn, { title: string; subtitle: string }> = {
68+
backlog: { title: 'Backlog bankruptcy!', subtitle: 'The best kind of bankruptcy.' },
69+
todo: { title: 'Clean slate!', subtitle: 'Nothing planned… yet.' },
70+
'in-progress': { title: 'All clear!', subtitle: 'Keyboards are resting.' },
71+
'in-testing': { title: 'QE standing by!', subtitle: 'Send over some bugz to verify.' },
72+
done: { title: 'Ship it!', subtitle: 'Check back after some bugz are resolved.' },
73+
}
74+
6775
export function Column({
6876
column,
6977
bugs,
@@ -210,11 +218,11 @@ export function Column({
210218
<span className="material-icons text-4xl">
211219
{hasActiveFilters ? 'filter_alt_off' : 'celebration'}
212220
</span>
213-
<p className="text-sm">No bugs here! 🎉</p>
221+
<p className="text-sm">{columnEmptyMessages[column].title}</p>
214222
{hasActiveFilters ? (
215223
<p className="text-xs">Try adjusting your filters to see more bugs.</p>
216224
) : (
217-
<p className="text-xs">Time to celebrate!</p>
225+
<p className="text-xs">{columnEmptyMessages[column].subtitle}</p>
218226
)}
219227
</div>
220228
)}

0 commit comments

Comments
 (0)