-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Update ChoiceList to use Layout primitives
#7751
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
### WHY are these changes introduced? Fixes #7341 <!-- link to issue if one exists -->
### WHY are these changes introduced? Fixes #7358 ### WHAT is this pull request doing? Refactors `Banner` component to use new layout primitive components
### WHY are these changes introduced? Resolves #7340. Refactors `Modal` and its child components to use our layout primitives. ### WHAT is this pull request doing? [Storybook URL](https://5d559397bae39100201eedc1-nrruulmwsh.chromatic.com/?path=/story/all-components-modal--default). Refactors `Modal`, `Modal.Section`, `Modal.Header`, and `Modal.Footer` to use our layout primitives and remove css. ### How to 🎩 [Storybook URL](https://5d559397bae39100201eedc1-nrruulmwsh.chromatic.com/?path=/story/all-components-modal--default). I've tophatted all of our stories as well as the UI for all of our breakpoints. 🖥 [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) ### 🎩 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) - [ ] 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
I'm still of the opinion that our layout components should have some defaults and the ones we have on bleed may not be right but we need to use it in more places to figure out what those defaults should be. For now, this fixes regressions to Banner that were introduced in #7644
size-limit report 📦
|
laurkim
left a comment
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.
Nice! 💯
kyledurand
left a comment
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.
👏
Co-authored-by: Lo Kim <lo.kim@shopify.com>
sarahill
left a comment
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.
@aveline this looks ok. I would prefer to keep spacing between 16px instead of the 20px due to the space-1 but I understand why that's there. A potential alternative is to make the spacing on the help text responsive too but it may not be worth adding that complexity for this. Thoughts?
|
@sarahill the help text is part of But you did give me an idea, maybe I can add a responsive |
|
Cool I'll trust your judgement on using |
8e25493 to
54cdf64
Compare
Resolves #7354 - Refactored `ChoiceList` to use primitive Layout components - Added support for `legend` element to `Box` - Add support for `fieldset` element to `AlphaStack` There should be no visual changes. Co-authored-by: Lo Kim <lo.kim@shopify.com> Co-authored-by: Kyle Durand <kyledurand@users.noreply.github.com>
Resolves #7354 - Refactored `ChoiceList` to use primitive Layout components - Added support for `legend` element to `Box` - Add support for `fieldset` element to `AlphaStack` There should be no visual changes. Co-authored-by: Lo Kim <lo.kim@shopify.com> Co-authored-by: Kyle Durand <kyledurand@users.noreply.github.com>
Resolves #7354 - Refactored `ChoiceList` to use primitive Layout components - Added support for `legend` element to `Box` - Add support for `fieldset` element to `AlphaStack` There should be no visual changes. Co-authored-by: Lo Kim <lo.kim@shopify.com> Co-authored-by: Kyle Durand <kyledurand@users.noreply.github.com>
Resolves #7354 - Refactored `ChoiceList` to use primitive Layout components - Added support for `legend` element to `Box` - Add support for `fieldset` element to `AlphaStack` There should be no visual changes. Co-authored-by: Lo Kim <lo.kim@shopify.com> Co-authored-by: Kyle Durand <kyledurand@users.noreply.github.com>
WHY are these changes introduced?
Resolves #7354
WHAT is this pull request doing?
ChoiceListto use primitive Layout componentslegendelement toBoxfieldsetelement toAlphaStackHow to 🎩
There is only one small visual change for
ChoiceLists with Help text on small screens only. There isspace-1additional spacing between items which ismarginon Help Text that long longer overlaps into the space betweenChoicesnow that the space is set withgapinAlphaStack. Previously it was set withmarginso they overlapped.Otherwise there should be no visual changes.