angular / angular/components

bug(material/slide-toggle): Animation duration in M3 should be 300ms

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

説明

### Is this a regression?

- [ ] Yes, this behavior used to work in the previous version

### The previous version in which this bug was not present was

_No response_

### Description

The Slide toggle animation with an M3 theme uses the same duration and timing function as the M2 slide toggle. For the M3 switch this looks jarring and unfitting.

### Reproduction

StackBlitz link: https://stackblitz.com/edit/stackblitz-starters-andwku?file=src%2Fmain.ts
Steps to reproduce:
1. Look at the toggle animation
2. Compare with the toggle animation used in Material Web: https://material-web.dev/components/switch/stories/

### Expected Behavior

The slide toggle animation should not be jarring when using an M3 theme.

### Actual Behavior

The slide toggle animation uses the short animation duration from M2 and appears jarring.

### Environment

- Angular: 17.3.5
- CDK/Material: 17.3.5

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

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

調査の方向性

src/main.ts にあるリンク先の StackBlitz 再現コードから始め、M3 slide-toggle のアニメーションを Material Web switch の動作と比較します。Angular Material slide-toggle の実装を追跡して M3 アニメーションの継続時間を特定し、完成した動作が 300ms の継続時間を使用し、耳障りなトランジションがないことを確認します。

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

評価

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

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

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