Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
dfdeafb
Remove v11 legacy custom properties
lgriffee Feb 15, 2023
540c49c
Update spacing documentation
lgriffee Feb 15, 2023
8aa3d8c
Update spacing example in stylelint
lgriffee Feb 15, 2023
5955b14
Update z-index examples stylelint
lgriffee Feb 15, 2023
9f0d67f
Add migration documentation for v10 to v11
lgriffee Feb 15, 2023
1ff392b
Add border-radius to v11 migration guide
lgriffee Feb 16, 2023
c11b4da
Revert removal of --p-duration-0
lgriffee Feb 17, 2023
b637ed0
Revert removal of --p-space-0
lgriffee Feb 17, 2023
7921480
Remove all legacy values
lgriffee Feb 17, 2023
58e546f
Update documentation to include removal of legacy tokens
lgriffee Feb 17, 2023
ec7bed6
Merge branch 'v11-major' of https://github.com/Shopify/polaris into r…
lgriffee Feb 17, 2023
0573113
Update migration guide
lgriffee Mar 3, 2023
3ef29d8
Merge branch 'v11-major' of https://github.com/Shopify/polaris into r…
lgriffee Mar 3, 2023
a68569d
Merge branch 'v11-major' of https://github.com/Shopify/polaris into r…
lgriffee Mar 13, 2023
8f47b75
Update depth token documentation
lgriffee Mar 13, 2023
9a5c422
Remove entire depth token group
lgriffee Mar 13, 2023
e6cbed6
Remove legacy color tokens
lgriffee Mar 13, 2023
c088c82
Ensure stylelint-polaris examples are using v11 tokens
lgriffee Mar 13, 2023
017c61a
Ensure stylelint-polaris tests are using v11 tokens
lgriffee Mar 13, 2023
fc21490
Revert changes to stylelint-polaris docs
lgriffee Apr 20, 2023
6b98f64
Merge branch 'v11-major' of https://github.com/Shopify/polaris into r…
lgriffee Apr 20, 2023
6443e66
Remove deprecated z-index type
lgriffee Apr 20, 2023
ae5f364
Port over Alex's additional removals and extend to all tokens
lgriffee Apr 20, 2023
e720c85
Remove remaining instances of legacy tokens
lgriffee Apr 20, 2023
95a1396
Remove the right colors.ts file 🙈
lgriffee Apr 20, 2023
1394a01
Create copy of legacy colors file for codemods/migrations
lgriffee Apr 20, 2023
d4ee7e4
Merge branch 'v11-major' of https://github.com/Shopify/polaris into r…
lgriffee Apr 20, 2023
96606e3
Merge branch 'v11-major' of https://github.com/Shopify/polaris into r…
lgriffee Apr 20, 2023
ee1fd54
Remove spacing token group
lgriffee Apr 20, 2023
a90ec89
Remove lingering instance of spacing
lgriffee Apr 20, 2023
fe68057
Add migration doc entry for motion tokens
lgriffee Apr 20, 2023
0f66c0e
Merge branch 'v11-major' of https://github.com/Shopify/polaris into r…
lgriffee Apr 21, 2023
0dc72ba
Remove legacy motion tokens
lgriffee Apr 21, 2023
424d988
Remove remaining instances of legacy motion tokens
lgriffee Apr 24, 2023
dfdb4a1
Remove types from legacy v10 color file
lgriffee Apr 24, 2023
a9d75d8
Add back tests
lgriffee Apr 24, 2023
68ff7f9
Update polaris-tokens/README.md
lgriffee Apr 24, 2023
8bbcef3
Update polaris-tokens/README.md
lgriffee Apr 24, 2023
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
253 changes: 253 additions & 0 deletions documentation/guides/migrating-from-v10-to-v11.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import type {FileInfo, API, Options} from 'jscodeshift';
import type {Plugin} from 'postcss';
import postcss from 'postcss';
import valueParser from 'postcss-value-parser';
import {colors as tokenColors, createVar} from '@shopify/polaris-tokens';
import {colors as tokenColors} from './v10-legacy-colors';
import {createVar} from '@shopify/polaris-tokens';

