-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[Button] Fix disabled button text color #11067
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
Conversation
|
/snapit |
|
🫰✨ Thanks @laurkim! Your snapshot has been published to npm. Test the snapshot by updating your yarn add @shopify/polaris@0.0.0-snapshot-release-20231031134300 |
a62d812 to
ca47072
Compare
| &.disabled { | ||
| color: var(--p-color-text-brand-on-bg-fill-disabled); | ||
| // stylelint-disable-next-line polaris/conventions/polaris/custom-property-allowed-list -- Set disabled text color with Button custom property | ||
| color: var(--pc-button-text); |
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 think this should actually be --p-color-text-brand-on-bg-fill to set the color directly to a token value rather than an intermediary component custom property.
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.
ca47072 to
badcb58
Compare
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @shopify/polaris@12.0.3 ### Patch Changes - [#11018](#11018) [`38ed8a9ba`](38ed8a9) Thanks [@zaquille-oneil](https://github.com/zaquille-oneil)! - Fixed `TextField` blurring when interacting with the `Spinner` buttons - [#11067](#11067) [`a1cff3557`](a1cff35) Thanks [@laurkim](https://github.com/laurkim)! - Fixed disabled button styling on `ContextualSaveBar` component - [#11066](#11066) [`9d5fedbce`](9d5fedb) Thanks [@laurkim](https://github.com/laurkim)! - Fixed styling on `IndexTable` component header tooltip ## polaris.shopify.com@0.60.1 ### Patch Changes - Updated dependencies \[[`38ed8a9ba`](38ed8a9), [`a1cff3557`](a1cff35), [`9d5fedbce`](9d5fedb)]: - @shopify/polaris@12.0.3 Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
### WHY are these changes introduced?
Fixes disabled button text color that was flagged on `ContextualSaveBar`
during v12 bug hunt.
### WHAT is this pull request doing?
Updates disabled button styles in `ContextualSaveBar`.
<details>
<summary>ContextualSaveBar — before</summary>
<img
src="https://github.com/Shopify/polaris/assets/26749317/ed54d30a-2888-48d9-8f73-ec4caced2fea"
alt="ContextualSaveBar — before">
</details>
<details>
<summary>ContextualSaveBar — after</summary>
<img
src="https://github.com/Shopify/polaris/assets/26749317/66b3e9c3-0e2e-4f32-a763-2e5a81bd7dea"
alt="ContextualSaveBar — after">
</details>
### How to 🎩
[Storybook](https://5d559397bae39100201eedc1-tcijtkhntq.chromatic.com/?path=/story/all-components-contextualsavebar--disabled)
🖥 [Local development
instructions](https://github.com/Shopify/polaris/blob/main/README.md#local-development)
🗒 [General tophatting
guidelines](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md)
📄 [Changelog
guidelines](https://github.com/Shopify/polaris/blob/main/.github/CONTRIBUTING.md#changelog)
<!--
Give as much information as needed to experiment with the component
in the playground.
-->
<details>
<summary>Copy-paste this code in
<code>playground/Playground.tsx</code>:</summary>
```jsx
import React from 'react';
import {Page, Frame, ContextualSaveBar} from '../src';
export function Playground() {
return (
<Page title="Playground">
{/* Add the code you want to test in here */}
<div style={{height: '250px'}}>
<Frame
logo={{
width: 86,
contextualSaveBarSource:
'https://cdn.shopify.com/s/files/1/2376/3301/files/Shopify_Secondary_Inverted.png',
}}
>
<ContextualSaveBar
message="Unsaved changes"
saveAction={{
onAction: () => console.log('add form submit logic'),
loading: false,
disabled: true,
}}
discardAction={{
onAction: () => console.log('add clear form logic'),
}}
/>
</Frame>
</div>
</Page>
);
}
```
</details>
### 🎩 checklist
- [ ] Tested on
[mobile](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md#cross-browser-testing)
- [x] Tested on [multiple
browsers](https://help.shopify.com/en/manual/shopify-admin/supported-browsers)
- [ ] Tested for
[accessibility](https://github.com/Shopify/polaris/blob/main/documentation/Accessibility%20testing.md)
- [ ] Updated the component's `README.md` with documentation changes
- [ ] [Tophatted
documentation](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting%20documentation.md)
changes in the style guide
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @shopify/polaris@12.0.3 ### Patch Changes - [Shopify#11018](Shopify#11018) [`38ed8a9ba`](Shopify@947fba6) Thanks [@zaquille-oneil](https://github.com/zaquille-oneil)! - Fixed `TextField` blurring when interacting with the `Spinner` buttons - [Shopify#11067](Shopify#11067) [`a1cff3557`](Shopify@71ff008) Thanks [@laurkim](https://github.com/laurkim)! - Fixed disabled button styling on `ContextualSaveBar` component - [Shopify#11066](Shopify#11066) [`9d5fedbce`](Shopify@0679052) Thanks [@laurkim](https://github.com/laurkim)! - Fixed styling on `IndexTable` component header tooltip ## polaris.shopify.com@0.60.1 ### Patch Changes - Updated dependencies \[[`38ed8a9ba`](Shopify@947fba6), [`a1cff3557`](Shopify@71ff008), [`9d5fedbce`](Shopify@0679052)]: - @shopify/polaris@12.0.3 Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
WHY are these changes introduced?
Fixes disabled button text color that was flagged on
ContextualSaveBarduring v12 bug hunt.WHAT is this pull request doing?
Updates disabled button styles in
ContextualSaveBar.ContextualSaveBar — before
ContextualSaveBar — after
How to 🎩
Storybook
🖥 Local development instructions
🗒 General tophatting guidelines
📄 Changelog guidelines
Copy-paste this code in
playground/Playground.tsx:🎩 checklist
README.mdwith documentation changes