angular / angular/components

feat(mat-selection-list): add slide toggle as alternative for checkbox

Đang mở
#9,739 12 bình luận 20 reaction 0 người được giao Xem trên GitHub
area: material/list feature P5
Ngôn ngữ chính
TypeScript
Star
25k
Fork
6.8k
Merge trung bình
1 ngày 8 giờ
Pull request đã merge (30 ngày)
91

Mô tả

#### Bug, feature request, or proposal:
feature request

#### What is the expected behavior?
Option lists can have slide toggles instead of checkboxes, as you can see on Android OS.

#### What is the current behavior?
Option lists are only for checkboxes and if you want to create something that has the same look but has a slide toggle instead, you will have to implement by yourself.

#### What is the use-case or motivation for changing an existing behavior?
Its a very common option list format, very used on Android 5~6.

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

#### Is there anything else we should know?
You can find it in Material's guidelines:
![image](https://user-images.githubusercontent.com/3942006/35696636-21d3e79a-076f-11e8-80c3-59abdf6d00fd.png)
*(switches are very cute btw)*

Cute sidebar example:
![image](https://user-images.githubusercontent.com/3942006/35740701-c7f2f7d0-081c-11e8-8010-d2dd8838f66a.png)
*(inspired by Twitter's PWA, achieved with slide-toggle, mat-list and `::ng-deep`, that's a lot more than I expect to write)*

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu bằng việc xem xét các component mat-selection-list và slide-toggle, cũng như cách hành vi checkbox hiện tại của option-list được cung cấp. Công việc hoàn tất khi các danh sách tùy chọn hỗ trợ slide toggles như một cách trình bày thay thế, đồng thời vẫn giữ hành vi lựa chọn như mong đợi, với coverage cho tùy chọn mới.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
angular, typescript
Lĩnh vực
frontend
Loại issue
Tính năng
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.