angular / angular/components

feat(material/slider): Support for multi word thumb label text

オープン
#28,599 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
area: material/slider feature P3
主要言語
TypeScript
スター
25k
フォーク
6.8k
平均マージ
1日 8時間
マージ済み PR(30日)
91

説明

### Feature Description

In mat slider thumb label, need a support for multi word text. As we can format thumb label text by using **displayWith** property and add suffix or prefix to the number. We have a use case in which using value from mat-slider, we are creating labels like poor, below average, above average, etc. But in current implementation multi word label text is not supported. Words gets wrapped as we give space in the label text string.
![mat-slider-thumb-text](https://github.com/angular/components/assets/101663998/4a079ed4-3256-4a80-99a0-9fc1f6efc975)

### Use Case

We have used mat slider of range {min=0, max=10, step=01} for taking ratings from user
by using the mat slider value I am creating rating labels such as poor, below average, average, above average and excellent. As per the number I want to show that particular label in thumb label text.

[Stackblitz link](https://stackblitz.com/edit/sxcf47?file=src%2Fapp%2Fslider-formatting-example.html,src%2Fapp%2Fslider-formatting-example.css,src%2Findex.html,src%2Fstyles.scss,src%2Fapp%2Fslider-formatting-example.ts,package.json)

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

リンクされている StackBlitz の例、特に src/app/slider-formatting-example.html、src/app/slider-formatting-example.css、src/app/slider-formatting-example.ts から始めて、フォーマットされた thumb ラベルを再現します。Angular Material slider thumb-label の実装を追跡し、複数語の displayWith テキストが 1 つのラベル内に収まるようにします。「平均未満」のようなラベルが折り返しなしでレンダリングされれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
angular, typescript
領域
frontend
issue の種類
機能追加
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。