import type {NamespaceOptions} from '../../utilities/sass';
import {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,172 +1,4 @@
import type {MetadataProperties} from '../types';

export type ColorsBackgroundTokenAlias =
| 'background'
| 'background-hovered'
| 'background-pressed'
| 'background-selected';

export type ColorsActionTokenAlias =
| 'action-critical'
| 'action-critical-depressed'
| 'action-critical-disabled'
| 'action-critical-hovered'
| 'action-critical-pressed'
| 'action-primary'
| 'action-primary-depressed'
| 'action-primary-disabled'
| 'action-primary-hovered'
| 'action-primary-pressed'
| 'action-secondary'
| 'action-secondary-depressed'
| 'action-secondary-disabled'
| 'action-secondary-hovered'
| 'action-secondary-hovered-dark'
| 'action-secondary-pressed'
| 'action-secondary-pressed-dark';

export type ColorsSurfaceTokenAlias =
| 'surface'
| 'surface-attention'
| 'surface-critical'
| 'surface-critical-subdued'
| 'surface-critical-subdued-depressed'
| 'surface-critical-subdued-hovered'
| 'surface-critical-subdued-pressed'
| 'surface-dark'
| 'surface-depressed'
| 'surface-disabled'
| 'surface-highlight'
| 'surface-highlight-subdued'
| 'surface-highlight-subdued-hovered'
| 'surface-highlight-subdued-pressed'
| 'surface-hovered'
| 'surface-hovered-dark'
| 'surface-neutral'
| 'surface-neutral-disabled'
| 'surface-neutral-hovered'
| 'surface-neutral-pressed'
| 'surface-neutral-subdued'
| 'surface-neutral-subdued-dark'
| 'surface-pressed'
| 'surface-pressed-dark'
| 'surface-primary-selected'
| 'surface-primary-selected-hovered'
| 'surface-primary-selected-pressed'
| 'surface-search-field'
| 'surface-search-field-dark'
| 'surface-selected'
| 'surface-selected-hovered'
| 'surface-selected-pressed'
| 'surface-subdued'
| 'surface-success'
| 'surface-success-subdued'
| 'surface-success-subdued-hovered'
| 'surface-success-subdued-pressed'
| 'surface-warning'
| 'surface-warning-subdued'
| 'surface-warning-subdued-hovered'
| 'surface-warning-subdued-pressed';

export type ColorsBackdropTokenAlias = 'backdrop';

export type ColorsOverlayTokenAlias = 'overlay';

export type ColorsBorderTokenAlias =
| 'border'
| 'border-on-dark'
| 'border-neutral-subdued'
| 'border-hovered'
| 'border-disabled'
| 'border-subdued'
| 'border-depressed'
| 'border-shadow'
| 'border-shadow-subdued'
| 'border-critical'
| 'border-critical-subdued'
| 'border-critical-disabled'
| 'border-warning'
| 'border-warning-subdued'
| 'border-highlight'
| 'border-highlight-subdued'
| 'border-success'
| 'border-success-subdued';

export type ColorsTokenName =
| ColorsBackgroundTokenAlias
| ColorsActionTokenAlias
| ColorsSurfaceTokenAlias
| ColorsBackdropTokenAlias
| ColorsOverlayTokenAlias
| ColorsBorderTokenAlias
| 'decorative-five-icon'
| 'decorative-five-surface'
| 'decorative-five-text'
| 'decorative-four-icon'
| 'decorative-four-surface'
| 'decorative-four-text'
| 'decorative-one-icon'
| 'decorative-one-surface'
| 'decorative-one-text'
| 'decorative-three-icon'
| 'decorative-three-surface'
| 'decorative-three-text'
| 'decorative-two-icon'
| 'decorative-two-surface'
| 'decorative-two-text'
| 'divider-dark'
| 'divider'
| 'focused'
| 'hint-from-direct-light'
| 'icon-attention'
| 'icon-critical'
| 'icon-disabled'
| 'icon-highlight'
| 'icon-hovered'
| 'icon-on-critical'
| 'icon-on-dark'
| 'icon-on-interactive'
| 'icon-on-primary'
| 'icon-pressed'
| 'icon-subdued'
| 'icon-success'
| 'icon-warning'
| 'icon'
| 'interactive-critical-disabled'
| 'interactive-critical-hovered'
| 'interactive-critical-pressed'
| 'interactive-critical'
| 'interactive-disabled'
| 'interactive-hovered'
| 'interactive-on-dark'
| 'interactive-pressed-on-dark'
| 'interactive-pressed'
| 'interactive'
| 'shadow-color-picker-dragger'
| 'shadow-color-picker'
| 'text'
| 'text-critical'
| 'text-disabled'
| 'text-highlight'
| 'text-on-critical'
| 'text-on-dark'
| 'text-on-interactive'
| 'text-on-primary'
| 'text-primary-hovered'
| 'text-primary-pressed'
| 'text-primary'
| 'text-subdued-on-dark'
| 'text-subdued'
| 'text-success'
| 'text-warning';

export type ColorsTokenGroup = {
[TokenName in ColorsTokenName]: string;
};

export const colors: {
[TokenName in ColorsTokenName]: MetadataProperties;
} = {
export const colors = {
background: {
value: 'rgba(246, 246, 247, 1)',
description:
Expand Down
8 changes: 1 addition & 7 deletions polaris-for-vscode/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,7 @@ import type {
} from 'vscode-languageserver/node';
import {TextDocument} from 'vscode-languageserver-textdocument';

const excludedTokenGroupNames = [
'colors',
'depth',
'legacy',
'spacing',
'shape',
] as const;
const excludedTokenGroupNames = [] as const;

type ExcludedTokenGroupName = typeof excludedTokenGroupNames[number];

Expand Down
Loading