You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Reboot Pattern Guidance
See [Reboot Polaris patterns vault
project](https://vault.shopify.io/gsd/projects/30559)
- New layout primitives `Stack`, `Box`, `Grid`, `Row`.
- Playroom patched to support larger code snippets.
- New designs and content for the
[patterns](https://polaris.shopify.com/patterns) pages.
- Deprecated old patterns:
||Old|New|
|--|--|--|
|**design-patterns** | `/patterns/design-patterns` | `404`|
|**page-layouts** | `/patterns/page-layouts` | `404`|
|**error-messages** | `/patterns/error-messages` |
`/content/error-messages`|
|**help-content** | `/patterns/help-content` | `/content/help-content`|
|**loading** | `/patterns/loading` | `/patterns-legacy/loading`|
|**new-badge** | `/patterns/new-badge` | `/patterns-legacy/new-badge`|
|**pickers** | `/patterns/pickers` | `/patterns-legacy/pickers`|
|**text-fields** | `/patterns/text-fields` |
`/patterns-legacy/text-fields`|
- Page padding and max-width adjusted such that live previews for
components and patterns always display the desktop breakpoint.
### 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} from '../src';
export function Playground() {
return (
<Page title="Playground">
{/* Add the code you want to test in here */}
</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: Raquel Breternitz <raquelbreternitz@gmail.com>
Co-authored-by: Raquel Breternitz <raquel.breternitz@shopify.com>
Co-authored-by: Jess Telford <jess+github@jes.st>
Co-authored-by: Jess Telford <jess.telford@shopify.com>
Copy file name to clipboardExpand all lines: patches/playroom+0.28.0.patch
+173-6Lines changed: 173 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -5,15 +5,15 @@ index 6c82bbe..f05b80b 100644
5
5
@@ -160,6 +160,12 @@ export { themeB } from './themeB';
6
6
// etc...
7
7
```
8
-
8
+
9
9
+## Additional Code Transformations
10
10
+
11
11
+A hook into the internal processing of code is available via the `processCode` option, which is a path to a file that exports a function that receives the code as entered into the editor, and returns the new code to be rendered.
12
12
+
13
13
+One example is [wrapping code in an IIFE for state support](https://github.com/seek-oss/playroom/issues/66).
14
14
+
15
15
## TypeScript Support
16
-
16
+
17
17
If a `tsconfig.json` file is present in your project, static prop types are parsed using [react-docgen-typescript](https://github.com/styleguidist/react-docgen-typescript) to provide better autocompletion in the Playroom editor.
Copy file name to clipboardExpand all lines: polaris.shopify.com/content/components/layout-and-structure/page.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,7 @@ keywords:
19
19
- outer wrapper
20
20
- page actions
21
21
- page layouts
22
+
updateBannerMessage: We are [adding patterns](/patterns) to our documentation. Check out related patterns, expect changes to happen, and [join the discussion](https://github.com/Shopify/polaris/discussions/categories/pattern-documentation) to make it better!
22
23
examples:
23
24
- fileName: page-default.tsx
24
25
title: Default
@@ -158,3 +159,8 @@ Add a menu item
158
159
- To lay out the content within a page, use the [layout component](https://polaris.shopify.com/components/layout-and-structure/layout)
159
160
- To add pagination within the context of a list or other page content, use the [pagination component](https://polaris.shopify.com/components/navigation/pagination)
160
161
- To add primary and secondary calls to action at the bottom of a page, see the [page actions component](https://polaris.shopify.com/components/actions/page-actions)
Copy file name to clipboardExpand all lines: polaris.shopify.com/content/components/navigation/navigation.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -68,7 +68,7 @@ The navigation component should:
68
68
- Use a major icon for item actions.
69
69
- Use a minor icon for secondary actions.
70
70
- Use the provided navigation section component to group navigation items.
71
-
- Not add additional components, like [badge](/components/feedback-indicators/badge), in navigation items. Example: Don‘t add the [New badge](/patterns/new-badge).
71
+
- Not add additional components, like [badge](/components/feedback-indicators/badge), in navigation items. Example: Don‘t add the [New badge](/patterns-legacy/new-badge).
Copy file name to clipboardExpand all lines: polaris.shopify.com/content/components/selection-and-input/date-picker.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,7 @@ keywords:
16
16
- date selector
17
17
- date range picker
18
18
- date range selector
19
+
updateBannerMessage: We are [adding patterns](/patterns) to our documentation. Check out related patterns, expect changes to happen, and [join the discussion](https://github.com/Shopify/polaris/discussions/categories/pattern-documentation) to make it better!
19
20
examples:
20
21
- fileName: date-picker-default.tsx
21
22
title: Default
@@ -57,3 +58,7 @@ If you use the date picker within a [popover component](/components/overlays/pop
57
58
- Press the <kbd>tab</kbd> key to move forward and <kbd>shift</kbd> + <kbd>tab</kbd> to move backward through the previous button, next button, and the calendar
58
59
- When focus is in the calendar, move keyboard focus between the dates using the arrow keys
59
60
- To select a date that has focus, press the <kbd>enter</kbd>/<kbd>return</kbd> key
0 commit comments