fix(managers): key the row-layout primary cell + measured rowEst

Self-review follow-ups: the `rows` layout mapped the primary column without a
React key (single-element today, but a warning waiting to happen); wrap it in a
keyed Fragment. Also replace the guessed card/row rowEst with browser-measured
values (176 / 62) so the scrollbar doesn't jump on first scroll.
This commit is contained in:
2026-07-19 21:59:28 +02:00
parent 1703d4ab5e
commit b659ad800c
2 changed files with 10 additions and 3 deletions
+4 -2
View File
@@ -19,9 +19,11 @@ export interface ChannelLayoutSpec {
rowEst: number;
}
// rowEst measured in the browser (cards ~176 at 3 columns, the one-line row ~62) — not guessed; a
// bad estimate makes the scrollbar jump as you first scroll in.
export const CHANNEL_LAYOUT_SPEC: Record<Exclude<ChannelLayout, "table">, ChannelLayoutSpec> = {
cards: { minCol: 300, maxCol: null, rowEst: 210 },
rows: { minCol: null, maxCol: 1100, rowEst: 88 },
cards: { minCol: 300, maxCol: null, rowEst: 176 },
rows: { minCol: null, maxCol: 1100, rowEst: 62 },
};
/** Coerce a stored value to a layout; anything unknown (corrupt, a rolled-back future layout) falls