Give tiles a minimum area rather than a minimum width and height (#2513)

This seems to result in more sensible cropping and allocation of space across the board, in my testing.
This commit is contained in:
Robin
2024-07-26 06:50:44 -04:00
committed by GitHub
parent d062871f41
commit 3b38a5322c
2 changed files with 16 additions and 21 deletions

View File

@@ -75,7 +75,9 @@ export const makeSpotlightPortraitLayout: CallLayout<
const { width } = useObservableEagerState(minBounds);
const { gap, tileWidth, tileHeight } = arrangeTiles(
width,
0,
// TODO: We pretend that the minimum height is the width, because the
// actual minimum height is difficult to calculate
width,
model.grid.length,
);
const tileModels: GridTileModel[] = useMemo(