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

feat(Button, OrderedList, UnorderedList): add expressive styles #8477

Merged
merged 24 commits into from
May 12, 2021

Conversation

jnm2377
Copy link
Contributor

@jnm2377 jnm2377 commented Apr 21, 2021

Closes #8301

Went back and forth about whether or not to create a different component for this or just adding a prop to the existing code. Ultimately, since we felt the style changes were minor (with type style being the main thing changing), we went with just adding a prop to toggle a className. Totally open to feedback if the team thinks there is a better way to do this.

New

  • adds expressive prop for Button, OrderedList and UnorderedList
  • adds IconOnly ghost button to playground story so that isSelected knob will actually do something

Testing / Reviewing

  • View the Playground story knobs for Button to toggle expressive styles
  • View Nested story knobs for OrderedList and UnorderedList to toggle expressive styles

@netlify
Copy link

netlify bot commented Apr 21, 2021

Deploy preview for carbon-elements ready!

Built with commit 61d08d8

https://deploy-preview-8477--carbon-elements.netlify.app

@netlify
Copy link

netlify bot commented Apr 21, 2021

Deploy preview for carbon-components-react ready!

Built without sensitive environment variables with commit 61d08d8

https://deploy-preview-8477--carbon-components-react.netlify.app

@shixiedesign
Copy link
Contributor

So. Excited. Thank you Josefina! A few possible changes but I wanna wait a few more hours so I can discuss with other designers. More soon!

Copy link
Contributor

@shixiedesign shixiedesign left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey! So this is looking very good. The only 1 minor request for change is: is it possible to disallow button size option for field and small when expressive is toggled on? The smaller buttons don't look good with 16px label and we don't wanna make them available:

image

So if based on the new size prop values, the expressive button size options would be:

lg = 48
xl = 64
2xl = 80

@jnm2377 jnm2377 requested a review from a team as a code owner April 22, 2021 20:18
@jnm2377 jnm2377 requested review from a team and aagonzales and removed request for a team April 23, 2021 13:15
@aagonzales
Copy link
Member

The only 1 minor request for change is: is it possible to disallow button size option for field and small when expressive is toggled on? The smaller buttons don't look good with 16px label and we don't wanna make them available

This actually bring up an interesting point. Should we just not provide code for those smaller expressive options. We don't want those to exist at all correct? @shixiedesign

@tw15egan
Copy link
Collaborator

@aagonzales We could enforce it on the code side if someone passed down xs, sm, field or small, and they have passed down isExpressive, it will just map to lg

@jnm2377 jnm2377 requested a review from tw15egan April 29, 2021 22:15
@jnm2377
Copy link
Contributor Author

jnm2377 commented May 4, 2021

@aagonzales @tw15egan @emyarod Updated the PR. Expressive buttons now default to a min of 48px height, but can be used with larger sizes. Icon only expressive buttons also can be used in larger sizes, but if they're not expressive the default sizing stays the same (i.e. doesn't go above 48px).

See recording below for testing:

Screen.Recording.2021-05-04.at.2.28.01.PM.mov

@jnm2377 jnm2377 requested review from tw15egan and emyarod May 4, 2021 19:33
@aagonzales
Copy link
Member

Oops guys I may have been wrong about the icon-only button. Talking to @jeanservaas now.

@jeanservaas
Copy link
Collaborator

jeanservaas commented May 4, 2021

@aagonzales @emyarod @tw15egan @jnm2377 @andreancardona

Ug. OK, sorry, trying to get up to speed with the conversation. Are we talking about having:

  1. icon only button that is 48px with a 16px icon
    and
  2. icon only button that is 48px with a 20px icon (expressive)

I got your question mixed up Anna... I thought you were asking about "fluid" icon buttons. But yes, we DO need to give them a. 48px icon only button with a 20px icon

So for the expressive button variants, we would make these BUTTON variants with the 16px type

  • lg = 48px with 16px type
  • xl = 64px with 16px type
  • 2xl 80px with 16px type

And only one ICON ONLY BUTTON variant expressive variant

  • lg = 48px with 16px type

It would not make sense to make a fluid icon only button, because the type on our fluid (64 and 80px buttons) is not vertically centered. Icon only buttons do not bleed to the edge of containers (unless @shixiedesign has a use case i'm not aware of)

Copy link
Member

@emyarod emyarod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

given that the expressive theme will only affect certain button variants, would it make more sense to have a separate Expressive story rather than having some knobs in the Playground story that have no effect on certain button variants?

@jnm2377 jnm2377 requested a review from emyarod May 11, 2021 19:54
@jnm2377
Copy link
Contributor Author

jnm2377 commented May 11, 2021

@aagonzales @emyarod @tw15egan @jeanservaas this is ready for re-review. We added an expressive specific story, and updated icon-only expressive button to be only 48px. 👍🏽

Copy link
Member

@aagonzales aagonzales left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I think this all looks correct now! Thanks for hanging in there y'all.

Copy link
Collaborator

@tw15egan tw15egan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few comments but looking good 👍🏻

packages/components/src/components/button/_button.scss Outdated Show resolved Hide resolved
packages/react/src/components/Button/Button-story.js Outdated Show resolved Hide resolved
packages/react/src/components/Button/Button.js Outdated Show resolved Hide resolved
@jnm2377
Copy link
Contributor Author

jnm2377 commented May 11, 2021

@tw15egan updated 👍🏽

Copy link
Collaborator

@tw15egan tw15egan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

Copy link
Member

@emyarod emyarod left a 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

@kodiakhq kodiakhq bot merged commit c829406 into carbon-design-system:main May 12, 2021
@tw15egan tw15egan mentioned this pull request May 13, 2021
22 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add expressive List & Button
9 participants