angular / angular/components

Navigation drawer - Mini variant behavior

未关闭
#1,728 105 条评论 272 个 reaction 已指派 0 人 在 GitHub 查看
area: material/sidenav feature P5
主要语言
TypeScript
星标
25k
派生
6.8k
平均合并
1 天 8 小时
30 天内合并 PR
91

描述

#### Feature request:
Add the "Mini variant" behavior of the Navigation drawer.
As defined in the Google Material guidelines:
https://material.google.com/patterns/navigation-drawer.html#navigation-drawer-behavior

![](https://cloud.githubusercontent.com/assets/1202936/8023412/a6d190f4-0ce1-11e5-86b9-55448c4ae6bd.png)

#### What is the expected behavior?
When toggled, the navigation drawer change its width.
It's not fully hidden.

#### What is the current behavior?
Only two states are available: displayed, hidden

#### What are the steps to reproduce?
Create a sidenav and toggle it on and off.
The sidenav can only be opened or closed.
No intermediate state.

#### What is the use-case or motivation for changing an existing behavior?
Desktop users need to quickly change the current view.
The sliding effect of the sidenav could be annoying when used a lot.
It's common for desktop apps to keep the navigation opened by default.
But in some cases the icons are self explanatory so no need to display the associated labels.

#### Which versions of Angular, Material, OS, browsers are affected?
Angular2

#### Is there anything else we should know?
A similar feature request was submitted for Angular 1:
https://github.com/angular/material/issues/3158

贡献指南

打开贡献指南

调研方向

首先检查现有的 Angular Material sidenav 实现及其当前的打开/关闭切换路径。将该行为与链接的 Google Material mini-variant 指南进行比较;完成的标准是 drawer 支持一种独立的缩减宽度状态,同时保留现有的显示和隐藏状态。

由索引模型根据 Issue 内容生成。

评估

技术栈
typescript
领域
frontend
Issue 类型
功能
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
32/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。