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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TextField] Remove deprecated lifecycle method #629
Conversation
UNRELEASED.md
Outdated
@@ -6,6 +6,8 @@ Use [the changelog guidelines](https://git.io/polaris-changelog-guidelines) to f | |||
|
|||
### Enhancements | |||
|
|||
-`TextField` no longer uses `componentWillReceiveProps` ([#628](https://github.com/Shopify/polaris-react/pull/628)) | |||
|
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.
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.
Prettier added this line, let me restart vscode code to check if it was an oddity.
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.
Seems prettier wants this line
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.
Looks good. Is it worth adding a test for the prevState.id
code path, too?
4729e2a
to
41cd30f
Compare
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.
馃帺 馃憤 after the conflict on unreleased of course :)
41cd30f
to
f407b28
Compare
### WHY are these changes introduced? Fixes [#629](Shopify/storefront-setup#629) The Icon component doesn't have the "Magic" colour yet, whereas the tokens are already available for use. We should add "magic" to the colour prop and the CSS. ### WHAT is this pull request doing? <img src="https://shopify.click/03-54-46fx7-wqvbe.png" width="300" /> - Added `magic` entry to the Icon color prop type. - Added corresponding CSS rule. - Added Storybook variant. ### 馃帺 checklist - [ ] Tested on [mobile](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md#cross-browser-testing) N/A - [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) N/A - [ ] Updated the component's `README.md` with documentation changes N/A - [ ] [Tophatted documentation](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting%20documentation.md) changes in the style guide N/A
### WHY are these changes introduced? Fixes [Shopify#629](https://github.com/Shopify/storefront-setup/issues/629) The Icon component doesn't have the "Magic" colour yet, whereas the tokens are already available for use. We should add "magic" to the colour prop and the CSS. ### WHAT is this pull request doing? <img src="https://shopify.click/03-54-46fx7-wqvbe.png" width="300" /> - Added `magic` entry to the Icon color prop type. - Added corresponding CSS rule. - Added Storybook variant. ### 馃帺 checklist - [ ] Tested on [mobile](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md#cross-browser-testing) N/A - [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) N/A - [ ] Updated the component's `README.md` with documentation changes N/A - [ ] [Tophatted documentation](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting%20documentation.md) changes in the style guide N/A
WHY are these changes introduced?
Part of #519
WHAT is this pull request doing?
How to 馃帺
Add a
console.log
to textfield render to check it's current id during render. Check the console, onChange will trigger the id switch.Copy-paste this code in
playground/Playground.tsx
: