-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TextField, Radio, Checkbox] Add styles for AI generated values (#10819)
<!-- ☝️How to write a good PR title: - Prefix it with [ComponentName] (if applicable), for example: [Button] - Start with a verb, for example: Add, Delete, Improve, Fix… - Give as much context as necessary and as little as possible - Prefix it with [WIP] while it’s a work in progress --> ### WHY are these changes introduced? This PR introduces a new `tone` prop with a possible value "magic" for determining the values in the component have been generated by AI. It uses the `--p-color-text-magic` color token and serves as an example for how the rest of styles in this and other components should be implemented. References #10152 ### WHAT is this pull request doing? This follows the pattern suggested by the Polaris team. After considering applying the styles with a `data-ai-generated` attribute so it could be modified via DOM manipulation I discarded that option. ![Screenshot 2023-10-23 at 9 33 27 AM](https://github.com/Shopify/polaris/assets/36676/a1c51eb0-e0f7-4c21-9c15-c2aa4c22d0f9) Radio in web ![Screenshot 2023-10-24 at 1 13 51 PM](https://github.com/Shopify/polaris/assets/36676/3bf9bbee-569a-4e1e-b281-8049d0f02ebe) Checkbox <img width="571" alt="Screenshot 2023-10-26 at 11 03 40 AM" src="https://github.com/Shopify/polaris/assets/36676/0d5e197a-488b-418b-b698-7d4ad14771b4"> hover <img width="570" alt="Screenshot 2023-10-26 at 11 10 51 AM" src="https://github.com/Shopify/polaris/assets/36676/eb37c2df-1545-45b8-a1a4-83f51cd5c1cb"> checked <img width="573" alt="Screenshot 2023-10-26 at 11 03 59 AM" src="https://github.com/Shopify/polaris/assets/36676/20360362-effe-4982-b382-1a1f70670932"> ### How to 🎩 🖥 [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) - Added a new story in Storybook for showing the variant. ### 🎩 checklist - [x] 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) - [x] 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 - [x] [Tophatted documentation](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting%20documentation.md) changes in the style guide
- Loading branch information
Showing
15 changed files
with
243 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
'@shopify/polaris': minor | ||
--- | ||
|
||
- Added `tone` prop with `magic` value to `TextField` | ||
- Added `tone` prop with `magic` value to `ChoiceList` | ||
- Added `tone` prop with `magic` value to `Checkbox` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.