Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/strange-buckets-try.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'polaris.shopify.com': minor
---

Matched v11 migration docs to migrations folder
58 changes: 46 additions & 12 deletions polaris.shopify.com/content/tools/polaris-migrator.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ npx @shopify/polaris-migrator <migration> <path>

### v11

#### `v11-react-breadcrumbs-migrate-from-array`
#### `v11-react-update-page-breadcrumbs`

Replace legacy Page component `breadcrumbs` props with the new `backAction` prop which accepts a [`LinkAction` object](https://github.com/Shopify/polaris/blob/main/polaris-react/src/types.ts#L113-L122).

Expand All @@ -39,7 +39,7 @@ Replace legacy Page component `breadcrumbs` props with the new `backAction` prop
<br />

```sh
npx @shopify/polaris-migrator v11-react-breadcrumbs-migrate-from-array <path>
npx @shopify/polaris-migrator v11-react-update-page-breadcrumbs <path>
```

<br />
Expand All @@ -61,36 +61,36 @@ npx @shopify/polaris-migrator v11-styles-replace-custom-property-border <path>

<br />

#### `v11-styles-replace-custom-property-depth`
#### `v11-styles-replace-custom-property-color`

Replace deprecated depth CSS custom properties with corresponding replacement static values.
Replace deprecated color CSS custom properties with corresponding Polaris custom property replacement values.

```diff
- box-shadow: var(--p-shadow-transparent);
+ box-shadow: 0 0 0 0 transparent;
- color: var(--p-text);;
+ color: var(--p-color-text);
```

<br />

```sh
npx @shopify/polaris-migrator v11-styles-replace-custom-property-depth <path>
npx @shopify/polaris-migrator v11-styles-replace-custom-property-color <path>
```

<br />

#### `v11-styles-replace-custom-property-zindex`
#### `v11-styles-replace-custom-property-depth`

Replace deprecated z-index CSS custom properties with corresponding Polaris custom property replacement values.
Replace deprecated depth CSS custom properties with corresponding replacement static values.

```diff
- z-index: var(--p-z-1);
+ z-index: var(--p-z-index-1);
- box-shadow: var(--p-shadow-transparent);
+ box-shadow: 0 0 0 0 transparent;
```

<br />

```sh
npx @shopify/polaris-migrator v11-styles-replace-custom-property-zindex <path>
npx @shopify/polaris-migrator v11-styles-replace-custom-property-depth <path>
```

<br />
Expand All @@ -115,6 +115,40 @@ npx @shopify/polaris-migrator v11-styles-replace-custom-property-legacy <path>

<br />

#### `v11-styles-replace-custom-property-motion`

Replace deprecated motion CSS custom properties with corresponding Polaris custom property replacement values.

```diff
- transition-timing-function: var(--p-linear);
+ transition-timing-function: var(--p-motion-linear);
```

<br />

```sh
npx @shopify/polaris-migrator v11-styles-replace-custom-property-motion <path>
```

<br />

#### `v11-styles-replace-custom-property-zindex`

Replace deprecated z-index CSS custom properties with corresponding Polaris custom property replacement values.

```diff
- z-index: var(--p-z-1);
+ z-index: var(--p-z-index-1);
```

<br />

```sh
npx @shopify/polaris-migrator v11-styles-replace-custom-property-zindex <path>
```

<br />

### v10

#### `v10-react-replace-text-components`
Expand Down