patternfly / patternfly/patternfly-react
Scrollable areas - add dynamic shadows based on scroll position
まだ誰も着手していません。
- 主要言語
- TypeScript
- スター
- 862
- フォーク
- 392
- 平均マージ
- 4日 8時間
- マージ済み PR(30日)
- 9
説明
From @jamestalton, I wanted to create an issue to track a request I've heard from James a few times. It would be super cool if PF was able to add shadows to scrollable regions dynamically. A good example we could currently work with is scrollable page sections. You designate a page section as .pf-m-overflow-scroll, and by default, it looks like any other page section. However, if its content is taller than the section, it will automatically add a scrollbar and the content becomes scrollable. PF could detected that there is overflow and added a shadow dynamically. Currently users can add shadows themselves by adding .pf-m-shadow-bottom (one for a top shadow, too) to the preceding page section, but that class adds a static shadow. If you add it because the section below has the potential to scroll, but doesn't scroll because there is no overflow content, the shadow appears unnecessarily.
Some questions:
-
Currently a user could wire this up themselves, but should PF provide this ability?
-
Would this be enabled for all scrollable regions? Sounds like that has the potential to create a lot of work to implement/maintain.
-
Is there any kind of performance cost?
-
Are there other cases for dynamic shadows - for example, adding a shadow only once you've scrolled a little bit? What's the LEO for that and does it come with performance costs?
Anything else you'd like to add @jamestalton?
Jira Issue: PF-1775
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
リンクされているスクロール可能なページセクションの overflow-scroll demo から始め、.pf-m-overflow-scroll と .pf-m-shadow-bottom が現在どのように動作しているかを確認します。動的なシャドウを広く適用するのか、それともページセクションにのみ適用するのかを、パフォーマンスに関する期待値と望ましいスクロール状態も含めて明確にします。実装を開始する前にスコープと動作について合意できていれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- css, react, typescript
- 領域
- design, frontend
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 静か
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 30/100