Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions HACKING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@ There are a number of subtle features that need to be tested manually on each re

## Settling

`zero-virtual` supports the concept of *settling*. The scroller "settles" when there's been no scrolling OR change in the `listContext` (what list is being displayed) for `settleTime` ms.
`zero-virtual` supports the concept of _settling_. The scroller "settles" when there's been no scrolling OR change in the `listContext` (what list is being displayed) for `settleTime` ms.

- load the demo app and wait 2s, you should see 'settled' in the console
- load the demo app and immediately scroll slowly for 5s, then stop. you should see 'settled' 2s after you stop.
- load the demo app and immediately list queries with `await __zero.inspector.client.queries()`. you should see one query with `ttl:none`.
- load the demo app and wait 2s. then list queries. you should see one query with `ttl:5m`.
- load the demo app and wait 2s. slowly scroll down for 5s then stop. wait for 'settled' in console. list queries. you should see only two queries, both `ttl:5m`.


## Scroll State

zero-virtual has the ability to save and restore scroll state via the `scrollState` and `onScrollStateChange` params. The demo app exercises this feature using the built-in `useHistoryScrollState` hook.
Expand Down
2 changes: 1 addition & 1 deletion demo/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ createRoot(document.getElementById('root')!).render(
cacheURL={`${url.protocol}//${url.hostname}:4848`}
>
<App />
</ZeroProvider>
</ZeroProvider>,
);
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"vite": "^7.3.1"
},
"peerDependencies": {
"@rocicorp/zero": ">=0.25.0 <0.27.0",
"@rocicorp/zero": ">=0.25.0 <2.0.0",
"@tanstack/react-virtual": "^3.13.0",
"@tanstack/virtual-core": "^3.13.0",
"react": "^18.0.0 || ^19.0.0",
Expand Down
Loading