Skip to content

Conversation

laurkim
Copy link
Contributor

@laurkim laurkim commented Dec 19, 2022

WHY are these changes introduced?

Related to 7565.

WHAT is this pull request doing?

Rebuilds the following components to use our layout primitives.

How to 🎩

🖥 Local development instructions
🗒 General tophatting guidelines
📄 Changelog guidelines

🎩 checklist

### 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>
@github-actions
Copy link
Contributor

github-actions bot commented Dec 19, 2022

size-limit report 📦

Path Size
polaris-react-cjs 216.14 KB (+0.09% 🔺)
polaris-react-esm 137.47 KB (+0.15% 🔺)
polaris-react-esnext 191.32 KB (-0.15% 🔽)
polaris-react-css 40.69 KB (-0.85% 🔽)

aveline and others added 10 commits December 20, 2022 08:58
### 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.
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
@chazdean chazdean marked this pull request as ready for review February 1, 2023 17:58
@chazdean
Copy link
Contributor

chazdean commented Feb 1, 2023

/snapit

@github-actions
Copy link
Contributor

github-actions bot commented Feb 1, 2023

🫰✨ Thanks @chazdean! Your snapshots have been published to npm.

Test the snapshots by updating your package.json with the newly published versions:

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

@laurkim laurkim merged commit 286c63a into main Feb 2, 2023
@laurkim laurkim deleted the layout-rebuild-batch-3 branch February 2, 2023 19:00
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>
sam-b-rose added a commit that referenced this pull request Feb 2, 2023
* main:
  Disallow text transform in stylelint-polaris coverage rules (#8244)
  Add new z-index token names (#8245)
  Version Packages (#8236)
  [Layout foundations][Batch 3] Rebuild components with layout primitives (#7950)
  [Backdrop] Call `onClick` regardless of `setClosing` prop presence (#8237)
@gwyneplaine gwyneplaine mentioned this pull request Feb 14, 2023
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants