From 001a75d44636929067335aab1d06681f3116b705 Mon Sep 17 00:00:00 2001 From: Ernest Badu <55922827+Ernxst@users.noreply.github.com> Date: Fri, 2 Oct 2026 22:23:12 +0100 Subject: [PATCH 1/2] Report virtual list range after data changes --- .changeset/virtual-list-range.md | 6 + README.md | 6 + packages/native/src/renderer.rs | 233 +++++++++++++++++- .../src/__tests__/instance-scroll.test.tsx | 37 +++ ...virtual-list-focus-window-advance.test.tsx | 7 +- .../react/src/__tests__/virtual-list.test.tsx | 229 +++++++++++++++++ packages/react/src/testing.ts | 4 + skills/gpuix/references/elements.md | 2 +- 8 files changed, 513 insertions(+), 11 deletions(-) create mode 100644 .changeset/virtual-list-range.md diff --git a/.changeset/virtual-list-range.md b/.changeset/virtual-list-range.md new file mode 100644 index 00000000..ffda5b24 --- /dev/null +++ b/.changeset/virtual-list-range.md @@ -0,0 +1,6 @@ +--- +"@gpuix/native": patch +"@gpuix/react": patch +--- + +Report virtual-list visible-range changes after data and layout updates. diff --git a/README.md b/README.md index 78299339..a9cd5952 100644 --- a/README.md +++ b/README.md @@ -2230,6 +2230,12 @@ function MessageList({ messages }: { messages: Message[] }) { } ``` +`onVisibleRange` runs when the visible logical range changes, including after +the item count, mounted window, row-height estimate, or viewport size changes. +It does not run again when an update leaves the range unchanged. For example, +shrinking a list while scrolled near its end clamps the scroll position and +reports the new range so a windowed list can mount the rows now in view. + `role` and ARIA props on `` project an accessibility node exactly as they do on a `
`. Use `role="list"` on the list and `role="listitem"` on its rows to match the react-dom equivalent of `