Side Nav - fullscreen should make the side nav full screen only when its open
- 主要言語
- TypeScript
- スター
- 25k
- フォーク
- 6.8k
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 91
説明
#### Feature Description
The `fullscreen` api of `mat-sidenav-container` allow us to show the side nav with height set to 100% of the viewport. And this probably is the most followed way to achieve this as proposed by these answers on stack overflow:
https://stackoverflow.com/questions/37334853/cant-get-angular-material-md-sidenav-to-be-100-height
https://stackoverflow.com/questions/46666381/unable-to-set-the-height-of-a-angular-material-sidenav-to-100
`fullscreen` option sets the below css properties on `mat-sidenav-container`:
```
top: 0!important;
left: 0!important;
right: 0!important;
bottom: 0!important;
position: absolute!important;
```
As a side effect I believe this blocks the scroll events and as a result it breaks the functionality of components/directives that relies on scroll events. For example, `ngx-infinite-scroll` is one of the commonly used plugins (87k weekly downloads) that allow loading contents as soon as user reaches to the bottom of the page. When we set `fullscreen` on `mat-sidenav-container` , `ngx-infinite-scroll` no longer works. As reported here
https://stackoverflow.com/questions/50377502/angular-material-and-ngx-infinite-scroll?rq=1
and
https://github.com/orizens/ngx-infinite-scroll/issues/182
What if we apply the below styles of `fullscreen` mode **only** when the side nav is opened:
```
top: 0!important;
left: 0!important;
right: 0!important;
bottom: 0!important;
position: absolute!important;
```
This way it wont affect the other portion of the application. Because when the nav bar is open user wont be scrolling the page contents, so if the scroll events are blocked it wont be a issue.
コントリビューションガイド
調査の方向性
mat-sidenav-container fullscreen API から始め、リンクされた例と報告をコンテキストとして使用して、ngx-infinite-scroll で報告されたインタラクションを再現します。side nav が開いている間は fullscreen スタイルがコンテナに適用され、閉じているときはページのスクロールイベントを妨げない状態になれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- angular, typescript
- 領域
- frontend
- issue の種類
- 機能追加
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100