Skip to content
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

Update size prop in components to use consistent terms for size #8151

Closed
joshblack opened this issue Mar 22, 2021 · 6 comments
Closed

Update size prop in components to use consistent terms for size #8151

joshblack opened this issue Mar 22, 2021 · 6 comments

Comments

@joshblack
Copy link
Contributor

joshblack commented Mar 22, 2021

Currently size in component code are:
image

But should be:

  • Small: 32px
  • Medium/default: 40px
  • Large: 48px

This issue is for updating the API of components that accept a size prop to follow this convention. If it's possible, it would be preferred to add these options in as part of the existing API and deprecate existing options before we remove them in v11.

@joshblack joshblack added type: enhancement 💡 package: react carbon-components-react version: 11 Issues pertaining to Carbon v11 labels Mar 22, 2021
@joshblack joshblack removed the version: 11 Issues pertaining to Carbon v11 label Mar 22, 2021
@joshblack joshblack added this to the 2021 Alpha Release milestone Mar 22, 2021
@tw15egan
Copy link
Member

tw15egan commented Mar 22, 2021

Just to clarify, the prop names will be small, medium (the default prop value), and large?

This will make it easier to maintain backward compatibility, as some current defaults are "lg" which would incorrectly map to large (existing xl) styles

I don't think will be an issue and t-shirt sizes are more concise

@tw15egan
Copy link
Member

tw15egan commented Mar 22, 2021

List of components that use the size prop:

  • Accordion
  • Button
  • Listbox
    • Combobox
    • Dropdown
    • Multiselect
    • Filterable Multiselect
  • Content Switcher
  • DatePicker
  • FileUploader
    • FileUploaderButton
    • FileUploaderDropContainer
    • FileUploaderItem
  • Link
  • Modal
    • ComposedModal
  • Number Input
  • Overflow Menu
  • Search
  • Select
  • Tag
  • Text Input
  • Time Picker
  • Toggle

Questions:

  • Do we want to keep the field button size?
  • Data Table has a few sizes (compact, short, normal, tall). Do we want to change any of these?
  • Treeview has a size prop with default and compact. Do we want to change these?

@joshblack
Copy link
Contributor Author

@tw15egan great questions, I'm down for sm, md, lg or small, medium, large, whatever makes more sense.

@aagonzales what would you recommend for TJ's questions above for field on Button, DataTable, and TreeView? 👀

@tw15egan
Copy link
Member

@joshblack looking into it a bit more, it seems like we should be good just sticking with the current t-shirt sizes vs. the full name. This will also give us a bit more flexibility for adding xs variants ( extra-small is a bit cumbersome)

@tw15egan
Copy link
Member

All changes have been made with the exceptions for the following components:

  • Button
  • FileUploader
  • Search

@joshblack
Copy link
Contributor Author

Closed for #8370

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants