terra-form-inputCreate a new package called terra-form-input to replace the Input component currently in terra-form.
Keyboard focus will be available for this form input.
See existing component's props table here.
| Props | Type | Default | Description |
| ----------- | ----- | --------- | --------------------------------------------------------- |
| disabled | bool | false | Whether the input is disabled |
| isInvalid | bool | false | Whether the input is invalid |
| onBlur | func | undefined | Function callback to trigger when this input loses focus. |
| onFocus | func | undefined | Function callback to trigger when this input gains focus. |
On the original tech design, I noticed discussion around using disabled rather than isDisabled to stay consistent with other packages. Should we do the same for isInvalid?
@ChaseSinclair I don't think so. When I looked deeper into the comments that you're referencing, I think the reason that disabled was used as opposed to isDisabled for form related components is because disabled is a first-class attribute of the underlying HTML <input> element that backs them under the hood.
Props in the form of is_ tend to be more of a terra convention, as they're used as a sort of flag that, when passed, they're meant to be indicative of a sort of change (being invalid, disabled, etc.). Were disabled not a first-class attribute of the HTML tag, and other new terra-form-X components not using it, I would actually probably opt to go for isDisabled as opposed to disabled, but given the reasons described above, I think we're okay to leave it as isInvalid personally, but I'm open to other opinions!
I think it would be good to mention about the "Responsiveness" and "Accessibility" aspects of this component as it has some "Focus animation" and stuff going on with it?
@samvaity I added a section about _Accesibility_. As the component doesn't have any non-trivial responsive behavior, I don't think it's necessary to add a _Responsiveness_ section
Do we need to investigate handling of the truncation and the wrapping issue that occurs in IE and firefox?
Do we need to account for helptext?
The current input does not account for required fields, do we need it?
Can we currently add place holder text? If not do we need it?
Do we need to support error text with the red blob on top?
@dm123455 Help text and error text is handled by the terra-form-field component.
@dm123455 I emailed @bjankord and @neilpfeiffer about your first question regarding text truncation. Implementing placeholder text will be done as part of this story. Everything else you've mentioned above should be handled by the terra-form-field component.
@dm123455 I talked with Brett and Neil this morning. Per Neil:
Terra will not doing any custom logic and follow default browser input behaviors for the immediate term unless otherwise noted.
+1
+1
@bjankord, can I get your +1 on this?
+1 on tech design.
+1
JIRA created
Most helpful comment
@ChaseSinclair I don't think so. When I looked deeper into the comments that you're referencing, I think the reason that
disabledwas used as opposed toisDisabledfor form related components is because disabled is a first-class attribute of the underlying HTML<input>element that backs them under the hood.Props in the form of
is_tend to be more of a terra convention, as they're used as a sort of flag that, when passed, they're meant to be indicative of a sort of change (being invalid, disabled, etc.). Weredisablednot a first-class attribute of the HTML tag, and other newterra-form-Xcomponents not using it, I would actually probably opt to go forisDisabledas opposed todisabled, but given the reasons described above, I think we're okay to leave it asisInvalidpersonally, but I'm open to other opinions!