angular / angular/components

feat(Slider): The Slider component should be able to properly display values with four or more digits

Đang mở
#33,606 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
area: material/slider feature P3
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ả

### Feature Description

The [Slider component](https://material.angular.dev/components/slider/overview) cannot display values with four or more digits properly in the thumb label.

The issue can be quickly seen by sliding one of the example sliders in the documentation all the way up:

Image

At four digits, the text already overflows the container. A year looks even worse:

Image

While the custom thumb label formatting feature slightly helps with this, the limit for a slider that looks decent is just three-digit values.

Looking at [Material Design sliders](https://m3.material.io/components/sliders/overview), I can see that the thumb label is much wider, and it's easy to imagine it expanding horizontally to accomodate more text:

Image

The design of the Angular Material slider actually resembles the older M2 design with the smaller label:

Image

### Use Case

This will enable the slider to be used for a lot of common use cases like selecting a date range.

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

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

Hướng nghiên cứu

Bắt đầu với component Slider và các slider ví dụ trong tài liệu được liên kết trong issue, tái hiện hiện tượng tràn với các giá trị có bốn chữ số và một năm. So sánh hành vi của thumb-label với tài liệu tham chiếu về slider của Material Design; công việc được hoàn thành khi các giá trị dài hơn được hiển thị rõ ràng mà không bị tràn và các ví dụ trong tài liệu vẫn có thể sử dụng được.

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
design, frontend
Loại issue
Tính năng
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
55/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.