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
30 changes: 30 additions & 0 deletions polaris.shopify.com/content/components/caption.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
title: Caption
description: Caption text size is smaller than the recommended size for general reading. On web, it should be used only in a graph or as a timestamp for a list item. On Android and iOS, it can also be used as help text or as other kinds of secondary text for list items.
category: Titles and text
keywords:
- labels
- text
- microcopy
- typographic
- graph
- timestamp
- smaller text
- smallest text
- smaller than reading size text
- time text
- compact text
- small text
status:
value: Deprecated
message: This component is no longer supported. Please use the Text component instead.
---

## Mapping to the Text component

```diff
- <Caption>Received April 21, 2017</Caption>
+ <Text variant="bodySm" as="p">Received April 21, 2017</Text>
```

---
61 changes: 61 additions & 0 deletions polaris.shopify.com/content/components/display-text.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
title: Display text
description: Display styles make a bold visual statement. Use them to create impact when the main goal is visual storytelling. For example, use display text to convince or reassure merchants such as in marketing content or to capture attention during onboarding.
category: Titles and text
keywords:
- DisplayText
- announcement text
- greeting text
- marketing text
- title text
- biggest text
- bigger text
- big text
- large text
- larger text
- largest text
- strong text
- bold text
- bold statements
- extra large display text
- medium and large display text
- small display text
- visual story telling
- visual storytelling
- visual statements
status:
value: Deprecated
message: This component is no longer supported. Please use the Text component instead.
---

## Mapping to the Text component

### Small

```diff
- <DisplayText size="small">Sales this year</DisplayText>
+ <Text variant="headingLg" as="p">Sales this year</Text>
```

### Medium

```diff
- <DisplayText size="medium">Sales this year</DisplayText>
+ <Text variant="headingXl" as="p">Sales this year</Text>
```

### Large

```diff
- <DisplayText size="large">Sales this year</DisplayText>
+ <Text variant="heading2xl" as="p">Sales this year</Text>
```

### Extra large

```diff
- <DisplayText size="extraLarge">Sales this year</DisplayText>
+ <Text variant="heading4xl" as="p">Sales this year</Text>
```

---
29 changes: 29 additions & 0 deletions polaris.shopify.com/content/components/heading.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
title: Heading
description: Headings are used as the titles of each major section of a page in the interface. For example, [card components](https://polaris.shopify.com/components/card) generally use headings as their title.
category: Titles and text
keywords:
- titles
- text
- microcopy
- conversational
- typographic
- card headings
- card titles
- section titles
- section headings
- heading text
- heading font
status:
value: Deprecated
message: This component is no longer supported. Please use the Text component instead.
---

## Mapping to the Text component

```diff
- <Heading>Online store dashboard</Heading>
+ <Text variant="headingMd" as="h2">Online store dashboard</Text>
```

---
25 changes: 25 additions & 0 deletions polaris.shopify.com/content/components/subheading.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
title: Subheading
description: Subheadings are used for the title of any sub-sections in top-level page sections.
category: Titles and text
keywords:
- title bar
- top-level
- description
- sub-section titles
- titles of sub-sections
- subsection titles
- titles of subsections
status:
value: Deprecated
message: This component is no longer supported. Please use the Text component instead.
---

## Mapping to the Text component

```diff
- <Subheading>Accounts</Subheading>
+ <Text variant="headingXs" as="h3">Accounts</Text>
```

---
71 changes: 71 additions & 0 deletions polaris.shopify.com/content/components/text-style.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
---
title: Text style
description: Text style enhances text with additional visual meaning. For example, using subdued text to de-emphasize it from its surrounding text.
category: Titles and text
keywords:
- TextStyle
- typographic
- subdued
- strong
- negative
- warning
- positive
- cues
- enhancements
- type
- bold
- dollar
- increase
- decrease
- input
- fields
status:
value: Deprecated
message: This component is no longer supported. Please use the Text component instead.
---

## Mapping to the Text component

### Subdued

```diff
- <TextStyle variation="subdued">No supplier listed</TextStyle>
+ <Text variant="bodyMd" as="span" color="subdued">No supplier listed</Text>
```

### Strong

```diff
- <TextStyle variation="strong">No supplier listed</TextStyle>
+ <Text variant="bodyMd" as="span" fontWeight="semibold">No supplier listed</Text>
```

### Positive

```diff
- <TextStyle variation="positive">No supplier listed</TextStyle>
+ <Text variant="bodyMd" as="span" color="success">No supplier listed</Text>
```

### Negative

```diff
- <TextStyle variation="negative">No supplier listed</TextStyle>
+ <Text variant="bodyMd" as="span" color="critical">No supplier listed</Text>
```

### Warning

```diff
- <TextStyle variation="warning">No supplier listed</TextStyle>
+ <Text variant="bodyMd" as="span" color="warning">No supplier listed</Text>
```

### Code

```diff
- <TextStyle variation="code">No supplier listed</TextStyle>
+ <Text variant="bodyMd" as="span"><InlineCode>No supplier listed</InlineCode></Text>
```

---
34 changes: 34 additions & 0 deletions polaris.shopify.com/content/components/visually-hidden.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
title: Visually hidden
description: Use when an element needs to be available to assistive technology (for example, a screen reader) but otherwise hidden.
category: Titles and text
keywords:
- VisuallyHidden
- screen readers
- hidden but available for screen readers
- visually hidden headings
- hide
- hidden headings
- hidden text
- visually hidden table headers
- visually hidden headers
- hidden table headers
- hidden table headings
- accessibility
- a11y
- assistive technology
status:
value: Deprecated
message: This component is no longer supported. Please use the Text component instead.
---

## Mapping to the Text component

```diff
- <VisuallyHidden>
- <Heading>Title and description</Heading>
- </VisuallyHidden>
+ <Text visuallyHidden variant="headingMd" as="h2">Title and description</Text>
```

---
1 change: 1 addition & 0 deletions polaris.shopify.com/pages/components/[component].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ export const getStaticProps: GetStaticProps<
allType,
propName,
`polaris-react/src/components/${componentDirName}/${componentDirName}.tsx`,
data.frontMatter.status?.value || '',
);

const props: Props = {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions polaris.shopify.com/scripts/get-props/src/get-props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,12 @@ export function getRelevantTypes(
ast: AllTypes,
name: string,
filePath: string,
status: string,
): FilteredTypes {
if (status === 'Deprecated') {
return {};
}

let matchingNode = ast[name][filePath];

if (!matchingNode) {
Expand Down