Skip to content

Commit a9553b3

Browse files
Polish example descriptions for style guide compliance
- AdminAction/AdminBlock: lead with business value, not setup instructions - Banner: remove "dynamic" (banned marketing word) - DateField: remove reference to unsupported `required` prop - EmailField/TextField: replace "in real time" with "on each keystroke" - Link: replace "dynamically" with "building" - MoneyField: replace "real-time" with "inline" - NumberField: replace "dynamic" with "inline" - Pressable: update description to match code (removed accessibilityRole) - ProgressIndicator: lead with business value, not "Use the" - Section: lead with outcome, not "Add an" instruction - Text: lead with purpose, not "Apply" instruction - TextField: lead with outcome, not "Use the" instruction Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 1b9664e commit a9553b3

13 files changed

Lines changed: 14 additions & 14 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const data: ReferenceEntityTemplateSchema = {
2121
defaultExample: {
2222
image: 'adminaction-default.png',
2323
description:
24-
'Set up an action modal with a `title`, `primaryAction` for syncing, and `secondaryAction` for cancellation. This example creates a complete modal with a sync confirmation message, a primary [Button](/docs/api/admin-extensions/{API_VERSION}/components/actions/button) that posts to your backend, and a cancel button that closes the modal.',
24+
'Confirm a product sync with your warehouse before posting to your backend. This example configures the modal `title`, a `primaryAction` [Button](/docs/api/admin-extensions/{API_VERSION}/components/actions/button) that triggers the sync, and a `secondaryAction` cancel button that closes the modal.',
2525
codeblock: {
2626
title: 'Configure action modal with buttons',
2727
tabs: [

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const data: ReferenceEntityTemplateSchema = {
2121
defaultExample: {
2222
image: 'adminblock-default.png',
2323
description:
24-
'Set up a block extension with a `title` and status content using [Badge](/docs/api/admin-extensions/{API_VERSION}/components/feedback-and-status-indicators/badge) indicators. This example displays warehouse connection status and inventory details inside a titled block on the product detail page.',
24+
'Display warehouse connection status and inventory levels on the product detail page. This example renders [Badge](/docs/api/admin-extensions/{API_VERSION}/components/feedback-and-status-indicators/badge) indicators inside a titled block to show stock and sync information at a glance.',
2525
codeblock: {
2626
title: 'Display warehouse status block',
2727
tabs: [

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const data: ReferenceEntityTemplateSchema = {
4343
examples: [
4444
{
4545
description:
46-
'Show a `success` banner after completing a product update to give merchants immediate visual confirmation. This example renders a dismissible banner with a dynamic message that includes the product ID, so merchants know exactly which resource was updated.',
46+
'Show a `success` banner after completing a product update to give merchants immediate visual confirmation. This example renders a dismissible banner with a message that includes the product ID, so merchants know exactly which resource was updated.',
4747
codeblock: {
4848
title: 'Confirm successful product update',
4949
tabs: [

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const data: ReferenceEntityTemplateSchema = {
4343
examples: [
4444
{
4545
description:
46-
"Validate that a selected date is in the future using the `error` prop and `required` attribute. This example checks the expiration date against today's date on each change and displays an inline error for past dates, ensuring merchants only set valid expiry windows.",
46+
"Validate that a selected date is in the future using the `error` prop. This example checks the expiration date against today's date on each change and displays an inline error for past dates, ensuring merchants only set valid expiry windows.",
4747
codeblock: {
4848
title: 'Validate future date selection',
4949
tabs: [

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const data: ReferenceEntityTemplateSchema = {
4343
examples: [
4444
{
4545
description:
46-
'Validate email format in real time using the `error` prop and `required` attribute. This example checks for the presence of an `@` symbol on each keystroke and displays an inline error message, preventing merchants from saving invalid email addresses.',
46+
'Validate email format on each keystroke using the `error` prop and `required` attribute. This example checks for the presence of an `@` symbol as the merchant types and displays an inline error message, preventing invalid email addresses from being saved.',
4747
codeblock: {
4848
title: 'Validate email format inline',
4949
tabs: [

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const data: ReferenceEntityTemplateSchema = {
4343
examples: [
4444
{
4545
description:
46-
"Open external URLs in new tabs using `target` set to `_blank`. This example links to the product's storefront page and Shopify documentation, constructing the storefront URL dynamically from the product ID in `data.selected`.",
46+
"Open external URLs in new tabs using `target` set to `_blank`. This example links to the product's storefront page and Shopify documentation, building the storefront URL from the product ID in `data.selected`.",
4747
codeblock: {
4848
title: 'Open external links in new tabs',
4949
tabs: [

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ const data: ReferenceEntityTemplateSchema = {
6262
},
6363
{
6464
description:
65-
'Enforce minimum price constraints using `min` and the `error` prop for real-time validation. This example prevents merchants from setting a wholesale price at zero or below, displaying an inline error until a valid amount is entered.',
65+
"Enforce minimum price constraints using `min` and the `error` prop for inline validation. This example prevents merchants from setting a wholesale price at zero or below, displaying an error until they've entered a valid amount.",
6666
codeblock: {
6767
title: 'Validate minimum price amount',
6868
tabs: [

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ const data: ReferenceEntityTemplateSchema = {
6262
},
6363
{
6464
description:
65-
'Enforce warehouse-specific limits using `min`, `max`, and `step` constraints with dynamic `error` feedback. This example validates slot numbers against a maximum capacity and shows an inline error when the value exceeds the allowed range.',
65+
'Enforce warehouse-specific limits using `min`, `max`, and `step` constraints with inline `error` feedback. This example validates slot numbers against a maximum capacity and shows an error when the value exceeds the allowed range.',
6666
codeblock: {
6767
title: 'Enforce numeric constraints with errors',
6868
tabs: [

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ const data: ReferenceEntityTemplateSchema = {
6262
},
6363
{
6464
description:
65-
'Set `accessibilityRole` and `accessibilityLabel` to provide screen readers with meaningful context for custom interactive regions. This example renders tappable warehouse location rows with [Badge](/docs/api/admin-extensions/{API_VERSION}/components/feedback-and-status-indicators/badge) indicators, where each row announces its full context to assistive technology.',
65+
'Provide screen readers with meaningful context for custom interactive regions using `accessibilityLabel`. This example renders tappable warehouse location rows with [Badge](/docs/api/admin-extensions/{API_VERSION}/components/feedback-and-status-indicators/badge) indicators, where each row announces its full context to assistive technology.',
6666
codeblock: {
6767
title: 'Add accessible interactive regions',
6868
tabs: [

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const data: ReferenceEntityTemplateSchema = {
4343
examples: [
4444
{
4545
description:
46-
'Use the `base` size for a prominent loading indicator during a long-running sync operation in an [action modal](/docs/api/admin-extensions/{API_VERSION}/components/other/adminaction). This example pairs the indicator with a status message and a cancel [Button](/docs/api/admin-extensions/{API_VERSION}/components/actions/button), keeping merchants informed and in control.',
46+
'Show a prominent loading indicator during a long-running sync operation in an [action modal](/docs/api/admin-extensions/{API_VERSION}/components/other/adminaction). This example pairs a `base`-sized indicator with a status message and a cancel [Button](/docs/api/admin-extensions/{API_VERSION}/components/actions/button), keeping merchants informed and in control.',
4747
codeblock: {
4848
title: 'Display sync progress in action modal',
4949
tabs: [

0 commit comments

Comments
 (0)