Skip to content

Commit

Permalink
Merge branch 'next' into update-next
Browse files Browse the repository at this point in the history
* next: (87 commits)
  [ButtonGroup] Removed `segmented` boolean prop and replaced with `variant` (#9997)
  [LegacyTabs] Consolidate se23 styles and logic (#10231)
  [v12] Update changesets (#10232)
  [LegacyFilters] Consolidate se23 styles and logic (#10217)
  [Banner] Change status prop to tone (#10206)
  Replace icon highlight color in box stories (#10226)
  [TopBar] Consolidate se23 styles and logic (#10221)
  [Filters] consolidate se23 logic and styles (#10178)
  [Icon] Update props (#10220)
  [ButtonGroup] Update variant plain prop name (#10222)
  [Button] Remove connectedDisclosure (#10182)
  [LegacyCard] Consolidate se23 styles and logic (#10207)
  [Navigation] Consolidate se23 logic and styles (#10213)
  [Frame][ContextualSaveBar] Consolidate se23 styles and logic (#10196)
  [OptionList] consolidate se23 styles and logic  (#10177)
  [Page] Consolidate se23 styles and logic (#10187)
  [DataTable] Consolidate conditional logic (#10169)
  [Thumbnail] Consolidate conditional logic (#10171)
  [ResourceItem] Consolidate conditional logic (#10172)
  [FullscreenBar] Consolidate conditional logic (#10173)
  ...
  • Loading branch information
sam-b-rose committed Aug 25, 2023
2 parents 90eac18 + b59fc9e commit 8cf63b7
Show file tree
Hide file tree
Showing 411 changed files with 4,426 additions and 10,050 deletions.
5 changes: 5 additions & 0 deletions .changeset/chilly-grapes-enjoy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@shopify/polaris': major
---

Removed `shape` prop on `Avatar` component
8 changes: 7 additions & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": [],
"ignore": [
"@shopify/polaris-cli",
"@shopify/polaris-codemods",
"@shopify/polaris-migrator",
"polaris.shopify.com",
"polaris-for-vscode"
],
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
"updateInternalDependents": "always"
}
Expand Down
5 changes: 5 additions & 0 deletions .changeset/fuzzy-coats-study.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@shopify/polaris': major
---

[ButtonGroup] Removed `segmented` boolean prop and replaced with `variant`. Replaced `spacing` prop with `gap`
5 changes: 5 additions & 0 deletions .changeset/fuzzy-pears-jog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@shopify/polaris': major
---

Updated `borderRadius` props to match web spec
5 changes: 5 additions & 0 deletions .changeset/healthy-boxes-wave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@shopify/polaris': major
---

Renamed `color` prop to `tone` for `ProgressBar` component
5 changes: 5 additions & 0 deletions .changeset/honest-stingrays-act.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@shopify/polaris': major
---

Removed connectedDislosure prop on button
5 changes: 5 additions & 0 deletions .changeset/kind-phones-yell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@shopify/polaris': major
---

Removed `divider` prop from `Page` component
5 changes: 5 additions & 0 deletions .changeset/loud-hounds-fetch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@shopify/polaris': major
---

Renamed `destructive` prop to `tone` for `Button` component
5 changes: 5 additions & 0 deletions .changeset/nice-zoos-vanish.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@shopify/polaris': major
---

Enabled the Summer Editions 2023 feature flag by default
5 changes: 5 additions & 0 deletions .changeset/olive-clouds-pretend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@shopify/polaris': major
---

Changed `status` prop on `Banner` to `tone`
18 changes: 18 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"mode": "pre",
"tag": "beta",
"initialVersions": {
"@shopify/polaris-cli": "0.2.25",
"@shopify/polaris-codemods": "0.1.11",
"polaris-for-vscode": "0.7.0",
"@shopify/polaris-icons": "7.7.0",
"@shopify/polaris-migrator": "0.19.8",
"@shopify/polaris": "11.9.1",
"@shopify/polaris-tokens": "7.5.2",
"polaris.shopify.com": "0.56.3",
"@shopify/stylelint-polaris": "13.0.8"
},
"changesets": [
"nice-zoos-vanish"
]
}
5 changes: 5 additions & 0 deletions .changeset/proud-parrots-yawn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@shopify/polaris': major
---

Changed `color` prop on `Icon` to `tone`
7 changes: 7 additions & 0 deletions .changeset/rotten-comics-think.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@shopify/polaris': major
---

Replaced `borderless` prop with `variant` on TextField

Migration: `npx @shopify/polaris-migrator react-rename-component-prop <path> --componentName="TextField" --from="borderless" --to="variant" --newValue="borderless"`
5 changes: 5 additions & 0 deletions .changeset/silent-brooms-confess.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@shopify/polaris': major
---

Consolidated boolean `Button` props into `variant` prop
5 changes: 5 additions & 0 deletions .changeset/silly-ligers-heal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@shopify/polaris': major
---

Replaced boolean props: `secondary`, `fullWidth`, `oneHalf`, `oneThird` on Layout.Section with `variant`
5 changes: 5 additions & 0 deletions .changeset/tall-chicken-repeat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@shopify/polaris': major
---

Removed Summer Editions experimental styles and code for the following components: `AppProvider`, `Avatar`, `AccountConnection`, `ActionList`, `ActionMenu`, `Autocomplete`, `Badge`, `Banner`, `Breadcrumbs`, `BulkActions`, `Button`, `ButtonGroup`, `CalloutCard`, `Card`, `CheckableButton`, `Checkbox`, `Choice`, `Connected`, `DataTable`, `DatePicker`, `DropZone`, `EmptyState`, `Filters`, `FormLayout`, `Frame`, `FullscreenBar`, `IndexFilters`, `IndexTable`, `InlineError`, `KeyboardKey`, `Labelled`, `Layout`, `LegacyCard`, `LegacyFilters`, `LegacyTabs`, `Link`, `List`, `Listbox`, `MediaCard`, `Modal`, `Navigation`, `OptionList`, `Page`, `PageActions`, `Pagination`, `Popover`, `ProgressBar`, `RadioButton`, `ResourceItem`, `ResourceList`, `Select`, `SettingAction`, `ShadowBevel`, `SkeletonPage`, `SkeletonThumbnail`, `Spinner`, `Tabs`, `Tag`, `Text`, `TextField`, `Thumbnail`, `TooltipOverlay`, `TopBar`, and `VideoThumbnail`
5 changes: 5 additions & 0 deletions .changeset/wise-pianos-unite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@shopify/polaris': major
---

Removed `optionRole` prop from `OptionList` component
2 changes: 2 additions & 0 deletions .github/workflows/ci-a11y-vrt-experimental.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ on:
paths:
- 'polaris-react/src/**'
- 'polaris-react/playground/**'
- 'polaris-react/.storybook/**'
- 'polaris-tokens/src/**'
pull_request:
paths:
- 'polaris-react/src/**'
- 'polaris-react/playground/**'
- 'polaris-react/.storybook/**'
- 'polaris-tokens/src/**'

jobs:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/major-version-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: Major version in changeset

on:
pull_request:
branches:
- main
types:
- labeled
- unlabeled
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- main
- next

concurrency: ${{ github.workflow }}-${{ github.ref }}

Expand Down
77 changes: 77 additions & 0 deletions documentation/guides/migrating-from-v11-to-v12.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Migrating from v11 to v12

Polaris v12.0.0 ([full release notes](https://github.com/Shopify/polaris/releases/tag/v12.0.0)) prop replacement, removal of components, renamed components, and token changes.

## Table of Contents

- [Quick migration guide](#quick-migration-guide)

## Quick migration guide

**Layout.Section**

- One third:

`npx @shopify/polaris-migrator react-rename-component-prop <path> --componentName="Layout.Section" --from="oneThird" --to="variant" --newValue="oneThird"`

- One half:

`npx @shopify/polaris-migrator react-rename-component-prop <path> --componentName="Layout.Section" --from="oneHalf" --to="variant" --newValue="oneHalf"`

- Full width:

`npx @shopify/polaris-migrator react-rename-component-prop <path> --componentName="Layout.Section" --from="fullWidth" --to="variant" --newValue="fullWidth"`

- Secondary, becomes oneThird:

`npx @shopify/polaris-migrator react-rename-component-prop <path> --componentName="Layout.Section" --from="secondary" --to="variant" --newValue="oneThird"`

**TextField**

`npx @shopify/polaris-migrator react-rename-component-prop <path> --componentName="TextField" --from="borderless" --to="variant" --newValue="borderless"`

**Box**

`npx @shopify/polaris-migrator react-rename-component-prop <path> --componentName="Box" --from="borderRadiusEndStart" --to="variant" --newValue="borderEndStartRadius"`

`npx @shopify/polaris-migrator react-rename-component-prop <path> --componentName="Box" --from="borderRadiusEndEnd" --to="variant" --newValue="borderEndEndRadius"`

`npx @shopify/polaris-migrator react-rename-component-prop <path> --componentName="Box" --from="borderRadiusStartStart" --to="variant" --newValue="borderStartStartRadius"`

`npx @shopify/polaris-migrator react-rename-component-prop <path> --componentName="Box" --from="borderRadiusStartEnd" --to="variant" --newValue="borderStartEndRadius"`

**HorizontalStack**

`npx @shopify/polaris-migrator react-rename-component <path> --renameFrom="HorizontalStack" --renameTo="InlineStack" --renamePropsFrom="HorizontalStackProps" --renamePropsTo="InlineStackProps"`

**VerticalStack**

`npx @shopify/polaris-migrator react-rename-component <path> --renameFrom="VerticalStack" --renameTo="BlockStack" --renamePropsFrom="VerticalStackProps" --renamePropsTo="BlockStackProps"`

**HorizontalGrid**

`npx @shopify/polaris-migrator react-rename-component <path> --renameFrom="HorizontalGrid" --renameTo="InlineGrid" --renamePropsFrom="HorizontalGridProps" --renamePropsTo="InlineGridProps"`

**Button**

- connectedDisclosure: [See the updated split example](https://polaris.shopify.com/components/actions/button)

// TODO - Boolean prop to tone, variant migration

**Banner**

`npx @shopify/polaris-migrator react-rename-component-prop <path> --componentName="Banner" --from="status" --to="tone"`

**Icon**

- Backdrop is not a pattern in the new Polaris design language. If you must use a backdrop on your icon, use Box.

```tsx
<Box background={boxBackground} padding="1" width="28px" borderRadius="full">
<Icon source={CirclePlusMinor} color={iconColor} />
</Box>
```

- Color

`npx @shopify/polaris-migrator react-rename-component-prop <path> --componentName="Icon" --from="color" --to="tone"`
2 changes: 1 addition & 1 deletion polaris-migrator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"@rollup/plugin-commonjs": "^22.0.2",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^13.3.0",
"@shopify/polaris": "^11.13.0",
"@shopify/polaris": "^12.0.0-beta.0",
"plop": "^3.1.1",
"plop-dir": "^0.0.5",
"prettier": "^2.7.1",
Expand Down
2 changes: 1 addition & 1 deletion polaris-react/.storybook/manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export const featureFlagOptions = {
polarisSummerEditions2023: {
name: 'polarisSummerEditions2023',
description: 'Toggle the summer editions feature flag',
defaultValue: false,
defaultValue: true,
control: {type: 'boolean'},
},
polarisSummerEditions2023ShadowBevelOptOut: {
Expand Down
1 change: 1 addition & 0 deletions polaris-react/.storybook/preview-head.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
crossorigin="anonymous"
/>
<link
id="inter-font-link"
href="https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap"
rel="stylesheet"
/>
6 changes: 6 additions & 0 deletions polaris-react/.storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {GridOverlay} from './GridOverlay';
import {RenderPerformanceProfiler} from './RenderPerformanceProfiler';
import {gridOptions, featureFlagOptions} from './manager';
import {breakpoints} from '@shopify/polaris-tokens';
import isChromatic from 'chromatic/isChromatic';

function StrictModeDecorator(Story, context) {
const {strictMode} = context.globals;
Expand All @@ -19,6 +20,11 @@ function StrictModeDecorator(Story, context) {
}

function AppProviderDecorator(Story, context) {
// Use system font in chromatic snapshots to avoid async font loading flakiness
if (isChromatic()) {
document.getElementById('inter-font-link').removeAttribute('href');
}

const {
polarisSummerEditions2023,
polarisSummerEditions2023ShadowBevelOptOut,
Expand Down
2 changes: 1 addition & 1 deletion polaris-react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ If React doesn’t make sense for your application, you can use a CSS-only versi
```html
<link
rel="stylesheet"
href="https://unpkg.com/@shopify/polaris@11.13.0/build/esm/styles.css"
href="https://unpkg.com/@shopify/polaris@12.0.0-beta.0/build/esm/styles.css"
/>
```

Expand Down
3 changes: 1 addition & 2 deletions polaris-react/locales/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
"dismissButton": "Zavřít notifikaci"
},
"Button": {
"spinnerAccessibilityLabel": "Načítání",
"connectedDisclosureAccessibilityLabel": "Související akce"
"spinnerAccessibilityLabel": "Načítání"
},
"Common": {
"checkbox": "zaškrtávací pole",
Expand Down
3 changes: 1 addition & 2 deletions polaris-react/locales/da.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
"dismissButton": "Afvis meddelelse"
},
"Button": {
"spinnerAccessibilityLabel": "Indlæser",
"connectedDisclosureAccessibilityLabel": "Relaterede handlinger"
"spinnerAccessibilityLabel": "Indlæser"
},
"Common": {
"checkbox": "afkrydsningsfelt",
Expand Down
3 changes: 1 addition & 2 deletions polaris-react/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
"dismissButton": "Benachrichtigung verwerfen"
},
"Button": {
"spinnerAccessibilityLabel": "Wird geladen",
"connectedDisclosureAccessibilityLabel": "Ähnliche Aktionen"
"spinnerAccessibilityLabel": "Wird geladen"
},
"Common": {
"checkbox": "Kontrollkästchen",
Expand Down
3 changes: 1 addition & 2 deletions polaris-react/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@
"dismissButton": "Dismiss notification"
},
"Button": {
"spinnerAccessibilityLabel": "Loading",
"connectedDisclosureAccessibilityLabel": "Related actions"
"spinnerAccessibilityLabel": "Loading"
},
"Common": {
"checkbox": "checkbox",
Expand Down
3 changes: 1 addition & 2 deletions polaris-react/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
"dismissButton": "Descartar notificación"
},
"Button": {
"spinnerAccessibilityLabel": "Cargando",
"connectedDisclosureAccessibilityLabel": "Acciones relacionadas"
"spinnerAccessibilityLabel": "Cargando"
},
"Common": {
"checkbox": "casilla de verificación",
Expand Down
3 changes: 1 addition & 2 deletions polaris-react/locales/fi.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
"dismissButton": "Ohita ilmoitus"
},
"Button": {
"spinnerAccessibilityLabel": "Ladataan",
"connectedDisclosureAccessibilityLabel": "Aiheeseen liittyvät toimenpiteet"
"spinnerAccessibilityLabel": "Ladataan"
},
"Common": {
"checkbox": "valintaruutu",
Expand Down
3 changes: 1 addition & 2 deletions polaris-react/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
"dismissButton": "Rejeter la notification"
},
"Button": {
"spinnerAccessibilityLabel": "Chargement en cours",
"connectedDisclosureAccessibilityLabel": "Actions associées"
"spinnerAccessibilityLabel": "Chargement en cours"
},
"Common": {
"checkbox": "case à cocher",
Expand Down
3 changes: 1 addition & 2 deletions polaris-react/locales/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
"dismissButton": "Elimina notifica"
},
"Button": {
"spinnerAccessibilityLabel": "Caricamento in corso",
"connectedDisclosureAccessibilityLabel": "Azioni correlate"
"spinnerAccessibilityLabel": "Caricamento in corso"
},
"Common": {
"checkbox": "casella di spunta",
Expand Down
3 changes: 1 addition & 2 deletions polaris-react/locales/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
"dismissButton": "通知を閉じる"
},
"Button": {
"spinnerAccessibilityLabel": "読み込み中",
"connectedDisclosureAccessibilityLabel": "関連したアクション"
"spinnerAccessibilityLabel": "読み込み中"
},
"Common": {
"checkbox": "チェックボックス",
Expand Down
3 changes: 1 addition & 2 deletions polaris-react/locales/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
"dismissButton": "알림 무시"
},
"Button": {
"spinnerAccessibilityLabel": "로드 중",
"connectedDisclosureAccessibilityLabel": "관련 작업"
"spinnerAccessibilityLabel": "로드 중"
},
"Common": {
"checkbox": "확인란",
Expand Down
3 changes: 1 addition & 2 deletions polaris-react/locales/nb.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
"dismissButton": "Avvis varsel"
},
"Button": {
"spinnerAccessibilityLabel": "Laster inn",
"connectedDisclosureAccessibilityLabel": "Relaterte handlinger"
"spinnerAccessibilityLabel": "Laster inn"
},
"Common": {
"checkbox": "avmerkingsboks",
Expand Down
Loading

0 comments on commit 8cf63b7

Please sign in to comment.