bug(form-field): remove hint wrapper when no hint provided
- 主要言語
- 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
Even when no hint is provided, the hint-wrapper dom element still shows up.
This is because `mat-form-field-subscript-wrapper` has a margin as specified here:
```CSS
.mat-form-field-subscript-wrapper {
font-size: $subscript-font-size;
margin-top: $subscript-margin-top;
```

### Reproduction
Steps to reproduce:
1. Add an outline material form field without any hint and inspect.
eg:
```HTML
Outline form field
```
### Expected Behavior
When no hint is being provided, the wrapper dom element shouldn't render.
### Actual Behavior
The wrapper renders and takes up space.
### Environment
- Angular: 13.3.5
- CDK/Material: 13.3.5
- Browser(s): Chrome / all
- Operating System (e.g. Windows, macOS, Ubuntu): macOS/ all
コントリビューションガイド
調査の方向性
まず、提供されている outline mat-form-field の例を再現し、生成された DOM を調べます。特に mat-form-field-subscript-wrapper 要素とその間隔を確認してください。hint のないフォームフィールドでその wrapper がレンダリングされず、不要な空白が残らなければ、issue は完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- angular, typescript
- 領域
- frontend
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 68/100