-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[Layout foundations] Add support for LegacyCard in Card styles #8373
Conversation
/snapit |
🫰✨ Thanks @laurkim! Your snapshots have been published to npm. Test the snapshots by updating your yarn add @shopify/[email protected] yarn add @shopify/[email protected] yarn add @shopify/[email protected] yarn add @shopify/[email protected] |
size-limit report 📦
|
/snapit |
🫰✨ Thanks @laurkim! Your snapshots have been published to npm. Test the snapshots by updating your yarn add @shopify/[email protected] yarn add @shopify/[email protected] yarn add @shopify/[email protected] yarn add @shopify/[email protected] |
/snapit |
🫰✨ Thanks @laurkim! Your snapshots have been published to npm. Test the snapshots by updating your yarn add @shopify/[email protected] yarn add @shopify/[email protected] yarn add @shopify/[email protected] yarn add @shopify/[email protected] |
c129546
to
f0e2361
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.
Code and 🎩 Look good. Can we add an issue somewhere if you haven't already (maybe in the v11 main issue) to remove this code once Card has been removed?
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/[email protected] ### Major Changes - [#8360](#8360) [`fd28b3a7a`](fd28b3a) Thanks [@alex-page](https://github.com/alex-page)! - Disallows percentage and other CSS values as a unit ## @shopify/[email protected] ### Minor Changes - [#8337](#8337) [`8a15048e3`](8a15048) Thanks [@alex-page](https://github.com/alex-page)! - Rename migrations so they are prefixed with the relevant version number ### Patch Changes - Updated dependencies \[[`fd28b3a7a`](fd28b3a)]: - @shopify/[email protected] ## @shopify/[email protected] ### Patch Changes - Updated dependencies \[[`8a15048e3`](8a15048)]: - @shopify/[email protected] ## @shopify/[email protected] ### Patch Changes - [#8373](#8373) [`684881b68`](684881b) Thanks [@laurkim](https://github.com/laurkim)! - Added support for `LegacyCard` in `Card` classes - [#8344](#8344) [`61f4e9254`](61f4e92) Thanks [@kyledurand](https://github.com/kyledurand)! - Fixed broken links in storybook and documentation examples ## [email protected] ### Patch Changes - [#8344](#8344) [`61f4e9254`](61f4e92) Thanks [@kyledurand](https://github.com/kyledurand)! - Fixed broken links in storybook and documentation examples - Updated dependencies \[[`684881b68`](684881b), [`61f4e9254`](61f4e92)]: - @shopify/[email protected] Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…fy#8373) ### WHY are these changes introduced? As we're migrating usage of Card to LegacyCard, there are cases where components are nested as `Card` + `LegacyCard` so classes aren't getting properly applied in this use case and causing visual regressions. <details> <summary>Card with missing spacing</summary> <img src="https://user-images.githubusercontent.com/26749317/219107735-a6af62d2-f21c-40c1-b271-55d2debcb967.png" alt="Card with missing spacing"> </details> ### WHAT is this pull request doing? Adds support for nested LegacyCard or Card classes in `LegacyCard.scss` and `Card.scss`. [Spin instance](https://admin.web.fix-classes-foundations.lo-kim.us.spin.dev/store/shop1/products/1) <details> <summary>Fixed card</summary> <img src="https://user-images.githubusercontent.com/26749317/219118069-371575c4-9720-455e-b124-343a667ad811.png" alt="Fixed card"> </details> <!-- ℹ️ Delete the following for small / trivial changes --> ### 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) <!-- 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} from '../src'; export function Playground() { return ( <Page title="Playground"> {/* Add the code you want to test in here */} </Page> ); } ``` </details> ### 🎩 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) - [ ] 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/[email protected] ### Major Changes - [Shopify#8360](Shopify#8360) [`fd28b3a7a`](Shopify@fd28b3a) Thanks [@alex-page](https://github.com/alex-page)! - Disallows percentage and other CSS values as a unit ## @shopify/[email protected] ### Minor Changes - [Shopify#8337](Shopify#8337) [`8a15048e3`](Shopify@8a15048) Thanks [@alex-page](https://github.com/alex-page)! - Rename migrations so they are prefixed with the relevant version number ### Patch Changes - Updated dependencies \[[`fd28b3a7a`](Shopify@fd28b3a)]: - @shopify/[email protected] ## @shopify/[email protected] ### Patch Changes - Updated dependencies \[[`8a15048e3`](Shopify@8a15048)]: - @shopify/[email protected] ## @shopify/[email protected] ### Patch Changes - [Shopify#8373](Shopify#8373) [`684881b68`](Shopify@684881b) Thanks [@laurkim](https://github.com/laurkim)! - Added support for `LegacyCard` in `Card` classes - [Shopify#8344](Shopify#8344) [`61f4e9254`](Shopify@61f4e92) Thanks [@kyledurand](https://github.com/kyledurand)! - Fixed broken links in storybook and documentation examples ## [email protected] ### Patch Changes - [Shopify#8344](Shopify#8344) [`61f4e9254`](Shopify@61f4e92) Thanks [@kyledurand](https://github.com/kyledurand)! - Fixed broken links in storybook and documentation examples - Updated dependencies \[[`684881b68`](Shopify@684881b), [`61f4e9254`](Shopify@61f4e92)]: - @shopify/[email protected] Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
WHY are these changes introduced?
As we're migrating usage of Card to LegacyCard, there are cases where components are nested as
Card
+LegacyCard
so classes aren't getting properly applied in this use case and causing visual regressions.Card with missing spacing
WHAT is this pull request doing?
Adds support for nested LegacyCard or Card classes in
LegacyCard.scss
andCard.scss
.Spin instance
Fixed card
How to 🎩
🖥 Local development instructions
🗒 General tophatting guidelines
📄 Changelog guidelines
Copy-paste this code in
playground/Playground.tsx
:🎩 checklist
README.md
with documentation changes