More HTML5 Input Form Control Modules

12 views
Skip to first unread message

David Troyer

unread,
Jun 2, 2017, 4:41:22 PM6/2/17
to Geb Development Mailing List
I started using form control modules and am finding I really like them. However, I quickly found that there are none for inputs of type email, tel, date, etc.

How do people feel about me putting together a PR to add some of those? They would basically be the same as TextInput but with corresponding values for inputType.

Cheers,

David Troyer

Marcin Erdmann

unread,
Jun 4, 2017, 12:39:39 PM6/4/17
to geb...@googlegroups.com
Hi David,

Thanks for offering to work on a contribution. 

The idea sounds good to me in general but I'm struggling to see what types you would use with email and tel fields you mention. Even the date field will be a bit problematic as we cannot use Java 8 date types (Geb is still JDK7 compatible) and java.util.Date is not the nicest API to work with. 

Would you mind providing a list of mappings from input type to data types you want to use in methods that manipulate their values? I would like to work it out so that we're on the same page before you put any work into your PR.

Cheers,
Marcin

--
You received this message because you are subscribed to the Google Groups "Geb Development Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geb-dev+unsubscribe@googlegroups.com.
To post to this group, send email to geb...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/geb-dev/522f2ffc-2d20-48c3-a1d7-1fb3f01e5eef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

David Troyer

unread,
Jun 5, 2017, 2:09:38 PM6/5/17
to Geb Development Mailing List
Marcin,

Thanks for your reply! 

I was envisioning that email and tel would be very similar to TextInput with simply a text property of type String. Kind of like this:

class EmailInput extends AbstractInput {

final String inputType = "email"

String getText() {
navigator.value()
}

void setText(String text) {
navigator.value(text)
}
}

This would allow one to refer to the value of the input as the text property. This is essentially how it is represented in the browser. The main reason I'm even using these types over a text input is to get built in Angular validation.

Let me know if that doesn't make sense.
 
Cheers,

David

On Sunday, June 4, 2017 at 12:39:39 PM UTC-4, Marcin Erdmann wrote:
Hi David,

Thanks for offering to work on a contribution. 

The idea sounds good to me in general but I'm struggling to see what types you would use with email and tel fields you mention. Even the date field will be a bit problematic as we cannot use Java 8 date types (Geb is still JDK7 compatible) and java.util.Date is not the nicest API to work with. 

Would you mind providing a list of mappings from input type to data types you want to use in methods that manipulate their values? I would like to work it out so that we're on the same page before you put any work into your PR.

Cheers,
Marcin
On Fri, Jun 2, 2017 at 9:41 PM, David Troyer <dmtr...@gmail.com> wrote:
I started using form control modules and am finding I really like them. However, I quickly found that there are none for inputs of type email, tel, date, etc.

How do people feel about me putting together a PR to add some of those? They would basically be the same as TextInput but with corresponding values for inputType.

Cheers,

David Troyer

--
You received this message because you are subscribed to the Google Groups "Geb Development Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geb-dev+u...@googlegroups.com.

Marcin Erdmann

unread,
Jun 5, 2017, 4:40:08 PM6/5/17
to geb...@googlegroups.com
David,

Yep, that makes a lot of sense. Please submit a PR with the proposed changes.

Cheers,
Marcin

To unsubscribe from this group and stop receiving emails from it, send an email to geb-dev+unsubscribe@googlegroups.com.

To post to this group, send email to geb...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages