-
Notifications
You must be signed in to change notification settings - Fork 24
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
vaadin-number-field element #110
Conversation
36f7c2e
to
4fc7abb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great code, comments and test coverage, really good! I left a couple of comments that I saw. But we'll have to discuss about the API/designs in a later point, before we can merge/give additional feedback.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A small thing to change, otherwise nicely done!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The controls works even though the input is disabled.
@abdonrd Thank you very much for the suggestion. Latest commit fixes that issue. |
8a93ffa
to
e9b1704
Compare
There are any ETA to publish this element? |
Not yet, sorry. But I think we will merge and tag a version within the next month. It might not be stable at that point, but hopefully beta quality at least. |
d74ad8d
to
f9cc0fd
Compare
vaadin-number-field.html, line 40 at r6 (raw file): Previously, limonte (Limon Monte) wrote…
Thanks for the info @jouni :) Comments from Reviewable |
when clicking on control buttons, the component is focused (out line is shown) but not the native input, so you cannot write or use arrow keys. Review status: 0 of 12 files reviewed at latest revision, 5 unresolved discussions, some commit checks broke. vaadin-number-field.html, line 97 at r7 (raw file):
nit, jsdoc needs that you ident one space the second line and following ones Comments from Reviewable |
Needs rebasing and pass CI Review status: 0 of 12 files reviewed at latest revision, 5 unresolved discussions, some commit checks broke. Comments from Reviewable |
3957f22
to
ab5fdec
Compare
* Improve vaadin-number-field * Fix value control buttons focusing behavior for touch * Add browser native validation behaviour
dc56a3a
to
0d0502d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 16 files at r9, 19 of 23 files at r10, 4 of 4 files at r11.
Reviewable status: all files reviewed, 6 unresolved discussions (waiting on @samiheikki, @limonte, @jouni, @gatanaso, and @sudipta1411)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 16 files at r9, 17 of 23 files at r10, 4 of 4 files at r11.
Reviewable status: all files reviewed, 6 unresolved discussions (waiting on @samiheikki, @limonte, @jouni, @gatanaso, and @sudipta1411)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 16 files at r9, 19 of 23 files at r10, 4 of 4 files at r11.
Reviewable status: all files reviewed, 6 unresolved discussions (waiting on @limonte, @jouni, @gatanaso, and @sudipta1411)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Left a few comments, but we can consider them as non-blocking.
</vaadin-demo-snippet> | ||
|
||
<h3>Validation</h3> | ||
<vaadin-demo-snippet id="number-field-demos-basic-valiation"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: validation
|
||
it('should not focus input when a button is clicked', () => { | ||
let hasFocus = false; | ||
input.focus = () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: would be better to use sinon.spy(input, 'focus')
instead
} | ||
|
||
:host([has-controls]) [part="value"] { | ||
text-align: center; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note: it makes sense to include most of these styles below (excluding font-size and padding) into the core styles, as they are currently copy-pasted in both Lumo and Material
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 16 files at r9, 19 of 23 files at r10, 4 of 4 files at r11.
Dismissed @sudipta1411, and @sudipta1411 from 4 discussions.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @limonte and @sudipta1411)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dismissed @limonte from a discussion.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @abdonrd and @sudipta1411)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dismissed @abdonrd from a discussion.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @sudipta1411)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dismissed @sudipta1411 from a discussion.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @gatanaso)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dismissed @manolo from a discussion.
Reviewable status: complete! all files reviewed, all discussions resolved
Connects to #296
This element is a specification over the vaadin-text-field element that allows numeric value input. The vaadin-number-field element can be used as a simple input element with decrease/increase buttons to update the value. Additionally, it supports specifying min/max input value limits. For more details, please refer to the documentation and demo pages of the component.
This change is