-
Notifications
You must be signed in to change notification settings - Fork 1.2k
<Box> Replace border shorthand with individual values for color, width and style #8910
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
Changeset
size-limit report 📦
|
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.
I like the idea! Looks like some things could use some cleaning up but otherwise I'm onboard.
polaris.shopify.com/pages/examples/bleed-specific-direction.tsx
Outdated
Show resolved
Hide resolved
polaris.shopify.com/pages/examples/bleed-specific-direction.tsx
Outdated
Show resolved
Hide resolved
| overflowY="hidden" | ||
| background="bg" | ||
| borderRadius="2" | ||
| outline="transparent" |
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.
Unsure what the purpose of this is here. Removing it.
|
@aaronccasanova @lgriffee @laurkim @kyledurand can I get one more thorough review here. If it looks good lets get this into |
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.
Still some pretty funky stuff going on with borders here. Looks like we've lost the radius in some cases and they're getting doubled up as well.
Edit
I pushed up a change for setting default widths from initial to 0.
Seems to have fixed a bunch of chromatic issues 660c1aa
Co-authored-by: Kyle Durand <kyledurand@users.noreply.github.com>
Co-authored-by: Lo Kim <lo.kim@shopify.com>
Co-authored-by: Lo Kim <lo.kim@shopify.com>
chloerice
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.
Changes look great! We just need migrations for this to ship.
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@10.45.0 ### Minor Changes - [#8910](#8910) [`91a9b77e6`](91a9b77) Thanks [@alex-page](https://github.com/alex-page)! - <Box> Replaced outline, border, borderBlockEnd, borderBlockStart, borderInlineEnd, borderInlineStart properties with access to borderColor, borderWidth, outlineColor and outlineWidth ### Patch Changes - [#8990](#8990) [`9674cc906`](9674cc9) Thanks [@heyjoethomas](https://github.com/heyjoethomas)! - Update tokens for border of `Tabs` on hover and pressed state to create better quality interaction. ## @shopify/polaris-cli@0.1.29 ## @shopify/polaris-icons@6.13.0 ### Minor Changes - [#8924](#8924) [`4880e3ed7`](4880e3e) Thanks [@Tal87](https://github.com/tal87)! - Added PersonalizedTextMajor icon * [#8861](#8861) [`2bc90503d`](2bc9050) Thanks [@AlejandroE](https://github.com/AlejandroE)! - Added ExploreImagesMajor - [#8919](#8919) [`7349d4108`](7349d41) Thanks [@skparkk](https://github.com/skparkk)! - Added new keyboard major + minor icons ## polaris.shopify.com@0.49.1 ### Patch Changes - Updated dependencies \[[`9674cc906`](9674cc9), [`91a9b77e6`](91a9b77)]: - @shopify/polaris@10.45.0 --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Alex Page <hi@alexpage.dev>
…h and style (Shopify#8910) ### WHY are these changes introduced? Gives users access to our color tokens, width tokens and the option to have different border styles. ### WHAT is this pull request doing? - [x] Replaces all the shorthand border usage in Box with access to borderColor, borderWidth and borderStyle - [x] Does the same thing for outline - [x] Replaces `outline` `border` `borderBlockEnd` `borderInlineStart` `borderInlineEnd` `borderBlockStart` with `outlineColor`, `outlineStyle`, `borderColor` and `borderStyle` - [x] Defaults the `borderStyle` to `solid` when a `border/outlineColor` or `border/outlineWidth` prop is used - [x] Updates usage `Box` components that used these values **⚠️ Important note** This is a breaking change for the Alpha Box component --------- Co-authored-by: Laura Griffee <laura@mailzone.com> Co-authored-by: Lo Kim <lo.kim@shopify.com> Co-authored-by: Kyle Durand <kyledurand@users.noreply.github.com>
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@10.45.0 ### Minor Changes - [Shopify#8910](Shopify#8910) [`91a9b77e6`](Shopify@91a9b77) Thanks [@alex-page](https://github.com/alex-page)! - <Box> Replaced outline, border, borderBlockEnd, borderBlockStart, borderInlineEnd, borderInlineStart properties with access to borderColor, borderWidth, outlineColor and outlineWidth ### Patch Changes - [Shopify#8990](Shopify#8990) [`9674cc906`](Shopify@9674cc9) Thanks [@heyjoethomas](https://github.com/heyjoethomas)! - Update tokens for border of `Tabs` on hover and pressed state to create better quality interaction. ## @shopify/polaris-cli@0.1.29 ## @shopify/polaris-icons@6.13.0 ### Minor Changes - [Shopify#8924](Shopify#8924) [`4880e3ed7`](Shopify@4880e3e) Thanks [@Tal87](https://github.com/tal87)! - Added PersonalizedTextMajor icon * [Shopify#8861](Shopify#8861) [`2bc90503d`](Shopify@2bc9050) Thanks [@AlejandroE](https://github.com/AlejandroE)! - Added ExploreImagesMajor - [Shopify#8919](Shopify#8919) [`7349d4108`](Shopify@7349d41) Thanks [@skparkk](https://github.com/skparkk)! - Added new keyboard major + minor icons ## polaris.shopify.com@0.49.1 ### Patch Changes - Updated dependencies \[[`9674cc906`](Shopify@9674cc9), [`91a9b77e6`](Shopify@91a9b77)]: - @shopify/polaris@10.45.0 --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Alex Page <hi@alexpage.dev>
…h and style (Shopify#8910) ### WHY are these changes introduced? Gives users access to our color tokens, width tokens and the option to have different border styles. ### WHAT is this pull request doing? - [x] Replaces all the shorthand border usage in Box with access to borderColor, borderWidth and borderStyle - [x] Does the same thing for outline - [x] Replaces `outline` `border` `borderBlockEnd` `borderInlineStart` `borderInlineEnd` `borderBlockStart` with `outlineColor`, `outlineStyle`, `borderColor` and `borderStyle` - [x] Defaults the `borderStyle` to `solid` when a `border/outlineColor` or `border/outlineWidth` prop is used - [x] Updates usage `Box` components that used these values **⚠️ Important note** This is a breaking change for the Alpha Box component --------- Co-authored-by: Laura Griffee <laura@mailzone.com> Co-authored-by: Lo Kim <lo.kim@shopify.com> Co-authored-by: Kyle Durand <kyledurand@users.noreply.github.com>
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@10.45.0 ### Minor Changes - [Shopify#8910](Shopify#8910) [`91a9b77e6`](Shopify@9e5876e) Thanks [@alex-page](https://github.com/alex-page)! - <Box> Replaced outline, border, borderBlockEnd, borderBlockStart, borderInlineEnd, borderInlineStart properties with access to borderColor, borderWidth, outlineColor and outlineWidth ### Patch Changes - [Shopify#8990](Shopify#8990) [`9674cc906`](Shopify@807c9d8) Thanks [@heyjoethomas](https://github.com/heyjoethomas)! - Update tokens for border of `Tabs` on hover and pressed state to create better quality interaction. ## @shopify/polaris-cli@0.1.29 ## @shopify/polaris-icons@6.13.0 ### Minor Changes - [Shopify#8924](Shopify#8924) [`4880e3ed7`](Shopify@1ad1a62) Thanks [@Tal87](https://github.com/tal87)! - Added PersonalizedTextMajor icon * [Shopify#8861](Shopify#8861) [`2bc90503d`](Shopify@3dc9640) Thanks [@AlejandroE](https://github.com/AlejandroE)! - Added ExploreImagesMajor - [Shopify#8919](Shopify#8919) [`7349d4108`](Shopify@e29f62e) Thanks [@skparkk](https://github.com/skparkk)! - Added new keyboard major + minor icons ## polaris.shopify.com@0.49.1 ### Patch Changes - Updated dependencies \[[`9674cc906`](Shopify@807c9d8), [`91a9b77e6`](Shopify@9e5876e)]: - @shopify/polaris@10.45.0 --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Alex Page <hi@alexpage.dev>

WHY are these changes introduced?
Gives users access to our color tokens, width tokens and the option to have different border styles.
WHAT is this pull request doing?
outlineborderborderBlockEndborderInlineStartborderInlineEndborderBlockStartwithoutlineColor,outlineStyle,borderColorandborderStyleborderStyletosolidwhen aborder/outlineColororborder/outlineWidthprop is usedBoxcomponents that used these values