angular / angular/components

feat(cdk/scrolling): Scroll functions silently fail if the viewport is not yet fully initialized

オープン
#23,716 コメント 2 件 リアクション 2 件 担当者 0 名 GitHub で見る
area: cdk/scrolling feature P4
主要言語
TypeScript
スター
25k
フォーク
6.8k
平均マージ
1日 8時間
マージ済み PR(30日)
91

説明

#### Feature Description

`cdk-virtual-scroll-viewport`'s `scrollTo...` functions (like `scrollToIndex`) silently fail when the viewport is not yet initialized. Technically the functions are doing nothing wrong from a code standpoint, but since the component is not yet fully initialized, it is empty, so trying to scroll will do nothing meaningful. Sending back an error (or at least logging a warning to the console) if an empty viewport is scrolled would be helpful so that developers know that something went wrong.

This would be mitigated if we had an async option that managed the timing of scroll commands. See [this feature request](https://github.com/angular/components/issues/23715).

#### Use Case

This would improve every use case of the virtual scroller.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

cdk-virtual-scroll-viewport の scrollTo... エントリーポイントから始め、初期化と空の viewport がどのように表現されているかを調べてください。完了時の動作をエラーにするべきかコンソール警告にするべきか、maintainers に確認してから、初期化前のスクロールが暗黙に失敗しなくなったことを示す、焦点を絞ったカバレッジを追加してください。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
angular, typescript
領域
frontend
issue の種類
機能追加
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。