-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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(FileUploader): support button variants and container sizes #5614
feat(FileUploader): support button variants and container sizes #5614
Conversation
Deploy preview for carbon-components-react ready! Built with commit 3f1ccd1 https://deploy-preview-5614--carbon-components-react.netlify.com |
Deploy preview for carbon-elements ready! Built with commit 3f1ccd1 |
is it possible to only include the primary and tertiary button options in the dropdown for this component? I would rather not let people have the option to change it to the others. for consistency |
sure, restricted button types to primary and tertiary |
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.
6eaebf7
to
3bc7fc8
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.
looks good to me ! thanks Andrew 🙌🏻
* Specify the size of the button, from a list of available sizes. | ||
* For `default` buttons, this prop can remain unspecified. | ||
*/ | ||
size: PropTypes.oneOf(['default', 'field', 'small']), |
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.
@tw15egan @laurenmrice Any thoughts on the list of size variant names? Just wanted to see if we have a chance to align this with some other components. 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.
Text input, Number input, Dropdown and Combobox all currently have this format (Extra large size (XL), Default size, Small size (sm)). While Button has this format (Default, Field, Small). Both are inconsistent to describe the same thing.
For file uploader, the drag and drop gets a knob for filename size, while the regular file uploader gets one knob for both button and a filename size because they need to scale together. I think for now it is probably fine how we have it, we are planning on reevaluating the naming convention of these components as apart of v11 to keep them all consistent, and that would fix this problem.
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.
We would eventually want it to be something like large
, medium/(default)
, and small
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 copied the field
and small
naming over from Button
since the file uploader is using a button but I can change it to lg, md/default, and sm. would we want that instead?
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.
Yeah I know, I am thinking if we change this one to a new naming convention right now it may confuse people even more because then it is different from the current button component.
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.
got it, I will leave it for now
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 @emyarod!
…es (carbon-design-system#5614)" This reverts commit 29d4c46.
…es (carbon-design-system#5614)" This reverts commit 29d4c46.
Closes #5436
This PR adds file uploader button variants as well as container size support (for upload button and uploaded items).
Changelog
New
size
prop fromFileUploaderButton
toFileUploader
FileUploader
Changed
Testing / Reviewing
Ensure the upload button/uploaded item elements are the correct size and ensure that different button variants are appearing correctly in the default uploader