Skip to content

Conversation

@chazdean
Copy link
Contributor

@chazdean chazdean commented Aug 26, 2022

WHY are these changes introduced?

Fixes #6894

WHAT is this pull request doing?

Adds a new alpha Stack component

Alignment Screen Shot 2022-08-30 at 11 00 25 AM
Spacing Screen Shot 2022-08-30 at 11 01 34 AM

How to 🎩

🖥 Local development instructions
🗒 General tophatting guidelines
📄 Changelog guidelines

Copy-paste this code in playground/Playground.tsx:
import React from 'react';

import {Page, AlphaStack, Badge, Text} from '../src';

export function Playground() {
  return (
    <Page title="Playground">
      <AlphaStack>
        <Badge status="attention">start</Badge>
        <Badge>Processing</Badge>
        <Badge>Fulfilled</Badge>
      </AlphaStack>
      <hr />
      <AlphaStack align="center">
        <Badge status="attention">center</Badge>
        <Badge>Processing</Badge>
        <Badge>Fulfilled</Badge>
      </AlphaStack>
      <hr />
      <AlphaStack align="end">
        <Badge status="attention">end</Badge>
        <Badge>Processing</Badge>
        <Badge>Fulfilled</Badge>
      </AlphaStack>
      <hr />
      <AlphaStack spacing="0">
        <Badge status="attention">spacing 0</Badge>
        <Badge>Processing</Badge>
        <Badge>Fulfilled</Badge>
      </AlphaStack>
      <hr />
      <AlphaStack spacing="4">
        <Badge status="attention">spacing 4</Badge>
        <Badge>Processing</Badge>
        <Badge>Fulfilled</Badge>
      </AlphaStack>
      <hr />
      <AlphaStack spacing="10">
        <Badge status="attention">spacing 10</Badge>
        <Badge>Processing</Badge>
        <Badge>Fulfilled</Badge>
      </AlphaStack>
    </Page>
  );
}

🎩 checklist

@chazdean chazdean self-assigned this Aug 26, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Aug 26, 2022

size-limit report 📦

Path Size
polaris-react-cjs 202.17 KB (+0.07% 🔺)
polaris-react-esm 129.79 KB (+0.08% 🔺)
polaris-react-esnext 184.42 KB (+0.07% 🔺)
polaris-react-css 41.03 KB (+0.06% 🔺)

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.

Overall looks good! What do you think about setting align="start" as default?

We should also look at making those spacing classes into some kind of shared utility that can be reused across components.

@chazdean chazdean changed the base branch from main to layout-foundations-prototype August 29, 2022 16:57
@chazdean chazdean changed the title [Layout foundations][WIP] Stack component prototype [Layout foundations]Stack component prototype Aug 30, 2022
@chazdean chazdean changed the title [Layout foundations]Stack component prototype [Layout foundations] Stack component prototype Aug 30, 2022
@chazdean chazdean marked this pull request as ready for review August 30, 2022 15:12
Copy link
Member

@kyledurand kyledurand left a comment

Choose a reason for hiding this comment

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

This is looking great 👍

One last micro optimization would be to pass the align prop to a custom property so we can remove those classes as well and just do something like align-items: var(--pc-align) on the .Stack class

Copy link
Contributor

@laurkim laurkim left a comment

Choose a reason for hiding this comment

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

💯

@chazdean chazdean requested a review from alex-page August 31, 2022 18:30
Copy link
Member

@kyledurand kyledurand left a comment

Choose a reason for hiding this comment

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

👏 This looks fantastic. Nice work @chazdean 👏

Copy link
Contributor

@laurkim laurkim left a comment

Choose a reason for hiding this comment

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

Nice this is looking great! 🚀

@chazdean
Copy link
Contributor Author

chazdean commented Sep 2, 2022

Creating a separate issue to complete testing here:
Add tests for alpha Stack component

@chazdean chazdean merged commit 580a7df into layout-foundations-prototype Sep 2, 2022
@chazdean chazdean deleted the feat/add-stack-component branch September 2, 2022 17:36
laurkim added a commit that referenced this pull request Sep 6, 2022
<!--
  ☝️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 #6894  <!-- link to issue if one exists -->

<!--
  Context about the problem that’s being addressed.
-->

### WHAT is this pull request doing?

