bug(Schematics): Modernize schematics

Abierto
#33,460 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
45/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Tranquilo
Stack tecnológico
angular, typescript
Área
tooling

Línea de trabajo

Comienza con el issue 33381 de Navigation schematic y la guía de schematics; después, inspecciona la salida generada para address-form, dashboard, table y tree. Compara las APIs, los formularios y las plantillas generados con las directrices actuales de Angular Material; se considera terminado cuando los cuatro schematics generan código moderno y de calidad sin los patrones obsoletos o colocados incorrectamente que se enumeran.

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

Descripción

area: ng-generate gemini-triaged P3
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

I opened an Issue for modernizing the Navigation schematic: https://github.com/angular/components/issues/33381. I have since observed that all the other schematics generate code with similar issues, so I am opening this Issue for improving and modernizing the code generated by the rest of the schematics, namely:

  • 1. address-form
  • 2. dashboard
  • 3. table
  • 4. tree

These are the issues I have observed:

  1. The code includes M2 APIs that are no longer relevant. E.g., address-form generates a button with color="primary", and table generates a table with mat-elevation-z2.
  2. The code includes Reactive Forms (e.g., address-form). This should be replaced with Signal Forms, or a command line argument needs to be provided to indicate Signal Forms.
  3. The tree schematic generates code that is based on deprecated modules: MatTreeFlatDataSource, MatTreeFlattener, and FlatTreeControl. Moreover, in the template, there is an empty button <button matIconButton disabled></button>. The icon is incorrectly placed after the button rather than within it.
Reproduction

This issue does not require a StackBlitz reproduction because these are comments on the code generated by the schematics.

Expected Behavior

The schematics should produce quality code and set the standard for implementing Material Design components.

Actual Behavior

The code has several issues.

Environment

Angular CLI : 22.0.1
Angular : 22.0.1
Node.js : 26.1.0
Package Manager : npm 11.16.0
Operating System : win32 x64
Browser: Chrome

Lenguaje dominante
TypeScript
Estrellas
25k
Forks
6.8k
Merge medio
1 d 2 h
PR fusionados (30 d)
81

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de angular/components

Todos los issues de angular/components

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.