diff --git a/frontend/src/features/media/components/PhotoSelectionList.tsx b/frontend/src/features/media/components/PhotoSelectionList.tsx index d53d795..d2987e8 100644 --- a/frontend/src/features/media/components/PhotoSelectionList.tsx +++ b/frontend/src/features/media/components/PhotoSelectionList.tsx @@ -152,7 +152,8 @@ export function PhotoSelectionList({ items, selection, onSelectionChange, isDisa className={cn('relative overflow-hidden rounded-md border bg-card', selection.has(item.id) && 'ring-2 ring-primary')} data-testid={`photo-row-${item.id}`} > -
{checkbox}
+ {/* flex (not a block with an inline box inside): no line box, so no extra space under the checkbox and equal padding on all four sides */} +
{checkbox}
{thumbnail}
{details}
diff --git a/frontend/src/features/media/pages/MediaLibraryPage.test.tsx b/frontend/src/features/media/pages/MediaLibraryPage.test.tsx index 64662c0..fdcb7d7 100644 --- a/frontend/src/features/media/pages/MediaLibraryPage.test.tsx +++ b/frontend/src/features/media/pages/MediaLibraryPage.test.tsx @@ -295,6 +295,9 @@ describe('MediaLibraryPage', () => { await screen.findByTestId('photo-selection-list'); expect(screen.getByTestId('photo-items')).toHaveAttribute('data-layout', 'tiles'); expect(screen.getByTestId('layout-tiles')).toHaveAttribute('aria-pressed', 'true'); + // The checkbox chip is a flex box with equal padding: no inline line box that would add space under the box. + const chip = screen.getAllByTestId(/^photo-chip-/)[0]!; + expect(chip).toHaveClass('flex', 'p-1'); // Selecting and the bulk bar work on tiles. await userEvent.click(screen.getByRole('checkbox', { name: 'zomer.jpg' }));