Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Icons] Fix incorrect icon names post-v8 icons uplift #11446

Merged
merged 5 commits into from
Jan 15, 2024
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
6 changes: 6 additions & 0 deletions .changeset/angry-lamps-notice.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@shopify/polaris': patch
'polaris.shopify.com': patch
---

[Icons] Fixed references to incorrect icon imports that were causing Storybook to break
38 changes: 19 additions & 19 deletions polaris-react/src/components/Box/Box.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import type {ComponentMeta} from '@storybook/react';
import {BlockStack, Text, Box, Icon} from '@shopify/polaris';
import {PaintBrushIcon} from '@shopify/polaris-icons';
import {PaintBrushFlatIcon} from '@shopify/polaris-icons';

export default {
component: Box,
Expand All @@ -10,7 +10,7 @@ export default {
export function Default() {
return (
<Box>
<Icon source={PaintBrushIcon} tone="base" />
<Icon source={PaintBrushFlatIcon} tone="base" />
</Box>
);
}
Expand Down Expand Up @@ -102,7 +102,7 @@ export function WithOutline() {
outlineWidth="025"
outlineColor="border"
>
<Icon source={PaintBrushIcon} tone="base" />
<Icon source={PaintBrushFlatIcon} tone="base" />
</Box>
<Box
background="bg-surface"
Expand All @@ -111,23 +111,23 @@ export function WithOutline() {
outlineStyle="dashed"
outlineColor="border-secondary"
>
<Icon source={PaintBrushIcon} tone="base" />
<Icon source={PaintBrushFlatIcon} tone="base" />
</Box>
<Box
background="bg-surface"
padding="400"
outlineWidth="050"
outlineColor="border-info"
>
<Icon source={PaintBrushIcon} tone="base" />
<Icon source={PaintBrushFlatIcon} tone="base" />
</Box>
<Box
background="bg-surface"
padding="400"
outlineWidth="100"
outlineColor="border-caution"
>
<Icon source={PaintBrushIcon} tone="base" />
<Icon source={PaintBrushFlatIcon} tone="base" />
</Box>
</BlockStack>
);
Expand All @@ -136,7 +136,7 @@ export function WithOutline() {
export function WithBorderRadius() {
return (
<Box background="bg-surface" padding="400" borderRadius="200">
<Icon source={PaintBrushIcon} tone="info" />
<Icon source={PaintBrushFlatIcon} tone="info" />
</Box>
);
}
Expand All @@ -150,55 +150,55 @@ export function WithPadding() {
borderWidth="050"
borderColor="border-info"
>
<Icon source={PaintBrushMajor} tone="base" />
<Icon source={PaintBrushFlatIcon} tone="base" />
</Box>
<Box
background="bg-surface"
paddingBlock="400"
borderWidth="050"
borderColor="border-info"
>
<Icon source={PaintBrushMajor} tone="base" />
<Icon source={PaintBrushFlatIcon} tone="base" />
</Box>
<Box
background="bg-surface"
paddingBlockStart="400"
borderWidth="050"
borderColor="border-info"
>
<Icon source={PaintBrushMajor} tone="base" />
<Icon source={PaintBrushFlatIcon} tone="base" />
</Box>
<Box
background="bg-surface"
paddingBlockEnd="400"
borderWidth="050"
borderColor="border-info"
>
<Icon source={PaintBrushMajor} tone="base" />
<Icon source={PaintBrushFlatIcon} tone="base" />
</Box>
<Box
background="bg-surface"
paddingInline="400"
borderWidth="050"
borderColor="border-info"
>
<Icon source={PaintBrushMajor} tone="base" />
<Icon source={PaintBrushFlatIcon} tone="base" />
</Box>
<Box
background="bg-surface"
paddingInlineStart="400"
borderWidth="050"
borderColor="border-info"
>
<Icon source={PaintBrushMajor} tone="base" />
<Icon source={PaintBrushFlatIcon} tone="base" />
</Box>
<Box
background="bg-surface"
paddingInlineEnd="400"
borderWidth="050"
borderColor="border-info"
>
<Icon source={PaintBrushMajor} tone="base" />
<Icon source={PaintBrushFlatIcon} tone="base" />
</Box>
</BlockStack>
);
Expand All @@ -213,7 +213,7 @@ export function WithResponsivePadding() {
borderWidth="025"
borderColor="border"
>
<Icon source={PaintBrushIcon} tone="base" />
<Icon source={PaintBrushFlatIcon} tone="base" />
</Box>
<Box
background="bg-surface"
Expand All @@ -222,7 +222,7 @@ export function WithResponsivePadding() {
borderWidth="025"
borderColor="border"
>
<Icon source={PaintBrushIcon} tone="base" />
<Icon source={PaintBrushFlatIcon} tone="base" />
</Box>
<Box
background="bg-surface"
Expand All @@ -231,7 +231,7 @@ export function WithResponsivePadding() {
borderWidth="025"
borderColor="border"
>
<Icon source={PaintBrushIcon} tone="base" />
<Icon source={PaintBrushFlatIcon} tone="base" />
</Box>
<Box
background="bg-surface"
Expand All @@ -240,15 +240,15 @@ export function WithResponsivePadding() {
borderWidth="025"
borderColor="border"
>
<Icon source={PaintBrushIcon} tone="base" />
<Icon source={PaintBrushFlatIcon} tone="base" />
</Box>
<Box
background="bg-surface"
paddingInlineEnd={{xs: '400', sm: '1000'}}
borderWidth="025"
borderColor="border"
>
<Icon source={PaintBrushIcon} tone="base" />
<Icon source={PaintBrushFlatIcon} tone="base" />
</Box>
</BlockStack>
);
Expand Down
4 changes: 2 additions & 2 deletions polaris-react/src/components/Card/Card.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
ResourceList,
Text,
} from '@shopify/polaris';
import {ProductsMinor} from '@shopify/polaris-icons';
import {ProductIcon} from '@shopify/polaris-icons';

export default {
component: Card,
Expand Down Expand Up @@ -609,7 +609,7 @@ export function WithCustomReactNodeTitle() {
</Text>
<BlockStack inlineAlign="start">
<InlineStack gap="400">
<Icon source={ProductsMinor} />
<Icon source={ProductIcon} />
<Text as="h3" variant="headingSm">
New Products
</Text>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, {useId} from 'react';
import {XCircleIcon} from '@shopify/polaris-icons';
import {SearchIcon} from '@shopify/polaris-icons';

import {Spinner} from '../../../Spinner';
import {Icon} from '../../../Icon';
Expand Down Expand Up @@ -62,7 +62,7 @@ export function SearchField({
disabled={disabled}
variant={borderlessQueryField ? 'borderless' : 'inherit'}
size="slim"
prefix={mdUp ? <Icon source={XCircleIcon} /> : undefined}
prefix={mdUp ? <Icon source={SearchIcon} /> : undefined}
suffix={
loading ? (
<div className={styles.Spinner}>
Expand Down
14 changes: 7 additions & 7 deletions polaris-react/src/components/Icon/Icon.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,31 +97,31 @@ export function WithToneInherit() {
<BlockStack gap="200">
<Text as="p" tone="caution" variant="bodyMd" alignment="center">
Caution tone
<Icon source={icons.CirclePlusMinor} tone="inherit" />
<Icon source={icons.PlusCircleIcon} tone="inherit" />
</Text>
<Text as="p" tone="critical" variant="bodyMd" alignment="center">
Critical tone
<Icon source={icons.CirclePlusMinor} tone="inherit" />
<Icon source={icons.PlusCircleIcon} tone="inherit" />
</Text>
<Text as="p" tone="magic" variant="bodyMd" alignment="center">
Magic tone
<Icon source={icons.CirclePlusMinor} tone="inherit" />
<Icon source={icons.PlusCircleIcon} tone="inherit" />
</Text>
<Text as="p" tone="magic-subdued" variant="bodyMd" alignment="center">
Magic subdued tone
<Icon source={icons.CirclePlusMinor} tone="inherit" />
<Icon source={icons.PlusCircleIcon} tone="inherit" />
</Text>
<Text as="p" tone="subdued" variant="bodyMd" alignment="center">
Subdued tone
<Icon source={icons.CirclePlusMinor} tone="inherit" />
<Icon source={icons.PlusCircleIcon} tone="inherit" />
</Text>
<Text as="p" tone="success" variant="bodyMd" alignment="center">
Success tone
<Icon source={icons.CirclePlusMinor} tone="inherit" />
<Icon source={icons.PlusCircleIcon} tone="inherit" />
</Text>
<Text as="p" tone="text-inverse" variant="bodyMd" alignment="center">
Text inverse tone
<Icon source={icons.CirclePlusMinor} tone="inherit" />
<Icon source={icons.PlusCircleIcon} tone="inherit" />
</Text>
</BlockStack>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@ import {
IndexFiltersMode,
ButtonGroup,
} from '@shopify/polaris';
import {
ViewIcon,
DeleteIcon,
MobileVerticalDotsIcon,
} from '@shopify/polaris-icons';

import type {IndexFiltersProps} from './IndexFilters';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import type {ComponentMeta} from '@storybook/react';
import {Box, Badge, Icon, InlineStack, Thumbnail} from '@shopify/polaris';
import {CapitalIcon, ImageIcon} from '@shopify/polaris-icons';
import {FlowerIcon, ImageIcon} from '@shopify/polaris-icons';

export default {
component: InlineStack,
Expand All @@ -14,7 +14,7 @@ export function Default() {
<Badge>Two</Badge>
<Badge>Three</Badge>
<Box>
<Icon source={CapitalIcon} tone="primary" />
<Icon source={FlowerIcon} tone="primary" />
</Box>
</InlineStack>
);
Expand Down
16 changes: 8 additions & 8 deletions polaris-react/src/components/Navigation/Navigation.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
PlusCircleIcon,
PersonIcon,
HomeIcon,
LogOutIcon,
ExitIcon,
TargetIcon,
StoreOnlineIcon,
OrderIcon,
Expand All @@ -15,10 +15,10 @@ import {
ViewIcon,
StarFilledIcon,
StarIcon,
OrdersFilledIcon,
OrderFilledIcon,
HomeFilledIcon,
ProductsFilledIcon,
MarketingFilledIcon,
ProductFilledIcon,
TargetFilledIcon,
} from '@shopify/polaris-icons';

export default {
Expand Down Expand Up @@ -102,7 +102,7 @@ export function WithMultipleSecondaryNavigations() {
{
url: '#',
label: 'Orders',
icon: OrdersFilledIcon,
icon: OrderFilledIcon,
matchedItemIcon: OrderIcon,
badge: '15',
onClick: () => setSelected('orders'),
Expand All @@ -127,7 +127,7 @@ export function WithMultipleSecondaryNavigations() {
{
url: '#',
label: 'Products',
icon: ProductsFilledIcon,
icon: ProductFilledIcon,
matchedItemIcon: ProductIcon,
onClick: () => setSelected('products'),
matches: selected === 'products',
Expand Down Expand Up @@ -177,7 +177,7 @@ export function WithMultipleSecondaryNavigations() {
{
url: '#',
label: 'Marketing',
icon: MarketingFilledIcon,
icon: TargetFilledIcon,
matchedItemIcon: TargetIcon,
onClick: () => setSelected('marketing'),
matches: selected === 'marketing',
Expand Down Expand Up @@ -644,7 +644,7 @@ export function WithMultipleSecondaryActionsForAnItem() {
url: '#',
excludePaths: ['#'],
label: 'Logout',
icon: LogOutIcon,
icon: ExitIcon,
onClick: () => setSelected('logout'),
matches: selected === 'logout',
},
Expand Down
4 changes: 2 additions & 2 deletions polaris-react/src/components/Page/Page.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
ArrowDownIcon,
ExternalIcon,
ViewIcon,
MobileVerticalDotsIcon,
MenuVerticalIcon,
} from '@shopify/polaris-icons';
import {
Badge,
Expand Down Expand Up @@ -47,7 +47,7 @@ export function Default() {
actionGroups={[
{
title: 'Promote',
icon: MobileVerticalDotsIcon,
icon: MenuVerticalIcon,
actions: [
{
content: 'Share on Facebook',
Expand Down
2 changes: 1 addition & 1 deletion polaris.shopify.com/content/design/colors/using-color.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: Color highlights important areas, communicates status, urgency, and
keywords:
- using color
- color use
icon: PaintBrushIcon
icon: PaintBrushFlatIcon
---

# Color &rarr; {frontmatter.title}
Expand Down
2 changes: 1 addition & 1 deletion polaris.shopify.com/content/design/icons/using-icons.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Using icons
description: Icons enhance an experience by providing intuitive and efficient navigation, conveying information concisely, and making it more visually appealing.
icon: PaintBrushIcon
icon: PaintBrushFlatIcon
keywords:
- shopify icons
- icon sets
Expand Down
2 changes: 1 addition & 1 deletion polaris.shopify.com/content/design/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Design
description: Design principles serve as guiding notions that shape the design of the Shopify admin, with Polaris providing support in implementing these principles effectively.
order: 3
status: New
icon: PaintBrushIcon
icon: PaintBrushFlatIcon
---

# {frontmatter.title}
Expand Down
2 changes: 1 addition & 1 deletion polaris.shopify.com/content/design/pro-design-language.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Pro design language
description: Efficiency, intuition, and style combined to empower merchants with data-rich views, action-driven interfaces, and dynamic interactions.
order: 1
icon: PaintBrushIcon
icon: PaintBrushFlatIcon
status: New
---

Expand Down
Loading