angular / angular/components

bug(Schematics): Modernize schematics

オープン
#33,460 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
area: ng-generate gemini-triaged P3
主要言語
TypeScript
スター
25k
フォーク
6.8k
平均マージ
1日 8時間
マージ済み PR(30日)
91

説明

### 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](https://material.angular.dev/guide/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 ``. 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

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Navigation schematic の issue 33381 と schematics ガイドから始め、その後、address-form、dashboard、table、tree の生成された出力を調査します。生成された API、フォーム、テンプレートを現在の Angular Material のガイダンスと比較します。4 つすべての schematics が、一覧にある非推奨または配置の誤ったパターンを含まない、モダンで品質の高いコードを生成すれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
angular, typescript
領域
tooling
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。