8000 chore(button): update disabled badge styles by evwilkin · Pull Request #6616 · patternfly/patternfly · GitHub
[go: up one dir, main page]

Skip to content

chore(button): update disabled badge styles#6616

Merged
mcoker merged 9 commits intopatternfly:v6from
evwilkin:chore/6558-disabled-button-badge
May 31, 2024
Merged

chore(button): update disabled badge styles#6616
mcoker merged 9 commits intopatternfly:v6from
evwilkin:chore/6558-disabled-button-badge

Conversation

@evwilkin
Copy link
Member
@evwilkin evwilkin commented May 3, 2024

Closes #6558

This PR:

  • Adds a transparent border to the Badge
  • Updates this border color on the Badge as needed when used within a Button

@patternfly-build
Copy link
Collaborator
patternfly-build commented May 3, 2024

@mcoker
Copy link
Contributor
mcoker commented May 8, 2024

@evwilkin if you rebase, you should get the update to border--color--disabled from #6626

@lboehling - on evan's note about the badge background color, reading the original issue...

i updated the border--color--disabled semantic token to reference the disabled--200 base token. I also added the border color disabled to the disabled badge. so the disabled badge on disabled button should look like this!

That reads like we have a "disabled" badge (as a variation of the badge component) that should be used in a disabled button. And looking in figma, I see a disabled badge (the tooltip on the last one says type="disabled")

Screenshot 2024-05-07 at 7 17 09 PM

So I'm wondering - is the design intent that we have a disabled variation of the badge that we use here and in menu toggles (and anywhere else a badge might be included in something that's disabled)? Or is this a style update we apply in the button and other places we have disabled badges?

On a related note, I looked at menu toggle to see if there was any similarity and the count toggles look like they may have an issue. I looked to see if we're using the same disabled badge styles in disabled menu toggles, and looks like it's different... but not sure if that's on purpose or just an issue with the designs?

Screenshot 2024-05-07 at 7 23 57 PM

@kmcfaul kmcfaul linked an issue May 8, 2024 that may be closed by this pull request
@evwilkin evwilkin marked this pull request as ready for review May 9, 2024 18:21
Copy link
Contributor
@mcoker mcoker left a comment

Choose a reason for hiding this comment

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

Left some feedback in slack, but I think from the convo with @lboehling we're going to add a disabled variation to the badge that we can use when the badge is included in a disabled interactive thing.

@evwilkin
Copy link
Member Author

@lboehling if badges have disabled styling, is it correct to assume that there will be no difference in styling between read & unread badges that are disabled (ex: Badge & Button examples).

Screenshot 2024-05-13 at 5 13 45 PM

Screenshot 2024-05-13 at 4 37 42 PM

@lboehling
Copy link

@evwilkin, yep! There would be just one disabled style.

I'm noticing that the disabled badge uses the nonstatus color on-gray token for the text. Can you update it to use text--color--on-disabled? Thank you!

Copy link
Contributor
@mcoker mcoker 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! Just one small change to remove the screen reader text from the disabled/read examples 👍

@mattnolting mattnolting self-requested a review May 14, 2024 20:26
Copy link
Collaborator
@mattnolting mattnolting left a comment

Choose a reason for hiding this comment

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

For feature parity, looks like the disabled state needs pointer-events: none; for disabled state:

https://github.com/patternfly/patternfly/blob/v6/src/patternfly/components/MenuToggle/menu-toggle.scss#L315-L318

https://github.com/patternfly/patternfly/blob/main/src/patternfly/components/Button/button.scss#L585-L588

  &:is(:disabled, .pf-m-disabled) {
    --#{$badge}--Color: var(--#{$badge}--disabled--Color);
    --#{$badge}--BackgroundColor: var(--#{$badge}--disabled--BackgroundColor);

      pointer-events: none;
    }
  }

Copy link
Contributor
@mcoker mcoker left a comment

Choose a reason for hiding this comment

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

Changes LGTM for the referenced issue, but left a comment about a side effect of one of the hbs changes we'll need to clean up 👍

Copy link
Contributor
@mcoker mcoker left a comment

Choose a reason for hiding this comment

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

L🤘TM!

@kmcfaul
Copy link
Contributor
kmcfaul commented May 23, 2024

This should wait to merge until its react followup patternfly/patternfly-react#10417 is also ready for the release.

@mattnolting mattnolting self-requested a review May 23, 2024 15:23
Copy link
Collaborator
@mattnolting mattnolting left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@patternfly-build
Copy link
Collaborator

🎉 This PR is included in version 6.0.0-alpha.147 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

Badge/Button - adjust colors of badge on disabled buttons

6 participants

0