Skip to content

Commit 50e8bb5

Browse files
authored
[Layout foundations] Replace Stack with AlphaStack (#8577)
### WHY are these changes introduced? Resolves #8102. Replaces deprecated `Stack` component with `AlphaStack`. ### WHAT is this pull request doing? - Replaces deprecated Stack with AlphaStack in `polaris-react` - Updates examples and components using AlphaStack to use Stack - Removes deprecated Stack documentation and examples - Updates AlphaStack documentation and examples ### 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) - [x] 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 - [x] [Tophatted documentation](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting%20documentation.md) changes in the style guide
1 parent af07c6d commit 50e8bb5

File tree

60 files changed

+426
-1001
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+426
-1001
lines changed

.changeset/light-mails-type.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@shopify/polaris': minor
3+
'polaris.shopify.com': minor
4+
---
5+
6+
Replaced `Stack` with `AlphaStack`

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {Card} from '../Card';
88
import {Box} from '../Box';
99
import {Inline} from '../Inline';
1010
import {Text} from '../Text';
11-
import {AlphaStack} from '../AlphaStack';
11+
import {Stack} from '../Stack';
1212

1313
export interface AccountConnectionProps {
1414
/** Content to display as title */
@@ -73,10 +73,10 @@ export function AccountConnection({
7373
<SettingAction action={actionElement}>
7474
<Inline gap="4">
7575
{avatarMarkup}
76-
<AlphaStack gap="2">
76+
<Stack gap="2">
7777
{titleMarkup}
7878
{detailsMarkup}
79-
</AlphaStack>
79+
</Stack>
8080
</Inline>
8181
</SettingAction>
8282
{termsOfServiceMarkup}

polaris-react/src/components/AlphaStack/AlphaStack.scss

Lines changed: 0 additions & 60 deletions
This file was deleted.

polaris-react/src/components/AlphaStack/AlphaStack.stories.tsx

Lines changed: 0 additions & 119 deletions
This file was deleted.

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

Lines changed: 0 additions & 73 deletions
This file was deleted.

polaris-react/src/components/AlphaStack/index.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

polaris-react/src/components/AlphaStack/tests/AlphaStack.test.tsx

Lines changed: 0 additions & 53 deletions
This file was deleted.

polaris-react/src/components/Banner/Banner.stories.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, {useCallback, useEffect, useRef, useState} from 'react';
22
import type {ComponentMeta} from '@storybook/react';
33
import {
4-
AlphaStack,
4+
Stack,
55
Banner,
66
Button,
77
LegacyCard,
@@ -193,7 +193,7 @@ export function InACard() {
193193
export function WithEndJustifiedContent() {
194194
return (
195195
<Banner status="critical">
196-
<AlphaStack gap="1" fullWidth>
196+
<Stack gap="1" fullWidth>
197197
<Inline gap="4" align="space-between">
198198
<Text variant="headingMd" fontWeight="semibold" as="h3">
199199
Deployment failed in 5min
@@ -203,7 +203,7 @@ export function WithEndJustifiedContent() {
203203
</Link>
204204
</Inline>
205205
<p>This order was archived on March 7, 2017 at 3:12pm EDT.</p>
206-
</AlphaStack>
206+
</Stack>
207207
</Banner>
208208
);
209209
}

polaris-react/src/components/Box/Box.stories.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22
import type {ComponentMeta} from '@storybook/react';
3-
import {AlphaStack, Box, Icon} from '@shopify/polaris';
3+
import {Stack, Box, Icon} from '@shopify/polaris';
44
import {PaintBrushMajor} from '@shopify/polaris-icons';
55

66
export default {
@@ -33,7 +33,7 @@ export function WithBorderRadius() {
3333

3434
export function WithResponsivePadding() {
3535
return (
36-
<AlphaStack gap="4">
36+
<Stack gap="4">
3737
<Box background="surface" padding={{xs: '2', sm: '8'}} border="dark">
3838
<Icon source={PaintBrushMajor} color="base" />
3939
</Box>
@@ -68,6 +68,6 @@ export function WithResponsivePadding() {
6868
>
6969
<Icon source={PaintBrushMajor} color="base" />
7070
</Box>
71-
</AlphaStack>
71+
</Stack>
7272
);
7373
}

0 commit comments

Comments
 (0)