Commit 77057d5
authored
[SkeletonPage] Fix title / actions layout (#7442)
### WHY are these changes introduced?
I needed to fix this to take a nice screenshot for the styleguide
Fixes #5241
### WHAT is this pull request doing?
Before | After
---|---

| 
### 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 {
Card,
Layout,
Page,
SkeletonBodyText,
SkeletonDisplayText,
SkeletonPage,
TextContainer,
} from '../src';
export function Playground() {
return (
<>
<Page title="Orders" primaryAction={{content: 'New order'}} />
<WithDynamicContent />
<WithStaticContent />
</>
);
}
export function WithDynamicContent() {
return (
<SkeletonPage primaryAction>
<Layout>
<Layout.Section>
<Card sectioned>
<SkeletonBodyText />
</Card>
<Card sectioned>
<TextContainer>
<SkeletonDisplayText size="small" />
<SkeletonBodyText />
</TextContainer>
</Card>
<Card sectioned>
<TextContainer>
<SkeletonDisplayText size="small" />
<SkeletonBodyText />
</TextContainer>
</Card>
</Layout.Section>
<Layout.Section secondary>
<Card>
<Card.Section>
<TextContainer>
<SkeletonDisplayText size="small" />
<SkeletonBodyText lines={2} />
</TextContainer>
</Card.Section>
<Card.Section>
<SkeletonBodyText lines={1} />
</Card.Section>
</Card>
<Card subdued>
<Card.Section>
<TextContainer>
<SkeletonDisplayText size="small" />
<SkeletonBodyText lines={2} />
</TextContainer>
</Card.Section>
<Card.Section>
<SkeletonBodyText lines={2} />
</Card.Section>
</Card>
</Layout.Section>
</Layout>
</SkeletonPage>
);
}
export function WithStaticContent() {
return (
<SkeletonPage title="Products" primaryAction>
<Layout>
<Layout.Section>
<Card sectioned>
<SkeletonBodyText />
</Card>
<Card sectioned title="Images">
<SkeletonBodyText />
</Card>
<Card sectioned title="Variants">
<SkeletonBodyText />
</Card>
</Layout.Section>
<Layout.Section secondary>
<Card title="Sales channels">
<Card.Section>
<SkeletonBodyText lines={2} />
</Card.Section>
<Card.Section>
<SkeletonBodyText lines={1} />
</Card.Section>
</Card>
<Card title="Organization" subdued>
<Card.Section>
<SkeletonBodyText lines={2} />
</Card.Section>
<Card.Section>
<SkeletonBodyText lines={2} />
</Card.Section>
</Card>
</Layout.Section>
</Layout>
</SkeletonPage>
);
}
```
</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 guide1 parent 8fb2158 commit 77057d5
File tree
2 files changed
+6
-18
lines changed- .changeset
- polaris-react/src/components/SkeletonPage
2 files changed
+6
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
Lines changed: 1 addition & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
| 37 | + | |
41 | 38 | | |
42 | 39 | | |
43 | 40 | | |
| |||
73 | 70 | | |
74 | 71 | | |
75 | 72 | | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | 73 | | |
91 | 74 | | |
92 | 75 | | |
| |||
0 commit comments