-
Notifications
You must be signed in to change notification settings - Fork 198
FieldInput: Make input element cover the whole box #579
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
Conversation
|
This pull request is being automatically deployed with Vercel (learn more). design-system – ./🔍 Inspect: https://vercel.com/strapijs/design-system/2pr45Dqnf8Ue3eBGsAn8UEpJCWU4 design-system-website – ./website🔍 Inspect: https://vercel.com/strapijs/design-system-website/47b69cDHtZvpJsj29AoPZBAmdvwQ |
HichamELBSI
left a comment
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 thanks.
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.
hey, will try to find a proposal about how we can handle it but not using getThemeSize also means that we lose the S size documented in the DS system 😰
|
@ronronscelestes Ah, I didn't see how/ if the small size would be affected by that. If so (I'll double-check tomorrow), we could just reduce the padding for that size I guess. Or do you have something different in mind? There is basically no way to set an explicit |
|
@gu-stav interesting didn't know that! Then you what do you think about keeping the getThemeStyle['input'] but with padding values, just to ensure we are using theme sizes? If we want to make a change one day it will be passed on to all "inputs" components using it (aka ToggleCheckbox and Select). |
|
@ronronscelestes I've fixed For now, I'd keep the padding definition local, because I don't think we should advertise it since all other components use an explicit height. It works for them because they aren't native input fields. I'd consider this a fix and not a methodology. If we would put it into a general schema/ function, we'd need to find a good name for it and start to advertise its usage. I'd therefore keep it local to the component if it's ok for you. |
|
hey @gu-stav tbh I'm not 100% fan we remove usage of sizes object for the inputs, that would be nice indeed to find a more global way to handle this. |
5a2256c to
5eedcb1
Compare
|
Can we merge this one @gu-stav ? |
|
@HichamELBSI from my side: yes. @ronronscelestes was not happy with the implementation and asked for your feedback. That's the reason why I kept it open. |
|
Let's merge this PR and create a card in the DS backlog to not forget how we can handle this globally. @gu-stav @ronronscelestes |
Before this PR the actual
inputelement didn't cover the full height of it's wrapper. This leads to the problem that you can not click everywhere since the click might end up in the wrapper.This PR removes height from the wrapper and bumps to a height of the input elements to the same as the container by using padding. It is not possible to use
heighton input fields - therefore I had to use some magic numbers.Demo