fix(duplicates): reserve 160px row height so thumbnails don't shift on load
The group grid only pinned column width; rows defaulted to auto height, so each cell collapsed to the size of its still-empty <img> and snapped to 160px once the thumbnail arrived — visible layout jump, plus the virtualizer re-measured every group on image load. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -386,8 +386,12 @@ const DuplicateGroupSection = memo(function DuplicateGroupSection({
|
|||||||
ref={gridRef}
|
ref={gridRef}
|
||||||
className="grid gap-1 p-2"
|
className="grid gap-1 p-2"
|
||||||
style={{
|
style={{
|
||||||
gridTemplateColumns:
|
// Fix both axes so each cell reserves a 160×160 box before
|
||||||
'repeat(auto-fill, 160px)',
|
// its thumbnail finishes loading — otherwise rows collapse to
|
||||||
|
// the height of an empty <img> and jump when images arrive,
|
||||||
|
// which also throws off the virtualizer's row-height measure.
|
||||||
|
gridTemplateColumns: 'repeat(auto-fill, 160px)',
|
||||||
|
gridAutoRows: '160px',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{group.members.map((member) => {
|
{group.members.map((member) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user