refactor(documents): drop duplicate sender/receiver in list rows
The desktop document-list row showed sender/receiver twice — once side-by-side in the middle column and again stacked in the right column. Stack the middle-column block vertically (the side-by-side grid wasted horizontal space and competed with the larger thumbnail) and remove the now-redundant copy from the right column. The middle-column block keeps the search-match highlighting, which the right-column copy never had. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -117,6 +117,30 @@ describe('DocumentRow – sender', () => {
|
||||
const unknownElements = page.getByText('Unbekannt');
|
||||
await expect.element(unknownElements.first()).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('renders the sender display name only once across the row', async () => {
|
||||
const item = makeItem({
|
||||
document: {
|
||||
...makeItem().document,
|
||||
sender: { id: 's1', displayName: 'Großmutter Maria' }
|
||||
}
|
||||
});
|
||||
render(DocumentRow, { item });
|
||||
const matches = await page.getByText('Großmutter Maria').all();
|
||||
expect(matches.length).toBe(1);
|
||||
});
|
||||
|
||||
it('renders each receiver display name only once across the row', async () => {
|
||||
const item = makeItem({
|
||||
document: {
|
||||
...makeItem().document,
|
||||
receivers: [{ id: 'r1', displayName: 'Onkel Karl' }]
|
||||
}
|
||||
});
|
||||
render(DocumentRow, { item });
|
||||
const matches = await page.getByText('Onkel Karl').all();
|
||||
expect(matches.length).toBe(1);
|
||||
});
|
||||
});
|
||||
|
||||
// ─── Tags ─────────────────────────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user