question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add terra-form-input component

See original GitHub issue

Technical Design: terra-form-input

  • Originally inspired by Ben Cai’s preliminary tech-design.
  • As this is an uplift, it’s our goal to allow for all original functionality allowable by terra-form’s input element. As such, this tech design is not meant to be an all-inclusive design over this new component’s implementation. Rather, a set of new/notable features not currently implemented by the terra-form input element that I believe are worth calling out.

Summary:

Create a new package called terra-form-input to replace the Input component currently in terra-form.

Accessibility

Keyboard focus will be available for this form input.

React Props:

Old

See existing component’s props table here.

New

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.

Themeable Styles:

  • Background color
  • Background image
  • Border color
  • Border radius
  • Border style
  • Border width
  • Box Shadow
  • Focus animation
    • Direction
    • Duration
  • Font color
  • Font size
  • Font weight
  • Opacity
  • Padding

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:18 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
dylanklohrcommented, Feb 5, 2018

@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!

1reaction
dylanklohrcommented, Feb 5, 2018

@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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Input Variables - Configuration Language | Terraform
Input variables allow you to customize modules without altering their source code. Learn how to declare, define, and reference variables in configurations.
Read more >
How to Use Terraform Variables (Locals, Input, Output) - Tutorial
Terraform variables. Learn how to use local, input, output , and environment variables. See how to mark Terraform variables as sensitive.
Read more >
Use Terraform Input Variables To Parameterize Infrastructure ...
Terraform Input Variables are defined using a variable block that defines the variable name and other option parameters for the variable. These ...
Read more >
Input Variables in Terraform | Terraform Tutorial | #7 - YouTube
Terraform variables are like variables in any other programming language. Input variables allow you to pass in date to your configurations ...
Read more >
cloudposse/components/aws | integration Submodule
Name Description Type Default Required descriptor_formats any no kms_key_arn AWS KMS key used for writing to SSM string "alias/aws/ssm" no label_value_case string null no
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found