Adds a new alpha `Stack` component

 <details>
      <summary>Alignment</summary>
     <img width="977" alt="Screen Shot 2022-08-30 at 11 00 25 AM" src="https://user-images.githubusercontent.com/59836805/187471756-15963459-54fd-403d-93e2-9e7f0932865c.png">
    </details>

<details>
      <summary>Spacing</summary>
     <img width="978" alt="Screen Shot 2022-08-30 at 11 01 34 AM" src="https://user-images.githubusercontent.com/59836805/187471804-29d50f45-f00b-4007-abc9-575555fe37c5.png">
</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, AlphaStack, Badge, Text} from '../src';

export function Playground() {
  return (
    <Page title="Playground">
      <AlphaStack>
        <Badge status="attention">start</Badge>
        <Badge>Processing</Badge>
        <Badge>Fulfilled</Badge>
      </AlphaStack>
      <hr />
      <AlphaStack align="center">
        <Badge status="attention">center</Badge>
        <Badge>Processing</Badge>
        <Badge>Fulfilled</Badge>
      </AlphaStack>
      <hr />
      <AlphaStack align="end">
        <Badge status="attention">end</Badge>
        <Badge>Processing</Badge>
        <Badge>Fulfilled</Badge>
      </AlphaStack>
      <hr />
      <AlphaStack spacing="0">
        <Badge status="attention">spacing 0</Badge>
        <Badge>Processing</Badge>
        <Badge>Fulfilled</Badge>
      </AlphaStack>
      <hr />
      <AlphaStack spacing="4">
        <Badge status="attention">spacing 4</Badge>
        <Badge>Processing</Badge>
        <Badge>Fulfilled</Badge>
      </AlphaStack>
      <hr />
      <AlphaStack spacing="10">
        <Badge status="attention">spacing 10</Badge>
        <Badge>Processing</Badge>
        <Badge>Fulfilled</Badge>
      </AlphaStack>
    </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

Co-authored-by: Lo Kim <[email protected]>
laurkim added a commit that referenced this pull request Sep 9, 2022
<!--
  ☝️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 #6894  <!-- link to issue if one exists -->

<!--
  Context about the problem that’s being addressed.
-->

### WHAT is this pull request doing?

Adds a new alpha `Stack` component

 <details>
      <summary>Alignment</summary>
     <img width="977" alt="Screen Shot 2022-08-30 at 11 00 25 AM" src="https://user-images.githubusercontent.com/59836805/187471756-15963459-54fd-403d-93e2-9e7f0932865c.png">
    </details>

<details>
      <summary>Spacing</summary>
     <img width="978" alt="Screen Shot 2022-08-30 at 11 01 34 AM" src="https://user-images.githubusercontent.com/59836805/187471804-29d50f45-f00b-4007-abc9-575555fe37c5.png">
</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, AlphaStack, Badge, Text} from '../src';

export function Playground() {
  return (
    <Page title="Playground">
      <AlphaStack>
        <Badge status="attention">start</Badge>
        <Badge>Processing</Badge>
        <Badge>Fulfilled</Badge>
      </AlphaStack>
      <hr />
      <AlphaStack align="center">
        <Badge status="attention">center</Badge>
        <Badge>Processing</Badge>
        <Badge>Fulfilled</Badge>
      </AlphaStack>
      <hr />
      <AlphaStack align="end">
        <Badge status="attention">end</Badge>
        <Badge>Processing</Badge>
        <Badge>Fulfilled</Badge>
      </AlphaStack>
      <hr />
      <AlphaStack spacing="0">
        <Badge status="attention">spacing 0</Badge>
        <Badge>Processing</Badge>
        <Badge>Fulfilled</Badge>
      </AlphaStack>
      <hr />
      <AlphaStack spacing="4">
        <Badge status="attention">spacing 4</Badge>
        <Badge>Processing</Badge>
        <Badge>Fulfilled</Badge>
      </AlphaStack>
      <hr />
      <AlphaStack spacing="10">
        <Badge status="attention">spacing 10</Badge>
        <Badge>Processing</Badge>
        <Badge>Fulfilled</Badge>
      </AlphaStack>
    </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

Co-authored-by: Lo Kim <[email protected]>
laurkim added a commit that referenced this pull request Sep 9, 2022
<!--
  ☝️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 #6894  <!-- link to issue if one exists -->

<!--
  Context about the problem that’s being addressed.
-->

### WHAT is this pull request doing?

Adds a new alpha `Stack` component

 <details>
      <summary>Alignment</summary>
     <img width="977" alt="Screen Shot 2022-08-30 at 11 00 25 AM" src="https://user-images.githubusercontent.com/59836805/187471756-15963459-54fd-403d-93e2-9e7f0932865c.png">
    </details>

<details>
      <summary>Spacing</summary>
     <img width="978" alt="Screen Shot 2022-08-30 at 11 01 34 AM" src="https://user-images.githubusercontent.com/59836805/187471804-29d50f45-f00b-4007-abc9-575555fe37c5.png">
</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, AlphaStack, Badge, Text} from '../src';

export function Playground() {
  return (
    <Page title="Playground">
      <AlphaStack>
        <Badge status="attention">start</Badge>
        <Badge>Processing</Badge>
        <Badge>Fulfilled</Badge>
      </AlphaStack>
      <hr />
      <AlphaStack align="center">
        <Badge status="attention">center</Badge>
        <Badge>Processing</Badge>
        <Badge>Fulfilled</Badge>
      </AlphaStack>
      <hr />
      <AlphaStack align="end">
        <Badge status="attention">end</Badge>
        <Badge>Processing</Badge>
        <Badge>Fulfilled</Badge>
      </AlphaStack>
      <hr />
      <AlphaStack spacing="0">
        <Badge status="attention">spacing 0</Badge>
        <Badge>Processing</Badge>
        <Badge>Fulfilled</Badge>
      </AlphaStack>
      <hr />
      <AlphaStack spacing="4">
        <Badge status="attention">spacing 4</Badge>
        <Badge>Processing</Badge>
        <Badge>Fulfilled</Badge>
      </AlphaStack>
      <hr />
      <AlphaStack spacing="10">
        <Badge status="attention">spacing 10</Badge>
        <Badge>Processing</Badge>
        <Badge>Fulfilled</Badge>
      </AlphaStack>
    </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

Co-authored-by: Lo Kim <[email protected]>
laurkim added a commit that referenced this pull request Sep 13, 2022
<!--
  ☝️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 #6894  <!-- link to issue if one exists -->

<!--
  Context about the problem that’s being addressed.
-->

### WHAT is this pull request doing?

Adds a new alpha `Stack` component

 <details>
      <summary>Alignment</summary>
     <img width="977" alt="Screen Shot 2022-08-30 at 11 00 25 AM" src="https://user-images.githubusercontent.com/59836805/187471756-15963459-54fd-403d-93e2-9e7f0932865c.png">
    </details>

<details>
      <summary>Spacing</summary>
     <img width="978" alt="Screen Shot 2022-08-30 at 11 01 34 AM" src="https://user-images.githubusercontent.com/59836805/187471804-29d50f45-f00b-4007-abc9-575555fe37c5.png">
</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, AlphaStack, Badge, Text} from '../src';

export function Playground() {
  return (
    <Page title="Playground">
      <AlphaStack>
        <Badge status="attention">start</Badge>
        <Badge>Processing</Badge>
        <Badge>Fulfilled</Badge>
      </AlphaStack>
      <hr />
      <AlphaStack align="center">
        <Badge status="attention">center</Badge>
        <Badge>Processing</Badge>
        <Badge>Fulfilled</Badge>
      </AlphaStack>
      <hr />
      <AlphaStack align="end">
        <Badge status="attention">end</Badge>
        <Badge>Processing</Badge>
        <Badge>Fulfilled</Badge>
      </AlphaStack>
      <hr />
      <AlphaStack spacing="0">
        <Badge status="attention">spacing 0</Badge>
        <Badge>Processing</Badge>
        <Badge>Fulfilled</Badge>
      </AlphaStack>
      <hr />
      <AlphaStack spacing="4">
        <Badge status="attention">spacing 4</Badge>
        <Badge>Processing</Badge>
        <Badge>Fulfilled</Badge>
      </AlphaStack>
      <hr />
      <AlphaStack spacing="10">
        <Badge status="attention">spacing 10</Badge>
        <Badge>Processing</Badge>
        <Badge>Fulfilled</Badge>
      </AlphaStack>
    </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

Co-authored-by: Lo Kim <[email protected]>
laurkim added a commit that referenced this pull request Sep 15, 2022
<!--
  ☝️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 #6894  <!-- link to issue if one exists -->

<!--
  Context about the problem that’s being addressed.
-->

### WHAT is this pull request doing?

Adds a new alpha `Stack` component

 <details>
      <summary>Alignment</summary>
     <img width="977" alt="Screen Shot 2022-08-30 at 11 00 25 AM" src="https://user-images.githubusercontent.com/59836805/187471756-15963459-54fd-403d-93e2-9e7f0932865c.png">
    </details>

<details>
      <summary>Spacing</summary>
     <img width="978" alt="Screen Shot 2022-08-30 at 11 01 34 AM" src="https://user-images.githubusercontent.com/59836805/187471804-29d50f45-f00b-4007-abc9-575555fe37c5.png">
</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, AlphaStack, Badge, Text} from '../src';

export function Playground() {
  return (
    <Page title="Playground">
      <AlphaStack>
        <Badge status="attention">start</Badge>
        <Badge>Processing</Badge>
        <Badge>Fulfilled</Badge>
      </AlphaStack>
      <hr />
      <AlphaStack align="center">
        <Badge status="attention">center</Badge>
        <Badge>Processing</Badge>
        <Badge>Fulfilled</Badge>
      </AlphaStack>
      <hr />
      <AlphaStack align="end">
        <Badge status="attention">end</Badge>
        <Badge>Processing</Badge>
        <Badge>Fulfilled</Badge>
      </AlphaStack>
      <hr />
      <AlphaStack spacing="0">
        <Badge status="attention">spacing 0</Badge>
        <Badge>Processing</Badge>
        <Badge>Fulfilled</Badge>
      </AlphaStack>
      <hr />
      <AlphaStack spacing="4">
        <Badge status="attention">spacing 4</Badge>
        <Badge>Processing</Badge>
        <Badge>Fulfilled</Badge>
      </AlphaStack>
      <hr />
      <AlphaStack spacing="10">
        <Badge status="attention">spacing 10</Badge>
        <Badge>Processing</Badge>
        <Badge>Fulfilled</Badge>
      </AlphaStack>
    </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

Co-authored-by: Lo Kim <[email protected]>
laurkim added a commit that referenced this pull request Sep 30, 2022
<!--
  ☝️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 #6894  <!-- link to issue if one exists -->

<!--
  Context about the problem that’s being addressed.
-->

### WHAT is this pull request doing?

Adds a new alpha `Stack` component

 <details>
      <summary>Alignment</summary>
     <img width="977" alt="Screen Shot 2022-08-30 at 11 00 25 AM" src="https://user-images.githubusercontent.com/59836805/187471756-15963459-54fd-403d-93e2-9e7f0932865c.png">
    </details>

<details>
      <summary>Spacing</summary>
     <img width="978" alt="Screen Shot 2022-08-30 at 11 01 34 AM" src="https://user-images.githubusercontent.com/59836805/187471804-29d50f45-f00b-4007-abc9-575555fe37c5.png">
</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, AlphaStack, Badge, Text} from '../src';

export function Playground() {
  return (
    <Page title="Playground">
      <AlphaStack>
        <Badge status="attention">start</Badge>
        <Badge>Processing</Badge>
        <Badge>Fulfilled</Badge>
      </AlphaStack>
      <hr />
      <AlphaStack align="center">
        <Badge status="attention">center</Badge>
        <Badge>Processing</Badge>
        <Badge>Fulfilled</Badge>
      </AlphaStack>
      <hr />
      <AlphaStack align="end">
        <Badge status="attention">end</Badge>
        <Badge>Processing</Badge>
        <Badge>Fulfilled</Badge>
      </AlphaStack>
      <hr />
      <AlphaStack spacing="0">
        <Badge status="attention">spacing 0</Badge>
        <Badge>Processing</Badge>
        <Badge>Fulfilled</Badge>
      </AlphaStack>
      <hr />
      <AlphaStack spacing="4">
        <Badge status="attention">spacing 4</Badge>
        <Badge>Processing</Badge>
        <Badge>Fulfilled</Badge>
      </AlphaStack>
      <hr />
      <AlphaStack spacing="10">
        <Badge status="attention">spacing 10</Badge>
        <Badge>Processing</Badge>
        <Badge>Fulfilled</Badge>
      </AlphaStack>
    </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

Co-authored-by: Lo Kim <[email protected]>
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] Add alpha Stack component

5 participants