Skip to content

Commit 64b94cc

Browse files
authored
Merge pull request #3962 from Shopify/2024-07-default-example-descriptions
[Components content]: Default example descriptions for 2024-07
2 parents 2131dbb + 54fe55d commit 64b94cc

36 files changed

Lines changed: 72 additions & 0 deletions

File tree

packages/ui-extensions/src/surfaces/admin/components/AdminAction/AdminAction.doc.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ const data: ReferenceEntityTemplateSchema = {
2121
subCategory: 'Settings and templates',
2222
defaultExample: {
2323
image: 'adminaction-default.png',
24+
description:
25+
'Sync product data to a warehouse system from a modal with primary and cancel actions. This example uses `AdminAction` with `primaryAction` and `secondaryAction` [Button](/docs/api/admin-extensions/{API_VERSION}/components/actions/button) props to confirm or dismiss the sync.',
2426
codeblock: {
2527
title: 'Configure action modal with buttons',
2628
tabs: [

packages/ui-extensions/src/surfaces/admin/components/AdminBlock/AdminBlock.doc.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ const data: ReferenceEntityTemplateSchema = {
2121
subCategory: 'Settings and templates',
2222
defaultExample: {
2323
image: 'adminblock-default.png',
24+
description:
25+
"Show a warehouse connection status, sync timestamp, and inventory count in a product details block. This example renders an `AdminBlock` titled 'Warehouse integration' with a `success` tone [Badge](/docs/api/admin-extensions/{API_VERSION}/components/feedback-and-status-indicators/badge) and status lines inside a [BlockStack](/docs/api/admin-extensions/{API_VERSION}/components/layout-and-structure/blockstack).",
2426
codeblock: {
2527
title: 'Display warehouse status block',
2628
tabs: [

packages/ui-extensions/src/surfaces/admin/components/AdminPrintAction/AdminPrintAction.doc.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ const data: ReferenceEntityTemplateSchema = {
2121
subCategory: 'Settings and templates',
2222
defaultExample: {
2323
image: 'adminprintaction-default.png',
24+
description:
25+
'Generate a printable document from a product details page. This example configures an `AdminPrintAction` with a `src` prop that builds a packing slip URL from the selected product ID, and shows a status message while the document loads.',
2426
codeblock: {
2527
title: 'Generate product packing slip',
2628
tabs: [

packages/ui-extensions/src/surfaces/admin/components/Badge/Badge.doc.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ const data: ReferenceEntityTemplateSchema = {
1919
subCategory: 'Feedback and status indicators',
2020
defaultExample: {
2121
image: 'badge-default.png',
22+
description:
23+
'Indicate fulfilled, partially fulfilled, and unfulfilled order states with color-coded labels. This example renders three `Badge` components using `success`, `warning`, and `critical` tones to visually distinguish each state.',
2224
codeblock: {
2325
title: 'Display order fulfillment status',
2426
tabs: [

packages/ui-extensions/src/surfaces/admin/components/Banner/Banner.doc.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ const data: ReferenceEntityTemplateSchema = {
2020
subCategory: 'Feedback and status indicators',
2121
defaultExample: {
2222
image: 'banner-default.png',
23+
description:
24+
'Show a product sync failure with a retry action. This example renders a dismissible `Banner` with a `critical` tone, a primary action [Button](/docs/api/admin-extensions/{API_VERSION}/components/actions/button) that retries the sync, and a message explaining the issue.',
2325
codeblock: {
2426
title: 'Warn about API sync failure',
2527
tabs: [

packages/ui-extensions/src/surfaces/admin/components/BlockStack/BlockStack.doc.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ const data: ReferenceEntityTemplateSchema = {
2121
subCategory: 'Layout and structure',
2222
defaultExample: {
2323
image: 'blockstack-default.png',
24+
description:
25+
'Stack a sync status label, two detail lines, and an action button in a vertical column with consistent spacing. This example uses `BlockStack` with the `gap` prop to control the vertical rhythm, and includes a secondary [Button](/docs/api/admin-extensions/{API_VERSION}/components/actions/button) for viewing the sync log.',
2426
codeblock: {
2527
title: 'Stack extension content vertically',
2628
tabs: [

packages/ui-extensions/src/surfaces/admin/components/Box/Box.doc.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ const data: ReferenceEntityTemplateSchema = {
1919
subCategory: 'Layout and structure',
2020
defaultExample: {
2121
image: 'box-default.png',
22+
description:
23+
'Add padding around a warehouse slot name, aisle reference, and unit count. This example uses `Box` with `padding` inside a [BlockStack](/docs/api/admin-extensions/{API_VERSION}/components/layout-and-structure/blockstack) to inset the slot details from the heading above.',
2224
codeblock: {
2325
title: 'Create a padded content container',
2426
tabs: [

packages/ui-extensions/src/surfaces/admin/components/Button/Button.doc.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ const data: ReferenceEntityTemplateSchema = {
2020
subCategory: 'Actions',
2121
defaultExample: {
2222
image: 'button-default.png',
23+
description:
24+
'Sync product data to a warehouse and close the action modal, or cancel. This example renders a `primary` `Button` that posts to a backend API and calls `close()`, alongside a `secondary` cancel button.',
2325
codeblock: {
2426
title: 'Sync product to backend',
2527
tabs: [

packages/ui-extensions/src/surfaces/admin/components/Checkbox/Checkbox.doc.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ const data: ReferenceEntityTemplateSchema = {
2020
subCategory: 'Forms',
2121
defaultExample: {
2222
image: 'checkbox-default.png',
23+
description:
24+
'Toggle automatic inventory sync on or off. This example uses `Checkbox` with a `checked` state, and a [Button](/docs/api/admin-extensions/{API_VERSION}/components/actions/button) that saves the setting and closes the modal.',
2325
codeblock: {
2426
title: 'Toggle feature settings',
2527
tabs: [

packages/ui-extensions/src/surfaces/admin/components/ChoiceList/ChoiceList.doc.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ const data: ReferenceEntityTemplateSchema = {
2020
subCategory: 'Forms',
2121
defaultExample: {
2222
image: 'choicelist-default.png',
23+
description:
24+
'Pick a shipping speed from standard, express, and overnight radio options. This example renders a `ChoiceList` with three tiers as radio buttons, and a [Button](/docs/api/admin-extensions/{API_VERSION}/components/actions/button) that saves the selected method.',
2325
codeblock: {
2426
title: 'Choose a shipping method',
2527
tabs: [

0 commit comments

Comments
 (0)