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
chore(@clayui/form): add regular size to input storybook and make it … #5801
base: master
Are you sure you want to change the base?
Conversation
…the default value
@@ -12,7 +12,7 @@ export default { | |||
argTypes: { | |||
sizing: { | |||
control: {type: 'select'}, | |||
options: ['lg', 'sm'], | |||
options: ['lg', 'regular', 'sm'], |
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 this could be an option in the API directly instead of just in the storybook? we can add regular
and if it is passed, we leave it as the default value. What do you think?
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.
I don't have a strong opinion on this. Do you think it will make it clearer for everyone to understand sizing if we add a regular value? I always thought the default was implied if the sizing attribute wasn't specified.
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.
Well, I thought that too when sizing
is not defined it would imply that it is using the regular value but I think that when you are defining the size it is strange for you to look at it and see that there is only lg and sm this is something else implicit than explicit so maybe we can just make it more explicit I think this is more aesthetic too.
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.
I think adding regular may make sense, but if we want to add that we should probably be applying that consistently. For instance button currently has the options: null | xs | sm
. @drakonux were you thinking the regular
option should be applied everywhere?
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.
Oh yes I agree with that, it makes a lot of sense to do this for all components.
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.
@drakonux do you think it makes sense to make this change across all components?
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.
Yes @ethib137 . Let's make a decision and apply it consistently. We are using regular size for buttons and also for inputs in the Figma library as examples.
Our top priority is maintaining a consistent approach with Clay and ensuring one-to-one correspondence at all components.
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.
Okay buttons and inputs sound good. Are there any other usages of regular that we should apply this too?
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.
I went ahead and added it to the Input and Button. We have some other components with size
as well:
- Table
- Sheet
- LoadingIndicator
- Modal
- MultiSelect
- Pagination
- PaginationBar
- Panel
- Sticker
Does it make sense to add to these too? I would say yes since we are talk for consistency here but I will wait for other opinions to see if I'm missing something.
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.
@drakonux what do you think?
…the default value
https://liferay.atlassian.net/browse/LPD-17804