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
feat: add QuantityInput component #378
Conversation
67d30c7
to
ce89206
Compare
2b3edfe
to
dc786ec
Compare
This looks great. I give it 1000 cabbage 🥬 I made some small changes to the style of the entered value/quantity indicators (as always), and replaced the error copies just to see if the ones indicated in the designs are clear enough. While doing that, I noticed the nit-pickiest thing: that the error message of the second QuantityInput (when the unit field is being validated) is not properly aligned like the rest. I wasn't sure what's causing it or how to fix it: Regarding the transparent end border applied to the first field: this make the component look closer to the designs, but the solution is a bit hacky. In case there's not a better way to achieve creating that shared 1px border, it might be better to make the border visible instead. |
.wikit-Lookup__label { | ||
position: absolute; | ||
width: 1px; | ||
height: 1px; |
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.
there are no tokens here ?
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.
There could be? But I don't get to understand what are they styling 🤔
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.
Ah, this was hiding the Label from the Lookup component so that it is still readable to screen readers. But we're no longer using the Lookup, but the LookupInput, so this is now unused code and can be removed.
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.
great
const enteredNumberText = '123'; | ||
|
||
wrapper.findComponent( Input ).vm.$emit( 'input', enteredNumberText ); | ||
await wrapper.vm.$nextTick(); |
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.
maybe also here ?
see comment here
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.
Good catch, done
P.S. |
I have to confess, I'm only aware of different bad solutions.:
|
Validation is done inside the application after all.
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.
Looking osom 🙌
wip
#377 needs to be merged first because this PR here needs it validation functionality.