angular / angular/components

MatFormField hint and error alignment wrong when using a matPrefix icon

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

説明

#### Bug, feature request, or proposal:
Bug

#### What is the expected behavior?
Hint and error text are horizontally aligned with input text and both are indented if a matPrefix icon is present.

#### What is the current behavior?
The hint and error text are never indented when matPrefix is used.

#### What are the steps to reproduce?
https://stackblitz.com/edit/angular-h1lpum?embed=1&file=app/form-field-appearance-example.html

#### What is the use-case or motivation for changing an existing behavior?
Material Design guidelines are not being followed.

#### Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular 6.0.5, Angular Material 6.2.1

#### Is there anything else we should know?
The alignment spec is not explicitly mentioned, but the anatomy diagram is clear: https://material.io/design/components/text-fields.html#anatomy.

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

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

調査の方向性

リンクされた StackBlitz の再現から始め、matPrefix アイコンが存在する場合の mat-form-field の動作を調査します。完了条件は、ヒントテキストとエラーテキストが入力テキストと水平方向に揃い、prefix と一貫したインデントになることです。その際、既存のフォームフィールドの動作は維持します。

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

評価

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

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

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