feat(Slider): The Slider component should be able to properly display values with four or more digits
- 主要语言
- TypeScript
- 星标
- 25k
- 派生
- 6.8k
- 平均合并
- 1 天 8 小时
- 30 天内合并 PR
- 91
描述
### 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:
At four digits, the text already overflows the container. A year looks even worse:
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:
The design of the Angular Material slider actually resembles the older M2 design with the smaller label:
### Use Case
This will enable the slider to be used for a lot of common use cases like selecting a date range.
贡献指南
调研方向
从 Slider 组件和 issue 中链接的文档里的示例 slider 开始,使用四位数值和年份重现溢出问题。将 thumb-label 的行为与 Material Design slider 参考进行比较;当较长的值能够整洁地显示而不溢出,并且文档中的示例仍然可用时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- angular, typescript
- 领域
- design, frontend
- Issue 类型
- 功能
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 冷清
- 描述清晰度
- 基本清楚
- 新手友好度
- 55/100