staccx / bento

https://bento.stac.cx
5 stars 1 forks source link

Input improvements #20

Closed robinsandborg closed 3 years ago

robinsandborg commented 4 years ago

Inputs are core in the functionality Bento provides. It is therefore important that there is as little friction and hurdles when working with inputs as possible.

After recently working on a very input-heavy project, I have some thoughts and pains I'd like to discuss. The best solution however is something we should work on together. Here are some of my thoughts:

Regarding my thoughts on the i18n-formatting, this needs to be customizable in case the client does not agree with what's "correct" or you need to use one locales rules on another locales language. Could we take some inspiration from our theming implementation for this?

XSlemX commented 4 years ago

Agree that this is pressing. Also agree on not having n components. We should normalize. Also love the thought of having it being i18n sensitive. This would be 💯 .

I will start on a proposal.

Thymas1 commented 4 years ago

@XSlemX could you at the same time take a look at the way defaultValue now works? As it is now, we are getting spammed with warnings as we have none-cleave inputs and Input now uses seRawValue from cleave. We need a way to set a defaultValue without getting all these warnings. It works fine as it is now, so maybe remove the warnings maybe?

robinsandborg commented 4 years ago

@Thymas1 This would hopefully be covered by expanding the test coverage to include controlled components for all input components (including SelectSimple, Radios, etc)

XSlemX commented 4 years ago

Should we add first class support for react-hook-form? Seems like this is go-to for most X'ers.

XSlemX commented 4 years ago

22 , #23 , #24 #21