Expose an API to cancel active scroll reconciliation
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 62/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- frontend
調査の方向性
@tanstack/virtual-core の実装で、reconcileScroll と scrollToIndex および scrollToOffset が使用する scrollState の周辺から始めてください。アクティブな調整ターゲットとその安全制限がどのように管理されているかを追跡し、その後、利用可能であれば既存の core テストを確認してください。公開された cancelScrollTo API が現在の DOM オフセットを変更せずにアクティブなターゲットを停止し、その後の測定による補正を維持できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Describe the use case
A virtualizer may have a long-distance scrollToIndex reconciliation in progress while the user begins a genuine wheel, touch, pointer, or keyboard scroll. The application must immediately hand viewport ownership back to the user.
In @tanstack/virtual-core 3.17.8, reconcileScroll can continue correcting toward the old target for up to the five-second safety limit. There is no public way to cancel it. The only effective application workaround is a private-field write:
;(virtualizer as unknown as { scrollState: unknown }).scrollState = null
That works, but is intentionally outside the public contract and can silently break on upgrade.
Requested API
A public method such as:
virtualizer.cancelScrollTo()
It should cancel the active scrollToIndex / scrollToOffset reconciliation target without changing the current DOM offset. This lets a user gesture take ownership immediately while preserving normal subsequent measurement compensation.
Why this belongs in core
- Core owns the reconciliation state and its lifecycle.
- Consumers cannot reliably infer or cancel every pending internal frame/timer.
- User input cancellation is needed by chat timelines and other dynamic, long-distance virtual navigation surfaces.
Version
@tanstack/virtual-core 3.17.8; the same private-only state is present on current main.
- 主要言語
- TypeScript
- スター
- 7.1k
- フォーク
- 466
- 平均マージ
- 2日 31分
- マージ済み PR(30日)
- 13
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
TanStack/virtual のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 38/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
TanStack/virtual の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
vercel-labs/just-bash#464 ·
-
looksLikeSlug() is ASCII-only, so non-Latin entity slugs (e.g. Korean) skip exact match and collapse オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
TanStack/tanstack.com#1293 ·