angular / angular/components

bug(mat-label): mat-label overlap control and does not show ellipsis

Ouverte
#26,337 4 commentaires 4 réactions 0 personnes assignées Voir sur GitHub
area: material/form-field P3
Langage dominant
TypeScript
Étoiles
25k
Forks
6.8k
Merge moyen
1 j 8 h
PR mergées (30 j)
91

Description

### Is this a regression?

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

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

I'm not 100% sure, but it worked before

### Description

The `mat-label` does not wrap the text with ellipsis anymore in the `mat-datepicker`. Instead the text goes over the icon/control itself.
![image](https://user-images.githubusercontent.com/10813063/209828378-07701cfa-ebab-4ea3-958c-593031815d69.png)

```

To long to show all text


```

### Reproduction

Steps to reproduce:
1. Simple add create a mat-datepicker with a mat-label with new version 15.x

[Stackblitz](https://stackblitz.com/edit/angular-cv9udr-pxxmf6?file=src/app/datepicker-overview-example.ts) is available

### Expected Behavior

Before the text was trimmed with ellipsis like this:

![image](https://user-images.githubusercontent.com/10813063/209828983-f1a206c8-511a-4231-b99a-c610291106bb.png)

### Actual Behavior

Now is go outside the control/over the icon:

![image](https://user-images.githubusercontent.com/10813063/209828378-07701cfa-ebab-4ea3-958c-593031815d69.png)

### Environment

- Angular: 15.0.4
- CDK/Material: 15.0.3
- Browser(s): (Chrome, Edge, Firefox)
- Operating System: MacOS

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par la reproduction StackBlitz liée et comparez le comportement des libellés mat-datepicker et mat-form-field avec Angular 15 à celui de la version précédente. Suivez le rendu de mat-label à côté du datepicker toggle, puis vérifiez qu’un libellé long est tronqué avec des points de suspension sans chevaucher le contrôle et ajoutez une couverture de régression pour le cas reproduit.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
angular, typescript
Domaine
frontend
Type d'issue
Bug
Difficulté
3/5
Temps estimé
1-2 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.