Skip to content

Commit d1981bc

Browse files
authored
[Layout foundations] Adjust size and position of title and body in SkeletonPage to closer match Page (#8030)
<!-- ☝️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 #8014 <!-- link to issue if one exists --> <!-- Context about the problem that’s being addressed. --> ### WHAT is this pull request doing? - Centers `SkeletonTitle` to align with `PrimaryActionSkeleton` on right - Reduces height of `SkeletonTitle` from `28px` to `24px` to closer match `Page` title - Removes `paddingBlockStart` from `SkeletonPage` Body allowing it shift up vertically matching `Page` Before| :----:| <img width="1007" alt="Screenshot 2023-01-11 at 3 48 06 PM" src="https://user-images.githubusercontent.com/59836805/211915956-c9ee9f44-e1c5-4e65-a91f-44678caf4f31.png">| **After**| <img width="1024" alt="Screenshot 2023-01-11 at 3 47 40 PM" src="https://user-images.githubusercontent.com/59836805/211916089-707a3af2-fb1f-4046-90bc-cb362bed2162.png">| <!-- 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 🎩 [Spin Link](https://admin.web.web-6ubu.chaz-dean.us.spin.dev/store/shop1/) <!-- Give as much information as needed to experiment with the component in the playground. --> ### 🎩 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
1 parent 40b4d87 commit d1981bc

File tree

2 files changed

+12
-14
lines changed

2 files changed

+12
-14
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@shopify/polaris': patch
3+
---
4+
5+
Updated `SkeletonPage` title and body layout

polaris-react/src/components/SkeletonPage/SkeletonPage.tsx

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export function SkeletonPage({
4141
<Box
4242
background="surface-neutral"
4343
minWidth="120px"
44-
minHeight="28px"
44+
minHeight="24px"
4545
borderRadius="base"
4646
/>
4747
</div>
@@ -77,25 +77,18 @@ export function SkeletonPage({
7777
>
7878
<AlphaStack gap="0" fullWidth>
7979
<Box
80-
padding={{xs: '4', md: '5'}}
81-
paddingBlockEnd={{xs: '2', md: '5'}}
82-
paddingInlineStart={{sm: '0'}}
83-
paddingInlineEnd={{sm: '0'}}
80+
paddingBlockStart={{xs: '4', md: '5'}}
81+
paddingBlockEnd={{xs: '4', md: '5'}}
82+
paddingInlineStart={{xs: '4', sm: '0'}}
83+
paddingInlineEnd={{xs: '4', sm: '0'}}
8484
>
8585
{breadcrumbMarkup}
86-
<Inline align="space-between" blockAlign="start">
86+
<Inline align="space-between" blockAlign="center">
8787
{titleContent}
8888
{primaryActionMarkup}
8989
</Inline>
9090
</Box>
91-
<Box
92-
paddingBlockStart={{xs: '2', md: '5'}}
93-
paddingBlockEnd="2"
94-
paddingInlineStart="0"
95-
paddingInlineEnd="0"
96-
>
97-
{children}
98-
</Box>
91+
<Box paddingBlockEnd="2">{children}</Box>
9992
</AlphaStack>
10093
</Box>
10194
</AlphaStack>

0 commit comments

Comments
 (0)