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

Button guidance PR #4409

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

alina-jacob
Copy link
Member

@alina-jacob alina-jacob commented Dec 13, 2024

Closes:
#4397: Belongs to button component guidance umbrella
#4176: Belongs to danger icon-only button guidance umbrella

Important links:
Figma file


Context

  • Added button guidance as a part of the consolidation effort from PAL to Core.
  • Updated content of Usage and Style Tab to better accommodate guidance and follow the current templates.
  • [Note: No content change has been done for the Button groups section.]

@alina-jacob alina-jacob self-assigned this Dec 13, 2024
Copy link

vercel bot commented Dec 13, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
carbondesignsystem ❌ Failed (Inspect) Jan 24, 2025 5:09pm

@alina-jacob alina-jacob added this to the 2024 Q4 milestone Dec 13, 2024
@alina-jacob alina-jacob mentioned this pull request Dec 13, 2024
1 task
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.

I need to finish reviewing but don't want to lose my comments so far. Update: I'm done reviewing. Its looking good though! Most of my comments are little things or on sections that were probably out of scope for your work but wanted to leave comments anyways.

@@ -84,13 +104,13 @@ communicate calls to action to the user and allow users to interact with pages
in a variety of ways. Button labels express what action will occur when the user
interacts with it.

#### When to use
### When to use
Copy link
Member

Choose a reason for hiding this comment

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

I know it's probably not consistent with other pages but I liked these as H4s more. Their hierarchy is just clearer since they're such short sections (just an opinion here).

Copy link
Member Author

Choose a reason for hiding this comment

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

I did a cursory glance on 25% of our components, among the first 10, about 4 components have "When to use" as an H3 and some content below it as "H4".


Maybe we can keep a rule that, if there's additional H4 content associated with "When and When not to use" content, use H3, if not then keep it H4.

As per that logic, Button will have it as H4, but screenshots attached above can continue to be the way they are!
Any thoughts on this @aagonzales and @laurenmrice?

Copy link
Member

Choose a reason for hiding this comment

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

Yeah maybe its that and if you don't have a lot of points to make in a bullet format and its just a sentence or two. I would be fine with keeping the H4 here in your scenario.

src/pages/components/button/usage.mdx Outdated Show resolved Hide resolved
src/pages/components/button/usage.mdx Outdated Show resolved Hide resolved
src/pages/components/button/usage.mdx Outdated Show resolved Hide resolved
src/pages/components/button/usage.mdx Outdated Show resolved Hide resolved
src/pages/components/button/usage.mdx Outdated Show resolved Hide resolved
src/pages/components/button/usage.mdx Outdated Show resolved Hide resolved
src/pages/components/button/usage.mdx Outdated Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

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

The overlay of this button looks off. Maybe try it with the multiply effect.

Copy link
Member Author

Choose a reason for hiding this comment

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

While creating this image, I was referring to the Menu buttons image where Thy has used a Magenta 30 overlay.

Referring to AI label and Tag, it uses Magenta 20 as an underlay and overlay respectively.
I won't be able to use an underlay for button, so doing an overlay with Magenta 20 (L-new) vs 30 (R-as is) for comparison, any preference? Magenta 20 looks better IMO!

image

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, multiply doesn’t seem to be working in this situation since the button blue is much higher contrast than our usual components where we overlay this color. I was unable to find your actual image in your file and I could not replicate an "Overlay" blend mode at Magenta 20 to get the result you are showing. But Magenta 30, @80% looks pretty similar to it.

In the production guidelines for dark themes in these highlight situations, Jeannie specified using opacity instead of multiply. Maybe we could use an opacity here and just use a lighter or darker magenta step color?

Here are some options below, if you go anywhere lighter or darker than these either in opacity or color step it starts to get weird.


Frame 1

Copy link
Member Author

Choose a reason for hiding this comment

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

The most accessible among these options (from a color contrast perspective) is the last option which is Magenta 40 at 60% opacity. Shall I proceed with that?

Copy link
Member

Choose a reason for hiding this comment

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

Could we use a tertiary button here instead of a primary? That might help with clarity. But I do like the Magenta 40 @60% that works fine IMO. Could maybe also add a border? Either way I think you can just pick an option @alina-jacob and we can be done with this one. Its an odd ball.
image

Copy link
Member Author

@alina-jacob alina-jacob Jan 22, 2025

Choose a reason for hiding this comment

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

Tertiary button idea is great, so I can do that!
I'll refer the AI label for specs.


image

Thanks guys!

src/pages/components/button/usage.mdx Outdated Show resolved Hide resolved
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, finished, awesome work @alina-jacob! Just smalls things. The style tab looked perfect, no notes there.

src/pages/components/button/usage.mdx Outdated Show resolved Hide resolved
src/pages/components/button/usage.mdx Outdated Show resolved Hide resolved
src/pages/components/button/usage.mdx Outdated Show resolved Hide resolved
src/pages/components/button/usage.mdx Outdated Show resolved Hide resolved
src/pages/components/button/usage.mdx Outdated Show resolved Hide resolved
src/pages/components/button/usage.mdx Outdated Show resolved Hide resolved
src/pages/components/button/usage.mdx Outdated Show resolved Hide resolved
@laurenmrice laurenmrice modified the milestones: 2024 Q4, 2025 Q1 Jan 2, 2025
Copy link
Member

@laurenmrice laurenmrice left a comment

Choose a reason for hiding this comment

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

Looking really good, Alina!! ⭐️ Just some smaller comments below:

src/pages/components/button/usage.mdx Outdated Show resolved Hide resolved
src/pages/components/button/usage.mdx Outdated Show resolved Hide resolved
src/pages/components/button/usage.mdx Outdated Show resolved Hide resolved
src/pages/components/button/usage.mdx Outdated Show resolved Hide resolved
src/pages/components/button/usage.mdx Outdated Show resolved Hide resolved
src/pages/components/button/style.mdx Outdated Show resolved Hide resolved
src/pages/components/button/style.mdx Outdated Show resolved Hide resolved
src/pages/components/button/style.mdx Outdated Show resolved Hide resolved
src/pages/components/button/style.mdx Outdated Show resolved Hide resolved
src/pages/components/button/style.mdx Outdated Show resolved Hide resolved
@laurenmrice
Copy link
Member

@kennylam or @emyarod When you have some time, would one of you be able to redeploy this so the preview stops failing? Thanks!

@kennylam
Copy link
Member

@laurenmrice Yep, looking into it right now.

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 it looks good! I just happened to notice this one last thing on the final read through. There are three different "Note" styles happening. Plain text, italic and inline notification. We should at least streamline the plain text and italic ones. My recommendation would be to use the italic.

image image image

src/pages/components/button/usage.mdx Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🚦 In Review
Development

Successfully merging this pull request may close these issues.

7 participants