Skip to content

Commit 64556f4

Browse files
committed
feat(Card): display two lines of bug title before truncating
1 parent a123ac0 commit 64556f4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/components/Board/Card.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ describe('Card', () => {
314314
})
315315

316316
describe('truncation', () => {
317-
it('should truncate long summaries', () => {
317+
it('should clamp long summaries to two lines', () => {
318318
const longSummaryBug = {
319319
...mockBug,
320320
summary:
@@ -323,7 +323,7 @@ describe('Card', () => {
323323
render(<Card bug={longSummaryBug} />)
324324

325325
const summary = screen.getByText(longSummaryBug.summary)
326-
expect(summary.className).toContain('truncate')
326+
expect(summary.className).toContain('line-clamp-2')
327327
})
328328

329329
it('should show full summary in tooltip on hover', () => {

src/components/Board/Card.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ export function Card({
278278
</div>
279279

280280
{/* Summary */}
281-
<p className="mb-3 truncate text-sm font-medium text-text-primary" title={bug.summary}>
281+
<p className="mb-3 line-clamp-2 text-sm font-medium text-text-primary" title={bug.summary}>
282282
{bug.summary}
283283
</p>
284284

0 commit comments

Comments
 (0)