angular / angular/components

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

Aperta
#28,916 1 commento 2 reazioni 0 assegnatari Vedi su GitHub
area: material/slide-toggle M3 P3
Lingua principale
TypeScript
Stelle
25k
Fork
6.8k
Merge medio
1g 8h
PR unite (30g)
91

Descrizione

### 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

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia dalla riproduzione StackBlitz collegata in src/main.ts e confronta l’animazione M3 slide-toggle con il comportamento di Material Web switch. Analizza l’implementazione di Angular Material slide-toggle per identificare la durata dell’animazione M3 e verifica che il comportamento completato utilizzi una durata di 300ms senza la transizione brusca.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
angular, typescript
Ambito
frontend
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.