Skip to content
New issue

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

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

Already on GitHub? # to your account

More HTML5 input types #84

Open
Jand42 opened this issue Sep 28, 2016 · 4 comments
Open

More HTML5 input types #84

Jand42 opened this issue Sep 28, 2016 · 4 comments

Comments

@Jand42
Copy link
Member

Jand42 commented Sep 28, 2016

number is already covered by Doc.IntInput and Doc.FloatInput. Other input types could have Doc.*Input helpers:

  • color
  • date
  • time
  • datetime-local
  • email
  • month
  • range
  • search
  • tel
  • time
  • url
  • week
@granicz
Copy link
Member

granicz commented Oct 16, 2022

... and file - and please do a sweep in case we missed any others.

When implementing, add extra types if necessary for the various reactive values and use the existing naming scheme. Also add the matching semantics to templating, so binding with ws-var an input node with the various types should get access to the underlying values.

@granicz
Copy link
Member

granicz commented Oct 17, 2022

Having brainstormed more on this, we have to take a couple things into consideration:

  • Adding a lot of variants pollutes the Doc module, which is already pretty crowded if the client namespaces are included.
  • The new shapes are all input variants, so it makes sense to group them.

Therefore, the current proposal is the following:

  • Create an Input InputType submodule under Doc for the input variants
  • Leave existing input controls (Doc.Input, Doc.IntInput, etc.) where they are, but obsolete them with a message that points to the new counterparts under Doc.Input Doc.InputType.

And now the variants' names and redirections - all under the Doc.Input Doc.InputType module:

  • Doc.InputArea -> TextArea
  • Doc.Input, Doc.IntInput, Doc.FloatInput -> Text, Int, Float
  • Doc.PasswordBox -> Password
  • Doc.Checkbox* -> Checkbox*
  • Doc.Radio* -> Radio*
  • Doc.Select* -> Select*
  • type="color" -> Color
  • type="date" -> Date
  • type="time" -> Time
  • type="datetime-local" -> DateTimeLocal
  • type="email" -> Email
  • type="file" -> File
  • type="month" -> Month
  • type="range" -> Range
  • type="search" -> Search
  • type="tel" -> Tel
  • type="time" -> Time
  • type="url" -> Url
  • type="week" -> Week

@granicz
Copy link
Member

granicz commented Oct 19, 2022

Looks like there would be a clash with the existing Doc.Input function and the proposed Doc.Input submodule. I'd vote for renaming that proposed submodule to Doc.InputType. Also, the C# functions need to be synchronized, on a separate ticket (to be filed).

Jooseppi12 added a commit that referenced this issue Oct 19, 2022
granicz pushed a commit that referenced this issue Oct 19, 2022
@granicz
Copy link
Member

granicz commented Oct 19, 2022

@Jooseppi12 Latest PR has wrong pointers in the obsolete messages, still referring users to Doc.Input.* - can you fix that?

Jooseppi12 added a commit that referenced this issue Dec 2, 2022
granicz pushed a commit that referenced this issue Dec 2, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

3 participants