bug(material/slide-toggle): Animation duration in M3 should be 300ms
- Vorherrschende Sprache
- TypeScript
- Sterne
- 25k
- Forks
- 6.8k
- Ø Merge
- 1 T. 8 Std.
- Gemergte PRs (30 T.)
- 91
Beschreibung
### 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
Beitragsleitfaden
Rechercherichtung
Beginne mit der verknüpften StackBlitz-Reproduktion unter src/main.ts und vergleiche die M3 slide-toggle-Animation mit dem Verhalten des Material Web switch. Verfolge die Angular Material slide-toggle-Implementierung, um die M3-Animationsdauer zu ermitteln, und überprüfe, dass das fertiggestellte Verhalten eine Dauer von 300ms verwendet und keinen störenden Übergang aufweist.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- angular, typescript
- Bereich
- frontend
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100