-
Notifications
You must be signed in to change notification settings - Fork 538
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
Bug fix: default Button disabled bg-color #4379
Conversation
🦋 Changeset detectedLatest commit: 2516a21 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
size-limit report 📦
|
@@ -871,6 +874,7 @@ exports[`Button respects the small size prop 1`] = ` | |||
|
|||
.c0:disabled [data-component=ButtonCounter] { | |||
color: inherit; | |||
background-color: var(--button-default-bgColor-disabled,undefined); |
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.
This seems weird, but noticing the rest of the snapshot has similar undefined
🤷🏻
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.
Oh.. that's not good. Investigating
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.
Actually, this looks like a normal thing that happens. I tested it in Storybook and the value is there. Its not great but we're getting rid of snaps soon anyways. Thanks for flagging!
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 made a very similar comment. Ignore me if this is expected behavior.
@@ -18,6 +18,7 @@ export const getVariantStyles = (variant: VariantType = 'default', theme?: Theme | |||
'&:disabled': { | |||
color: 'primer.fg.disabled', | |||
borderColor: `var(--button-default-borderColor-disabled, ${theme?.colors.btn.border})`, | |||
backgroundColor: `var(--button-default-bgColor-disabled, ${theme?.colors.input.disabledBg})`, |
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.
Are we sure theme.colors.input.disabledBg
is the right path for the fallback? It's rendering as undefined
in the Jest snapshot tests.
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.
It looks like the border color above is also undefined, so I assumed there's something up with the test
* btn bg + stories * Create young-cooks-shave.md * test(vrt): update snapshots * snippy snappers * move bg color --------- Co-authored-by: langermank <langermank@users.noreply.github.com>
background-color
for the default Button disabled stateRollout strategy
Testing & Reviewing
Merge checklist