angular / angular/components

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

Abierto
#26,337 4 comentarios 4 reacciones 0 asignados Ver en GitHub
area: material/form-field P3
Lenguaje dominante
TypeScript
Estrellas
25k
Forks
6.8k
Merge medio
1 d 8 h
PR fusionados (30 d)
91

Descripción

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

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza con la reproducción enlazada de StackBlitz y compara el comportamiento de las etiquetas de mat-datepicker y mat-form-field en Angular 15 con el de la versión anterior. Rastrea cómo se renderiza mat-label junto al datepicker toggle, luego verifica que una etiqueta larga se muestre con puntos suspensivos sin solaparse con el control y añade cobertura de regresión para el caso reproducido.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
angular, typescript
Área
frontend
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.