Skip to content

Fix scroll velocity for burst-delivered events - #2521

Open
efegokdemir wants to merge 1 commit into
Shopify:mainfrom
efegokdemir:codex/fix-2517-burst-scroll-velocity
Open

efegokdemir wants to merge 1 commit into
Shopify:mainfrom
efegokdemir:codex/fix-2517-burst-scroll-velocity

Conversation

@efegokdemir

@efegokdemir efegokdemir commented Oct 4, 2026 •

Copy link
Copy Markdown

Description

Fixes #2517

When scroll updates arrive within the same millisecond, the 1 ms minimum elapsed time can greatly overestimate velocity and cause visible rows to blank temporarily. Use a 16 ms minimum interval, as described in the issue, while leaving longer measured intervals unchanged.

Adds a regression test covering consecutive updates delivered in the same millisecond.

Tests

  • yarn test --runInBand src/tests/VelocityTracker.test.ts
  • yarn test --runInBand src/tests/RecyclerView.test.tsx
  • yarn eslint src/recyclerview/helpers/VelocityTracker.ts src/tests/VelocityTracker.test.ts
  • yarn type-check
  • git diff --check

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Visible rows go blank while scrolling when scroll events reach JS in bursts (Android, inside a bottom sheet)

1 participant