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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user