Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add text input component #9

Open
AaronCGoidel opened this issue Jul 3, 2019 · 6 comments
Open

Add text input component #9

AaronCGoidel opened this issue Jul 3, 2019 · 6 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers new component

Comments

@AaronCGoidel
Copy link
Owner

Create an interaction component which prompts the user and then takes input

@AaronCGoidel AaronCGoidel added enhancement New feature or request good first issue Good for newcomers new component labels Jul 3, 2019
@AdnCodez
Copy link
Contributor

AdnCodez commented Oct 9, 2019

I'm going to start working on this issue, is there anything that I should keep in mind?

@AaronCGoidel
Copy link
Owner Author

I think that the underlying generic for the text input should allow for some flexibility in terms of what can and will be built on top of it. For example, this will probably be the basis for numeric input, so there needs to be the option to add input validation. Just keep in mind that the base component should be as customizable as possible.

@AdnCodez
Copy link
Contributor

AdnCodez commented Oct 9, 2019

Okay, I got it;
I read the code you have and understand the way you structure things it is flexible, to say the least.
I thought about validation may be using regex or someway when the input is expected to be an email, for example, I think I will start with these basic things and then build on top of it (see attachment)
Screenshot from 2019-10-09 18-40-06

@AaronCGoidel
Copy link
Owner Author

Sounds good to me, checking if a string matches some format is going to be important. Something else I thought of which may be good to have is interchangeable prompting strings. Here's what I mean by that.

Enter your name:
> 
What is your name?
Name: 
How much money?
$

There should be two different options, one for the prompt and one for string which starts the input.

@AdnCodez
Copy link
Contributor

I see I'll try to implement it so that it is set as an argument, and make like a default one as > or ↣

@AaronCGoidel
Copy link
Owner Author

Yeah. For now, I'd go with > as the default. In the future my idea is to implement profiles of some sort which will change the default characters. I'd like them to be as consistent as possible throughout the package. For example, every arrow or pointer should be the same character.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers new component
Projects
None yet
Development

No branches or pull requests

2 participants