Skip to content

Commit efe4ccb

Browse files
committed
Improved descriptions for targets, APIs, and components
1 parent c64124a commit efe4ccb

File tree

121 files changed

+1293
-1090
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+1293
-1090
lines changed

packages/ui-extensions/docs/surfaces/point-of-sale/reference/apis/action-api.doc.ts

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,15 @@ const generateJsxCodeBlockForActionApi = (title: string, fileName: string) =>
77

88
const data: ReferenceEntityTemplateSchema = {
99
name: 'Action API',
10-
description: `
11-
The Action API allows an action extension to modally present its corresponding modal target.
12-
13-
#### Supporting targets
14-
- ${TargetLink.PosHomeTileRender}
15-
- ${TargetLink.PosPurchasePostActionMenuItemRender}
16-
- ${TargetLink.PosPurchasePostBlockRender}
17-
- ${TargetLink.PosOrderDetailsActionMenuItemRender}
18-
- ${TargetLink.PosOrderDetailsBlockRender}
19-
- ${TargetLink.PosProductDetailsActionMenuItemRender}
20-
- ${TargetLink.PosProductDetailsBlockRender}
21-
- ${TargetLink.PosCustomerDetailsActionMenuItemRender}
22-
- ${TargetLink.PosCustomerDetailsBlockRender}
23-
- ${TargetLink.PosDraftOrderDetailsActionMenuItemRender}
24-
- ${TargetLink.PosDraftOrderDetailsBlockRender}
25-
`,
10+
description:
11+
'The Action API provides modal presentation functionality for POS UI extensions, allowing you to launch full-screen modal interfaces from menu items, tiles, and block targets. The API enables navigation between different targets within your extension.',
2612
isVisualComponent: false,
2713
type: 'APIs',
2814
definitions: [
2915
{
3016
title: 'ActionApi',
31-
description: '',
17+
description:
18+
'The `ActionApi` object provides methods for presenting modal interfaces. Access these methods through `shopify.action` to launch full-screen modal experiences.',
3219
type: 'ActionApiContent',
3320
},
3421
],

packages/ui-extensions/docs/surfaces/point-of-sale/reference/apis/cart-api.doc.ts

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,15 @@ const generateJsxCodeBlockForCartApi = (title: string, fileName: string) =>
77

88
const data: ReferenceEntityTemplateSchema = {
99
name: 'Cart API',
10-
description: `
11-
The Cart API enables UI Extensions to manage and interact with POS cart contents, such as discounts, line items, and customer details. It provides a comprehensive set of functions for adding and removing items, alongside a subscribable object that keeps the UI Extension updated with real-time changes to the cart.
12-
13-
#### Supporting targets
14-
- ${TargetLink.PosHomeTileRender}
15-
- ${TargetLink.PosHomeModalRender}
16-
- ${TargetLink.PosProductDetailsActionMenuItemRender}
17-
- ${TargetLink.PosProductDetailsActionRender}
18-
- ${TargetLink.PosProductDetailsBlockRender}
19-
- ${TargetLink.PosCustomerDetailsActionMenuItemRender}
20-
- ${TargetLink.PosCustomerDetailsActionRender}
21-
- ${TargetLink.PosCustomerDetailsBlockRender}
22-
- ${TargetLink.PosOrderDetailsActionMenuItemRender}
23-
- ${TargetLink.PosOrderDetailsActionRender}
24-
- ${TargetLink.PosOrderDetailsBlockRender}
25-
- ${TargetLink.PosDraftOrderDetailsActionMenuItemRender}
26-
- ${TargetLink.PosDraftOrderDetailsActionRender}
27-
- ${TargetLink.PosDraftOrderDetailsBlockRender}
28-
`,
10+
description:
11+
'The Cart API provides comprehensive access to POS cart management functionality, enabling extensions to read cart state, modify line items, apply discounts, manage customer information, and handle cart properties. The API supports both individual and bulk operations for efficient cart manipulation, with [selling plan functionality](/docs/apps/build/purchase-options/subscriptions/selling-plans) and error handling.',
2912
isVisualComponent: false,
3013
type: 'APIs',
3114
definitions: [
3215
{
3316
title: 'CartApi',
34-
description: '',
17+
description:
18+
'The `CartApi` object provides access to cart management functionality and real-time cart state monitoring. Access these properties through `shopify.cart` to interact with the current POS cart.',
3519
type: 'CartApiContent',
3620
},
3721
],

packages/ui-extensions/docs/surfaces/point-of-sale/reference/apis/cart-line-item-api.doc.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,15 @@ const generateJsxCodeBlockForCartLineItemApi = (
99

1010
const data: ReferenceEntityTemplateSchema = {
1111
name: 'Cart Line Item API',
12-
description: `
13-
The Cart Line Item API provides an extension with data about the current Cart Line Item.
14-
15-
#### Supporting targets
16-
- ${TargetLink.PosCartLineItemDetailsActionMenuItemRender}
17-
- ${TargetLink.PosCartLineItemDetailsActionRender}
18-
`,
12+
description:
13+
'The Cart Line Item API provides read-only access to a specific line item in the cart. Use this API to get line item details like product information, pricing, discounts, and custom properties. This allows you to build features that respond to the specific item a customer is viewing or interacting with.',
1914
isVisualComponent: false,
2015
type: 'APIs',
2116
definitions: [
2217
{
2318
title: 'CartLineItemApi',
24-
description: '',
19+
description:
20+
'The `CartLineItemApi` object provides access to the current line item. Access this property through `api.cartLineItem` to interact with the current line item context.',
2521
type: 'CartLineItemApi',
2622
},
2723
],

packages/ui-extensions/docs/surfaces/point-of-sale/reference/apis/connectivity-api.doc.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,14 @@ const generateJsxCodeBlockForConnectivityApi = (
99
const data: ReferenceEntityTemplateSchema = {
1010
name: 'Connectivity API',
1111
description:
12-
'The Connectivity API enables POS UI extensions to retrieve device connectivity information, such as whether the device has an internet connection.',
12+
'The Connectivity API provides access to device connectivity information, allowing you to monitor Internet connection status and respond to connectivity changes in real-time. The API enables both immediate connectivity checks and dynamic updates when network conditions change.',
1313
isVisualComponent: false,
1414
type: 'APIs',
1515
definitions: [
1616
{
1717
title: 'ConnectivityApi',
18-
description: '',
18+
description:
19+
'The `ConnectivityApi` object provides access to current connectivity information and change notifications. Access these properties through `shopify.connectivity` to monitor network status.',
1920
type: 'ConnectivityApiContent',
2021
},
2122
],

packages/ui-extensions/docs/surfaces/point-of-sale/reference/apis/customer-api.doc.ts

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,15 @@ const generateJsxCodeBlockForCustomerApi = (title: string, fileName: string) =>
77

88
const data: ReferenceEntityTemplateSchema = {
99
name: 'Customer API',
10-
description: `
11-
The customer API provides an extension with data about the current customer.
12-
13-
#### Supporting targets
14-
- ${TargetLink.PosCustomerDetailsActionMenuItemRender}
15-
- ${TargetLink.PosCustomerDetailsActionRender}
16-
- ${TargetLink.PosCustomerDetailsBlockRender}
17-
`,
10+
description:
11+
'The Customer API provides read-only access to customer data. Use this API to get customer information and build personalized experiences based on the selected customer context. The API offers the customer identifier for linking to customer data and enabling customer-specific features.',
1812
isVisualComponent: false,
1913
type: 'APIs',
2014
definitions: [
2115
{
2216
title: 'CustomerApi',
23-
description: '',
17+
description:
18+
'The `CustomerApi` object provides access to customer data. Access this property through `shopify.customer` to interact with the current customer context.',
2419
type: 'CustomerApiContent',
2520
},
2621
],

packages/ui-extensions/docs/surfaces/point-of-sale/reference/apis/device-api.doc.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,14 @@ const generateJsxCodeBlockForDeviceApi = (title: string, fileName: string) =>
77
const data: ReferenceEntityTemplateSchema = {
88
name: 'Device API',
99
description:
10-
'The Device API allows the UI Extension to retrieve device information including the device name and ID.',
10+
'The Device API provides access to device information and capabilities, allowing you to retrieve device details, check device types, and adapt your extension behavior based on the POS hardware characteristics. The API enables device-aware functionality and responsive design based on device form factors.',
1111
isVisualComponent: false,
1212
type: 'APIs',
1313
definitions: [
1414
{
1515
title: 'DeviceApi',
16-
description: '',
16+
description:
17+
'The `DeviceApi` object provides access to device information and capabilities. Access these properties and methods through `shopify.device` to retrieve device details and check device characteristics.',
1718
type: 'DeviceApiContent',
1819
},
1920
],

packages/ui-extensions/docs/surfaces/point-of-sale/reference/apis/draft-order-api.doc.ts

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,15 @@ const generateJsxCodeBlockForDraftOrderApi = (
99

1010
const data: ReferenceEntityTemplateSchema = {
1111
name: 'Draft Order API',
12-
description: `
13-
The Draft Order API provides an extension with data about the current draft order.
14-
15-
16-
#### Supporting targets
17-
- ${TargetLink.PosDraftOrderDetailsActionMenuItemRender}
18-
- ${TargetLink.PosDraftOrderDetailsActionRender}
19-
- ${TargetLink.PosDraftOrderDetailsBlockRender}
20-
`,
12+
description:
13+
'The Draft Order API provides read-only access to draft order data. Use this API to get draft order information and build contextual experiences based on the selected draft order context. The API offers draft order details for implementing order-specific functionality and workflows.',
2114
isVisualComponent: false,
2215
type: 'APIs',
2316
definitions: [
2417
{
2518
title: 'DraftOrderApi',
26-
description: '',
19+
description:
20+
'The `DraftOrderApi` object provides access to draft order data. Access this property through `api.draftOrder` to interact with the current draft order context.',
2721
type: 'DraftOrderApiContent',
2822
},
2923
],

packages/ui-extensions/docs/surfaces/point-of-sale/reference/apis/locale-api.doc.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,14 @@ const generateJsxCodeBlockForLocaleApi = (title: string, fileName: string) =>
77
const data: ReferenceEntityTemplateSchema = {
88
name: 'Locale API',
99
description:
10-
"The Locale API allows the extension to retrieve the merchant's locale.",
10+
"The Locale API provides access to the merchant's current locale information in [IETF format](https://en.wikipedia.org/wiki/IETF_language_tag), allowing you to internationalize your extension content and respond to locale changes in real time. The API enables both immediate locale access and dynamic updates when merchants change their language settings.",
1111
isVisualComponent: false,
1212
type: 'APIs',
1313
definitions: [
1414
{
1515
title: 'LocaleApi',
16-
description: '',
16+
description:
17+
'The `LocaleApi` object provides access to current locale information and change notifications. Access these properties through `shopify.locale` to retrieve and monitor locale data.',
1718
type: 'LocaleApiContent',
1819
},
1920
],

packages/ui-extensions/docs/surfaces/point-of-sale/reference/apis/navigation-api.doc.ts

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,28 +9,21 @@ const generateJsxCodeBlockForNavigationApi = (
99

1010
const data: ReferenceEntityTemplateSchema = {
1111
name: 'Navigation API',
12-
description: `
13-
The Navigation API enables POS UI extension to navigate between screens.
14-
15-
#### Supporting targets
16-
- ${TargetLink.PosHomeModalRender}
17-
- ${TargetLink.PosPurchasePostActionRender}
18-
- ${TargetLink.PosProductDetailsActionRender}
19-
- ${TargetLink.PosOrderDetailsActionRender}
20-
- ${TargetLink.PosDraftOrderDetailsActionRender}
21-
- ${TargetLink.PosCustomerDetailsActionRender}
22-
`,
12+
description:
13+
'The Navigation API provides web-standard navigation functionality for POS UI extensions, allowing you to navigate between URLs, manage navigation history, and handle navigation events within modal interfaces. The API is available globally as the `navigation` object and follows web platform standards.',
2314
isVisualComponent: false,
2415
type: 'APIs',
2516
definitions: [
2617
{
2718
title: 'NavigationApi',
28-
description: '',
19+
description:
20+
'The global `navigation` object provides web-standard navigation functionality. Access these properties and methods directly through the global `navigation` object to manage navigation within modal interfaces.',
2921
type: 'Navigation',
3022
},
3123
{
3224
title: 'Window',
33-
description: '',
25+
description:
26+
'The global `window` object provides control over the extension screen lifecycle. Access these properties and methods directly through the global `window` object to manage the modal interface.',
3427
type: 'Window',
3528
},
3629
],

packages/ui-extensions/docs/surfaces/point-of-sale/reference/apis/order-api.doc.ts

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,15 @@ const generateJsxCodeBlockForOrderApi = (title: string, fileName: string) =>
77

88
const data: ReferenceEntityTemplateSchema = {
99
name: 'Order API',
10-
description: `
11-
The Order API provides an extension with data about the current order.
12-
13-
#### Supporting targets
14-
- ${TargetLink.PosPurchasePostActionMenuItemRender}
15-
- ${TargetLink.PosPurchasePostActionRender}
16-
- ${TargetLink.PosPurchasePostBlockRender}
17-
- ${TargetLink.PosOrderDetailsActionMenuItemRender}
18-
- ${TargetLink.PosOrderDetailsActionRender}
19-
- ${TargetLink.PosOrderDetailsBlockRender}
20-
`,
10+
description:
11+
'The Order API provides read-only access to order data. Use this API to get order information and build contextual experiences based on the selected order context. The API offers order details for implementing order-specific functionality and workflows.',
2112
isVisualComponent: false,
2213
type: 'APIs',
2314
definitions: [
2415
{
2516
title: 'OrderApi',
26-
description: '',
17+
description:
18+
'The `OrderApi` object provides access to order data. Access this property through `shopify.order` to interact with the current order context.',
2719
type: 'OrderApiContent',
2820
},
2921
],

0 commit comments

Comments
 (0)