Skip to content

Conversation

@kyledurand
Copy link
Member

@kyledurand kyledurand commented Nov 22, 2022

Closes: #7580

This slightly moves the checkbox handle 2px to the left. This means it now lines up with our 20px padding instead of 22px from the card edge. Also improves vertical alignment of the checkboxes and bulk select on xs screens

Before After
image image

The only CSS that remains is for interactive elements, interactive behavior (hover, focus), and transitions (which are being removed in https://github.com/Shopify/polaris/pull/7290/files).

@kyledurand kyledurand self-assigned this Nov 22, 2022
@kyledurand kyledurand force-pushed the resource-item_re-build branch from cdcf329 to dda717f Compare November 22, 2022 16:10
@github-actions
Copy link
Contributor

github-actions bot commented Nov 22, 2022

size-limit report 📦

Path Size
polaris-react-cjs 210.81 KB (+0.09% 🔺)
polaris-react-esm 136.14 KB (+0.09% 🔺)
polaris-react-esnext 191.39 KB (-0.18% 🔽)
polaris-react-css 41.7 KB (-0.76% 🔽)

@kyledurand kyledurand force-pushed the resource-item_re-build branch from dda717f to 0daf9e8 Compare November 22, 2022 18:31
@kyledurand kyledurand changed the base branch from main to layout-rebuild-batch-2 November 23, 2022 16:19
@kyledurand kyledurand force-pushed the resource-item_re-build branch from e682f89 to dd90d0b Compare November 23, 2022 18:44
@kyledurand kyledurand force-pushed the resource-item_re-build branch from dd90d0b to cb3fbaf Compare November 23, 2022 18:52
@kyledurand kyledurand marked this pull request as ready for review November 24, 2022 18:31
@kyledurand
Copy link
Member Author

@sarahill can you take a look at the chromatic diffs and approve them if they're ok? You can also checkout the published storybook for this branch here

Copy link
Contributor

@aveline aveline left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

import {mountWithApp} from 'tests/utilities';
import {matchMedia} from '@shopify/jest-dom-mocks';

// import {setMediaWidth} from 'tests/utilities/breakpoints';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove

padding="3"
paddingInlineStart={{xs: '4', sm: '5'}}
paddingInlineEnd={{xs: '4', sm: '5'}}
zIndex="var(--pc-resource-item-content-stacking-order)"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we not enforcing token usage for z-index?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, going from 100 to 400 to 510 (z-1, z-2, z-3) just doesn't make sense for a localized stacking order.

If there's a component that makes use of lots of z-indexes (these components exist) then we get up to pretty high numbers, pretty quickly. This will cause issues where elements start overlapping backdrops, popovers, navigation etc...

@kyledurand
Copy link
Member Author

/snapit

@github-actions
Copy link
Contributor

🫰✨ Thanks @kyledurand! 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-20221128165329
yarn add @shopify/polaris-icons@0.0.0-snapshot-release-20221128165329
yarn add @shopify/polaris-migrator@0.0.0-snapshot-release-20221128165329
yarn add @shopify/polaris@0.0.0-snapshot-release-20221128165329

@kyledurand kyledurand merged commit f6f11ac into layout-rebuild-batch-2 Nov 30, 2022
@kyledurand kyledurand deleted the resource-item_re-build branch November 30, 2022 12:58
chazdean pushed a commit that referenced this pull request Dec 2, 2022
Closes: #7580

This slightly moves the checkbox handle 2px to the left. This means it
now lines up with our 20px padding instead of 22px from the card edge.
Also improves vertical alignment of the checkboxes and bulk select on xs
screens

Before | After
---|---
![image](https://screenshot.click/24-12-z59dz-bpdqu.png) |
![image](https://screenshot.click/24-12-viiqs-efiaf.png)

The only CSS that remains is for interactive elements, interactive
behavior (hover, focus), and transitions (which are being removed in
https://github.com/Shopify/polaris/pull/7290/files).
laurkim pushed a commit that referenced this pull request Dec 7, 2022
Closes: #7580

This slightly moves the checkbox handle 2px to the left. This means it
now lines up with our 20px padding instead of 22px from the card edge.
Also improves vertical alignment of the checkboxes and bulk select on xs
screens

Before | After
---|---
![image](https://screenshot.click/24-12-z59dz-bpdqu.png) |
![image](https://screenshot.click/24-12-viiqs-efiaf.png)

The only CSS that remains is for interactive elements, interactive
behavior (hover, focus), and transitions (which are being removed in
https://github.com/Shopify/polaris/pull/7290/files).
laurkim pushed a commit that referenced this pull request Dec 7, 2022
Closes: #7580

This slightly moves the checkbox handle 2px to the left. This means it
now lines up with our 20px padding instead of 22px from the card edge.
Also improves vertical alignment of the checkboxes and bulk select on xs
screens

Before | After
---|---
![image](https://screenshot.click/24-12-z59dz-bpdqu.png) |
![image](https://screenshot.click/24-12-viiqs-efiaf.png)

The only CSS that remains is for interactive elements, interactive
behavior (hover, focus), and transitions (which are being removed in
https://github.com/Shopify/polaris/pull/7290/files).
laurkim pushed a commit that referenced this pull request Dec 15, 2022
Closes: #7580

This slightly moves the checkbox handle 2px to the left. This means it
now lines up with our 20px padding instead of 22px from the card edge.
Also improves vertical alignment of the checkboxes and bulk select on xs
screens

Before | After
---|---
![image](https://screenshot.click/24-12-z59dz-bpdqu.png) |
![image](https://screenshot.click/24-12-viiqs-efiaf.png)

The only CSS that remains is for interactive elements, interactive
behavior (hover, focus), and transitions (which are being removed in
https://github.com/Shopify/polaris/pull/7290/files).
chazdean pushed a commit that referenced this pull request Jan 12, 2023
Closes: #7580

This slightly moves the checkbox handle 2px to the left. This means it
now lines up with our 20px padding instead of 22px from the card edge.
Also improves vertical alignment of the checkboxes and bulk select on xs
screens

Before | After
---|---
![image](https://screenshot.click/24-12-z59dz-bpdqu.png) |
![image](https://screenshot.click/24-12-viiqs-efiaf.png)

The only CSS that remains is for interactive elements, interactive
behavior (hover, focus), and transitions (which are being removed in
https://github.com/Shopify/polaris/pull/7290/files).
chazdean pushed a commit that referenced this pull request Jan 13, 2023
Closes: #7580

This slightly moves the checkbox handle 2px to the left. This means it
now lines up with our 20px padding instead of 22px from the card edge.
Also improves vertical alignment of the checkboxes and bulk select on xs
screens

Before | After
---|---
![image](https://screenshot.click/24-12-z59dz-bpdqu.png) |
![image](https://screenshot.click/24-12-viiqs-efiaf.png)

The only CSS that remains is for interactive elements, interactive
behavior (hover, focus), and transitions (which are being removed in
https://github.com/Shopify/polaris/pull/7290/files).
laurkim pushed a commit that referenced this pull request Jan 26, 2023
Closes: #7580

This slightly moves the checkbox handle 2px to the left. This means it
now lines up with our 20px padding instead of 22px from the card edge.
Also improves vertical alignment of the checkboxes and bulk select on xs
screens

Before | After
---|---
![image](https://screenshot.click/24-12-z59dz-bpdqu.png) |
![image](https://screenshot.click/24-12-viiqs-efiaf.png)

The only CSS that remains is for interactive elements, interactive
behavior (hover, focus), and transitions (which are being removed in
https://github.com/Shopify/polaris/pull/7290/files).
kyledurand added a commit that referenced this pull request Jan 26, 2023
Closes: #7580

This slightly moves the checkbox handle 2px to the left. This means it
now lines up with our 20px padding instead of 22px from the card edge.
Also improves vertical alignment of the checkboxes and bulk select on xs
screens

Before | After
---|---
![image](https://screenshot.click/24-12-z59dz-bpdqu.png) |
![image](https://screenshot.click/24-12-viiqs-efiaf.png)

The only CSS that remains is for interactive elements, interactive
behavior (hover, focus), and transitions (which are being removed in
https://github.com/Shopify/polaris/pull/7290/files).
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.

[Layout foundations] Rebuild ResourceItem with layout components

4 participants