-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Numeric Input Issues #618
Comments
@scottfr thanks for trying out the new component so quickly!
|
Here's the markup from within a dialog:
|
Hi @scottfr - indeed, thanks for the quick feedback! I played with with your markup. The missing EDIT: Here's my repro after adding a |
I add the label myself. I'm following the design illustrated here: http://blueprintjs.com/docs/#components.forms.label My code is as follows
|
Hi @scottfr, Aha! There are two points of weirdness here, one of which is definitely a bug. First, the bug: looks like there is indeed a CSS rule applying top-margins to Second, a point of clarification: the
|
@scottfr Just chatted with some other Blueprint devs. Looks like the label-alignment issues are actually more pervasive: at present, any @leebyp's work in #594 actually addresses these issues for free. The only change will be to use the new So we'll wait for #594 to merge later this week, then we'll update the label/form-group documentation to clarify which to use for which form controls until we figure out a cleaner approach. |
@scottfr Regarding your other points:
|
Hi @scottfr, I thought more about this. I think I have a good way forward on restricting entry to number-ish characters, mirroring the functionality of the native
Distilling this down, we achieve the following character set:
Some subtleties: note that the inputted number's structure is not validated in native |
Sounds like a good approach!
…On Fri, Feb 10, 2017 at 12:48 PM, Chris Lewis ***@***.***> wrote:
Hi @scottfr <https://github.com/scottfr>,
I thought more about this. I think I have a good way forward on
restricting entry to number-ish characters, mirroring the functionality of
the native input[type="number"]. The plan is to add a boolean prop
tentatively called allowNumericCharactersOnly that, if enabled, supports
only floating-point number
<https://www.w3.org/TR/2012/WD-html-markup-20120329/datatypes.html#common.data.float>
characters as specified in the input[type="number"] spec
<https://www.w3.org/TR/2012/WD-html-markup-20120329/input.number.html#input.number.attrs.value>
:
A floating-point number consists of the following parts, in exactly the
following order:
1. Optionally, the first character may be a "-" character.
2. One or more characters in the range "0—9".
3. Optionally, the following parts, in exactly the following order:
1. a "." character
2. one or more characters in the range "0—9"
4. Optionally, the following parts, in exactly the following order:
1. a "e" character or "E" character
2. optionally, a "-" character or "+" characters
3. One or more characters in the range "0—9".
Distilling this down, we achieve the following character set:
- -
- +
- 0–9
- .
- e
- E
Some subtleties: note that the inputted number's structure is not
validated in native input[type="number"]s. However, incrementing an
invalid input will set the input value to 1 (slightly different from our
current behavior, which simply clears the field):
[image: 2017-02-10 12 44 39]
<https://cloud.githubusercontent.com/assets/443450/22843486/c12cf7ea-ef8e-11e6-9af5-68c40eb00963.gif>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#618 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACFsnJnCA8o0otx5HOQtty_wGW1hHZJLks5rbM0OgaJpZM4L2_q1>
.
|
Very cool. Thanks Chris!
…On Mon, Mar 6, 2017 at 1:10 PM, Chris Lewis ***@***.***> wrote:
@scottfr <https://github.com/scottfr> - we've got a freshly baked fix for
full-width numeric inputs! See PR #792
<#792>. Once that merges, all
you need to do is <NumericInput className="pt-fill" />.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#618 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACFsnLL0O1D35O8mdENXxrSAZ4m9bu3-ks5rjHYogaJpZM4L2_q1>
.
|
Thanks for the new component! Three issues encountered with it:
1. It doesn't seem possible to set the size of the input using something like
style={{width: '100%'}}
2. I'm experience artifacts where the stepper is misaligned. See the following screenshot:
The text was updated successfully, but these errors were encountered: