Scrollable support (#12544)

This commit is contained in:
Jacob Richman
2025-11-04 16:21:00 -08:00
committed by GitHub
parent da3da19844
commit 3937461272
17 changed files with 2018 additions and 63 deletions
@@ -0,0 +1,9 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`<Scrollable /> > matches snapshot 1`] = `
"Line 1
Line 2
Line 3
"
`;
@@ -0,0 +1,96 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`<VirtualizedList /> > with 10px height and 100 items > mounts only visible items with 1000 items and 10px height (scroll: +0) 1`] = `
"╭──────────────────────────────────────────────────────────────────────────────────────────────────╮
│Item 0 █│
│ │
│ │
│ │
│ │
│Item 1 │
│ │
│ │
│ │
│ │
│Item 2 │
│ │
│ │
│ │
│ │
│Item 3 │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯"
`;
exports[`<VirtualizedList /> > with 10px height and 100 items > mounts only visible items with 1000 items and 10px height (scroll: 500) 1`] = `
"╭──────────────────────────────────────────────────────────────────────────────────────────────────╮
│Item 500 │
│ │
│ │
│ │
│ │
│Item 501 │
│ │
│ │
│ ▄│
│ ▀│
│Item 502 │
│ │
│ │
│ │
│ │
│Item 503 │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯"
`;
exports[`<VirtualizedList /> > with 10px height and 100 items > mounts only visible items with 1000 items and 10px height (scroll: 999) 1`] = `
"╭──────────────────────────────────────────────────────────────────────────────────────────────────╮
│ │
│ │
│ │
│Item 997 │
│ │
│ │
│ │
│ │
│Item 998 │
│ │
│ │
│ │
│ │
│Item 999 │
│ │
│ │
│ │
│ █│
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯"
`;
exports[`<VirtualizedList /> > with 10px height and 100 items > renders only visible items ('scrolled to bottom') 1`] = `
"╭──────────────────────────────────────────────────────────────────────────────────────────────────╮
│Item 92 │
│Item 93 │
│Item 94 │
│Item 95 │
│Item 96 │
│Item 97 │
│Item 98 │
│Item 99 █│
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯"
`;
exports[`<VirtualizedList /> > with 10px height and 100 items > renders only visible items ('top') 1`] = `
"╭──────────────────────────────────────────────────────────────────────────────────────────────────╮
│Item 0 █│
│Item 1 │
│Item 2 │
│Item 3 │
│Item 4 │
│Item 5 │
│Item 6 │
│Item 7 │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯"
`;