-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[Layout foundations][Batch 3] Rebuild components with layout primitives #7950
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
Merged
Conversation
This file contains hidden or 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
### WHY are these changes introduced? Resolves #7835 ### WHAT is this pull request doing? Update `Tabs` component to use layout primitives Co-authored-by: Kyle Durand <kyledurand@users.noreply.github.com>
size-limit report 📦
|
### WHY are these changes introduced? Fixes #7952 ### WHAT is this pull request doing? Updates `OptionList` to use new layout primitives. One small visual change with this update due to replacing `margin` with `padding` is a slight increase (`4px`) in spacing when there are multiple sections in an `OptionList`. I don't think the added complexity to keep this the same as current doesn't seem worth it, but happy to hear other thoughts. **Update:** Added a `Bleed` to resolve the spacing change. Feels hacky but prevents the visual change.
Closes #7916 Spin link: https://admin.web.web-tdr8.kyle-durand.us.spin.dev/store/shop1 **Tophatting links** [Details page](https://5d559397bae39100201eedc1-tmrswumsiu.chromatic.com/?path=/story/playground--details-page) [Page stories](https://5d559397bae39100201eedc1-tmrswumsiu.chromatic.com/?path=/story/all-components-page--default)
Addresses: #7929 (comment) (Sorry I missed the comment before I shipped)
### WHY are these changes introduced? Fixes #7960 ### WHAT is this pull request doing? Rebuild `Popover` with layout primitives
<!-- ☝️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? Fixes #7840 <!-- link to issue if one exists --> <!-- Context about the problem that’s being addressed. --> ### WHAT is this pull request doing? Refactors `DropZone` and its child components to use our layout primitives. #### Issues with current PR⚠️ <details> <summary>Unable to center overlay text - SOLVED ✅</summary> <table> <tr> <td>Local</td> </tr> <tr> <td><img width="911" alt="Screenshot 2023-01-31 at 9 42 08 AM" src="https://user-images.githubusercontent.com/59836805/215792273-9e645ef1-8f50-43c8-982b-c2dc90e0dc9d.png"></td> </tr> <tr> <td>Prod</td> </tr> <tr> <td><img width="891" alt="Screenshot 2023-01-31 at 9 41 54 AM" src="https://user-images.githubusercontent.com/59836805/215792476-a555dcc1-60c5-4d98-8d65-d9f9e176e0f9.png"></td> </tr> </table> </details> <details> <summary>Shows movement on reload (most noticeable on small and medium size dropzone)- SOLVED ✅</summary> <img height="600" src="https://user-images.githubusercontent.com/59836805/215795973-8a242077-172e-4c12-b605-3297750447ed.gif"> I suspect it has something to do with this style class not working properly ```jsx .measuring { visibility: hidden; min-height: 0; } ``` </details> <!-- Summary of the changes committed. Before / after screenshots are appreciated for UI changes. Make sure to include alt text that describes the screenshot. If you include an animated gif showing your change, wrapping it in a details tag is recommended. Gifs usually autoplay, which can cause accessibility issues for people reviewing your PR: <details> <summary>Summary of your gif(s)</summary> <img src="..." alt="Description of what the gif shows"> </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 - [ ] Tested on [mobile](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md#cross-browser-testing) - [ ] 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
/snapit |
🫰✨ Thanks @chazdean! Your snapshots have been published to npm. Test the snapshots by updating your yarn add @shopify/plugin-polaris@0.0.0-snapshot-release-20230201183303 yarn add @shopify/polaris-icons@0.0.0-snapshot-release-20230201183303 yarn add @shopify/polaris@0.0.0-snapshot-release-20230201183303 |
aveline
approved these changes
Feb 2, 2023
nayeobkim
approved these changes
Feb 2, 2023
Merged
laurkim
pushed a commit
that referenced
this pull request
Feb 2, 2023
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.25.0 ### Minor Changes - [#7950](#7950) [`286c63a84`](286c63a) Thanks [@laurkim](https://github.com/laurkim)! - Updated `Tabs` component to use layout primitives - [#7950](#7950) [`286c63a84`](286c63a) Thanks [@laurkim](https://github.com/laurkim)! - Updated `OptionList` to use new layout primitives - [#7950](#7950) [`286c63a84`](286c63a) Thanks [@laurkim](https://github.com/laurkim)! - Updated `Popover` to use new layout primitives ### Patch Changes - [#7950](#7950) [`286c63a84`](286c63a) Thanks [@laurkim](https://github.com/laurkim)! - Remove unused class in Page Header - [#7950](#7950) [`286c63a84`](286c63a) Thanks [@laurkim](https://github.com/laurkim)! - Rebuilt Page Header with layout components - [#8237](#8237) [`17fa970db`](17fa970) Thanks [@loic-d](https://github.com/loic-d)! - Fixed Backdrop onClick callback when setClosing is missing ## @shopify/polaris-cli@0.1.1 ## polaris.shopify.com@0.31.1 ### Patch Changes - [#8235](#8235) [`5fbe75461`](5fbe754) Thanks [@laurkim](https://github.com/laurkim)! - Updated Patterns/Typography copy to include suggestions for uppercase typography styles - Updated dependencies \[[`286c63a84`](286c63a), [`286c63a84`](286c63a), [`286c63a84`](286c63a), [`286c63a84`](286c63a), [`286c63a84`](286c63a), [`17fa970db`](17fa970)]: - @shopify/polaris@10.25.0 Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Merged
juzser
pushed a commit
to juzser/polaris
that referenced
this pull request
Jul 27, 2023
…es (Shopify#7950) ### WHY are these changes introduced? Related to [7565](Shopify#7565). ### WHAT is this pull request doing? Rebuilds the following components to use our layout primitives. - `Tabs` Shopify#7835 - `DropZone` Shopify#7840 - `PageHeader` Shopify#7916 - `OptionList` Shopify#7952 - `Popover` Shopify#7960 ### 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) ### 🎩 checklist - [ ] Tested on [mobile](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md#cross-browser-testing) - [ ] 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 --------- Co-authored-by: aveline <aveline@users.noreply.github.com> Co-authored-by: Kyle Durand <kyledurand@users.noreply.github.com> Co-authored-by: Chaz Dean <59836805+chazdean@users.noreply.github.com>
juzser
pushed a commit
to juzser/polaris
that referenced
this pull request
Jul 27, 2023
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.25.0 ### Minor Changes - [Shopify#7950](Shopify#7950) [`286c63a84`](Shopify@286c63a) Thanks [@laurkim](https://github.com/laurkim)! - Updated `Tabs` component to use layout primitives - [Shopify#7950](Shopify#7950) [`286c63a84`](Shopify@286c63a) Thanks [@laurkim](https://github.com/laurkim)! - Updated `OptionList` to use new layout primitives - [Shopify#7950](Shopify#7950) [`286c63a84`](Shopify@286c63a) Thanks [@laurkim](https://github.com/laurkim)! - Updated `Popover` to use new layout primitives ### Patch Changes - [Shopify#7950](Shopify#7950) [`286c63a84`](Shopify@286c63a) Thanks [@laurkim](https://github.com/laurkim)! - Remove unused class in Page Header - [Shopify#7950](Shopify#7950) [`286c63a84`](Shopify@286c63a) Thanks [@laurkim](https://github.com/laurkim)! - Rebuilt Page Header with layout components - [Shopify#8237](Shopify#8237) [`17fa970db`](Shopify@17fa970) Thanks [@loic-d](https://github.com/loic-d)! - Fixed Backdrop onClick callback when setClosing is missing ## @shopify/polaris-cli@0.1.1 ## polaris.shopify.com@0.31.1 ### Patch Changes - [Shopify#8235](Shopify#8235) [`5fbe75461`](Shopify@5fbe754) Thanks [@laurkim](https://github.com/laurkim)! - Updated Patterns/Typography copy to include suggestions for uppercase typography styles - Updated dependencies \[[`286c63a84`](Shopify@286c63a), [`286c63a84`](Shopify@286c63a), [`286c63a84`](Shopify@286c63a), [`286c63a84`](Shopify@286c63a), [`286c63a84`](Shopify@286c63a), [`17fa970db`](Shopify@17fa970)]: - @shopify/polaris@10.25.0 Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
WHY are these changes introduced?
Related to 7565.
WHAT is this pull request doing?
Rebuilds the following components to use our layout primitives.
Tabs
[Layout foundations] RebuildTabs
with layout primitives #7835DropZone
[Layout foundations] RebuildDropZone
with layout primitives #7840PageHeader
[Layout foundations] RebuildPage Header
with layout primitives #7916OptionList
[Layout foundations] RebuildOptionList
with layout primitives #7952Popover
[Layout foundations] RebuildPopover
with layout primitives #7960How to 🎩
🖥 Local development instructions
🗒 General tophatting guidelines
📄 Changelog guidelines
🎩 checklist
README.md
with documentation changes