fix(ui): stop the album grid blanking its covers on refresh

Cover takes its height from react-measure, which reports nothing until it
re-measures. That was harmless while the cover class sat on the img itself,
which has intrinsic size; it now sits on the Artwork root, whose img fills it
absolutely and so lends no height. A refresh remounts the tiles, and for the
frame before measurement lands the box collapsed to zero and every cover
vanished.

Give the box its own aspect ratio as a floor. The measured height still wins
once it arrives.
This commit is contained in:
Deluan 2026-07-30 08:59:00 -04:00
parent 3ce4a018e0
commit 97035c4e1c

View File

@ -104,6 +104,9 @@ const useCoverStyles = makeStyles({
display: 'inline-block',
width: '100%',
objectFit: 'contain',
// The image fills this box absolutely, so it lends no height: a remount that has not been
// re-measured yet would collapse the tile and blank the cover for a frame.
aspectRatio: '1',
height: (props) => props.height,
transition: 'opacity 0.3s ease-in-out',
},