angular / angular/components

Provide Automatic Binding of FormControl Error Messages and Status to input hints

未关闭
#2,810 13 条评论 23 个 reaction 已指派 0 人 在 GitHub 查看
area: material/input feature needs: discussion P4
主要语言
TypeScript
星标
25k
派生
6.8k
平均合并
1 天 8 小时
30 天内合并 PR
91

描述

#### Bug, feature request, or proposal:
This is a feature request.

This is related to #348, but is specifically asking for the material guidance to be a part of the framework, integrating with standard functionality of @angular/forms.

#### What is the expected behavior?

Looking at [Material Error Patterns](https://material.io/guidelines/patterns/errors.html), there seems to be a standard behavior of inlining form error message into the hint area (with a specific color).

screen shot 2017-01-25 at 6 58 03 pm

It also supports separating the existing hint from the error message via a comma.

screen shot 2017-01-25 at 6 59 02 pm

#### What is the current behavior?
Error state and messages are not handled.

#### What are the steps to reproduce?
There is nothing to show as this is feature that is yet to be implemented. [Material Error Patterns](https://material.io/guidelines/patterns/errors.html) should provide the expected behavior and visual treatment.

#### What is the use-case or motivation for changing an existing behavior?
The general gist is that if everyone were to follow the guidelines from material.io, you would end up with a fair amount of duplicate code for every input. The pervasiveness of the desired functionality seems like a prime candidate for handling at the framework level.

#### Which versions of Angular, Material, OS, browsers are affected?
All

#### Is there anything else we should know?

贡献指南

打开贡献指南

调研方向

从 Material Error Patterns 参考资料和 issue 中描述的 Angular @angular/forms 集成开始。由于没有指定文件或测试,请识别框架入口点,并为自动错误/状态显示、提示分离以及所要求的视觉处理定义覆盖范围;完成的标准是该行为在框架层面提供,而不是在每个输入控件中重复实现。

由索引模型根据 Issue 内容生成。

评估

技术栈
angular, typescript
领域
frontend
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
基本清楚
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。