Skip to content

Commit 9870327

Browse files
Update titles and descriptions for code examples
1 parent 341d721 commit 9870327

5 files changed

Lines changed: 66 additions & 56 deletions

File tree

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

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,10 @@ const data: AdminReferenceEntityTemplateSchema = {
3737
examples: [
3838
{
3939
image: 'button-default.png',
40+
description:
41+
'Group related buttons together with a primary action and secondary options. This example shows a button group with a save button and a cancel button using the slot layout.',
4042
codeblock: {
41-
title: 'Default',
43+
title: 'Group a primary and secondary action',
4244
tabs: [
4345
{
4446
code: './examples/default.html',
@@ -55,9 +57,9 @@ const data: AdminReferenceEntityTemplateSchema = {
5557
},
5658
{
5759
description:
58-
'Action buttons for selected items with destructive option.',
60+
'Present multiple secondary actions for operating on selected items. This example shows archive, export, and delete buttons grouped together for bulk operations.',
5961
codeblock: {
60-
title: 'Bulk action buttons',
62+
title: 'Add bulk action buttons',
6163
tabs: [
6264
{
6365
code: './examples/bulk-actions-in-data-tables.html',
@@ -71,9 +73,10 @@ const data: AdminReferenceEntityTemplateSchema = {
7173
},
7274
},
7375
{
74-
description: 'Icon-labeled buttons for common actions.',
76+
description:
77+
'Add icons to grouped buttons to help merchants quickly identify each action. This example shows duplicate, archive, and delete buttons with icons.',
7578
codeblock: {
76-
title: 'Buttons with icons',
79+
title: 'Add icons to grouped buttons',
7780
tabs: [
7881
{
7982
code: './examples/toolbar-buttons-with-icons.html',
@@ -88,9 +91,9 @@ const data: AdminReferenceEntityTemplateSchema = {
8891
},
8992
{
9093
description:
91-
'Tightly grouped buttons for view switching and filter options.',
94+
'Remove the gap between buttons to create a segmented control for toggling between views or options. This example shows day, week, and month buttons joined together with no spacing.',
9295
codeblock: {
93-
title: 'Segmented appearance',
96+
title: 'Create a segmented button group',
9497
tabs: [
9598
{
9699
code: './examples/segmented-appearance.html',
@@ -105,9 +108,9 @@ const data: AdminReferenceEntityTemplateSchema = {
105108
},
106109
{
107110
description:
108-
'Confirmation dialog style with cancel option and destructive action.',
111+
'Pair a cancel button with a critical action for destructive confirmation flows. This example shows a cancel and delete button grouped together for a confirmation dialog.',
109112
codeblock: {
110-
title: 'Destructive actions pattern',
113+
title: 'Confirm a destructive action',
111114
tabs: [
112115
{
113116
code: './examples/destructive-actions-pattern.html',

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

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,10 @@ const data: AdminReferenceEntityTemplateSchema = {
4141
examples: [
4242
{
4343
image: 'clickable-default.png',
44+
description:
45+
"Build custom interactive elements with flexible styling that Button or Link don't support. This example shows two clickable elements with different background and border styles.",
4446
codeblock: {
45-
title: 'Default',
47+
title: 'Create a custom interactive element',
4648
tabs: [
4749
{
4850
code: './examples/default.html',
@@ -57,9 +59,9 @@ const data: AdminReferenceEntityTemplateSchema = {
5759
},
5860
{
5961
description:
60-
"Demonstrates the clickable component's ability to function as a link, opening the specified URL in a new browser tab when clicked.",
62+
'Set href to make a clickable element navigate like a link. This example shows a clickable that opens a URL in a new browser tab.',
6163
codeblock: {
62-
title: 'Link Mode',
64+
title: 'Navigate to a URL',
6365
tabs: [
6466
{
6567
code: './examples/link-mode.html',
@@ -74,9 +76,9 @@ const data: AdminReferenceEntityTemplateSchema = {
7476
},
7577
{
7678
description:
77-
"A disabled submit button that can be used within a form, showing the component's form integration capabilities and disabled state.",
79+
'Use a clickable as a form submit button with a disabled state to prevent premature submission. This example shows a disabled submit-type clickable with border and padding.',
7880
codeblock: {
79-
title: 'Form Submit Button',
81+
title: 'Create a form submit button',
8082
tabs: [
8183
{
8284
code: './examples/form-submit-button.html',
@@ -91,9 +93,9 @@ const data: AdminReferenceEntityTemplateSchema = {
9193
},
9294
{
9395
description:
94-
'Illustrates how the clickable component can be integrated into a section layout to provide an interactive action button.',
96+
'Embed a clickable element within a content section to provide an interactive action alongside text. This example shows a styled clickable button inside a box with a heading and description.',
9597
codeblock: {
96-
title: 'Section with Clickable Action',
98+
title: 'Add a clickable action to a section',
9799
tabs: [
98100
{
99101
code: './examples/section-with-clickable-action.html',
@@ -108,9 +110,9 @@ const data: AdminReferenceEntityTemplateSchema = {
108110
},
109111
{
110112
description:
111-
"Demonstrates the use of an accessibility label to provide context for screen readers, enhancing the component's usability for users with assistive technologies.",
113+
'Add an accessibility label to provide screen readers with more context than the visible text alone. This example shows a clickable delete button with a descriptive label for assistive technologies.',
112114
codeblock: {
113-
title: 'Accessibility with ARIA Attributes',
115+
title: 'Add an accessibility label',
114116
tabs: [
115117
{
116118
code: './examples/accessibility-with-aria-attributes.html',
@@ -125,9 +127,9 @@ const data: AdminReferenceEntityTemplateSchema = {
125127
},
126128
{
127129
description:
128-
'Shows a disabled link with an accessibility label, explaining the unavailability of a feature to users of assistive technologies.',
130+
'Disable a clickable link while providing an accessibility label that explains why the feature is unavailable. This example shows a disabled navigation element with a descriptive label for screen readers.',
129131
codeblock: {
130-
title: 'Disabled Link with ARIA',
132+
title: 'Describe a disabled link with an accessibility label',
131133
tabs: [
132134
{
133135
code: './examples/disabled-link-with-aria.html',

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

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,11 @@ const data: AdminReferenceEntityTemplateSchema = {
4141
description: 'Component examples',
4242
examples: [
4343
{
44-
description: 'Default clickable chip.',
44+
description:
45+
'Create an interactive chip that merchants can click to trigger an action. This example a clickable chip with default styling.',
4546
image: 'clickable-chip-default.png',
4647
codeblock: {
47-
title: 'Default',
48+
title: 'Add a clickable chip with default styling',
4849
tabs: [
4950
{
5051
code: './examples/default.html',
@@ -59,9 +60,9 @@ const data: AdminReferenceEntityTemplateSchema = {
5960
},
6061
{
6162
description:
62-
'Demonstrates a simple clickable chip with a base color and interactive functionality.',
63+
'Use the `color` property to visually distinguish chips by importance or category. This example shows three chips with base, subdued, and strong color variants.',
6364
codeblock: {
64-
title: 'Basic Usage',
65+
title: 'Apply color variants to chips',
6566
tabs: [
6667
{
6768
code: './examples/basic-usage.html',
@@ -76,9 +77,9 @@ const data: AdminReferenceEntityTemplateSchema = {
7677
},
7778
{
7879
description:
79-
'Showcases a strong-colored clickable chip with a check circle icon and a removable state.',
80+
'Add an icon and a remove button so merchants can see status at a glance and dismiss the chip. This example shows a removable chip with a check circle icon in the graphic slot.',
8081
codeblock: {
81-
title: 'With Icon and Remove Button',
82+
title: 'Add an icon and a remove button to a chip',
8283
tabs: [
8384
{
8485
code: './examples/with-icon-and-remove-button.html',
@@ -93,9 +94,9 @@ const data: AdminReferenceEntityTemplateSchema = {
9394
},
9495
{
9596
description:
96-
'Demonstrates a subdued clickable chip configured as a link with a product icon.',
97+
'Set `href` to make a chip link to another page when clicked. This example shows a subdued chip with a product icon that acts as a link.',
9798
codeblock: {
98-
title: 'As a Link',
99+
title: 'Use a chip as a link',
99100
tabs: [
100101
{
101102
code: './examples/as-a-link.html',
@@ -110,9 +111,9 @@ const data: AdminReferenceEntityTemplateSchema = {
110111
},
111112
{
112113
description:
113-
'Illustrates a clickable chip in a disabled state, preventing interaction while displaying an inactive status.',
114+
'Disable a chip to prevent interaction while keeping it visible. This example shows a disabled chip with an accessibility label explaining the inactive state.',
114115
codeblock: {
115-
title: 'Disabled State',
116+
title: 'Disable a clickable chip',
116117
tabs: [
117118
{
118119
code: './examples/disabled-state.html',

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

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,10 @@ const data: AdminReferenceEntityTemplateSchema = {
4646
examples: [
4747
{
4848
image: 'link-default.png',
49+
description:
50+
'Add an inline link to let merchants navigate to another page. This example shows a basic text link with an `href` property.',
4951
codeblock: {
50-
title: 'Default',
52+
title: 'Add a basic link',
5153
tabs: [
5254
{
5355
code: './examples/default.html',
@@ -62,9 +64,9 @@ const data: AdminReferenceEntityTemplateSchema = {
6264
},
6365
{
6466
description:
65-
'Links automatically inherit the tone from their surrounding paragraph context.',
67+
'Embed links within paragraph text so merchants can navigate to related content inline. This example shows two links inside a paragraph that inherit the surrounding text tone.',
6668
codeblock: {
67-
title: 'Basic Links in Paragraph',
69+
title: 'Embed links in paragraph text',
6870
tabs: [
6971
{
7072
code: './examples/basic-links-in-paragraph.html',
@@ -79,9 +81,9 @@ const data: AdminReferenceEntityTemplateSchema = {
7981
},
8082
{
8183
description:
82-
'Demonstrates how links can be integrated within banner components to highlight important information and provide direct action paths.',
84+
'Place links inside banners to provide direct actions alongside important notifications. This example shows a link inside an info banner prompting merchants to create a campaign.',
8385
codeblock: {
84-
title: 'Links in Banner',
86+
title: 'Add links inside a banner',
8587
tabs: [
8688
{
8789
code: './examples/links-in-banner.html',
@@ -96,9 +98,9 @@ const data: AdminReferenceEntityTemplateSchema = {
9698
},
9799
{
98100
description:
99-
'Illustrates using links within a box container to provide contextual navigation and additional information in a visually contained area.',
101+
'Place links inside a box container to provide navigation within a visually distinct content area. This example shows two links inside a bordered box with background and padding.',
100102
codeblock: {
101-
title: 'Links in Box Container',
103+
title: 'Add links inside a box container',
102104
tabs: [
103105
{
104106
code: './examples/links-in-box-container.html',
@@ -113,9 +115,9 @@ const data: AdminReferenceEntityTemplateSchema = {
113115
},
114116
{
115117
description:
116-
'Demonstrates how to create links that trigger file downloads, useful for exporting data or providing downloadable resources.',
118+
'Use the download attribute to trigger a file download when the link is clicked. This example shows a link that downloads a CSV file for customer data export.',
117119
codeblock: {
118-
title: 'Download Links',
120+
title: 'Trigger a file download',
119121
tabs: [
120122
{
121123
code: './examples/download-links.html',
@@ -130,9 +132,9 @@ const data: AdminReferenceEntityTemplateSchema = {
130132
},
131133
{
132134
description:
133-
'Illustrates linking to external resources with different targets, showing how to open links in new tabs and provide navigation to external documentation.',
135+
'Open external URLs in a new tab so merchants stay on the current page. This example shows two links with `target="_blank"` pointing to external documentation.',
134136
codeblock: {
135-
title: 'External Links',
137+
title: 'Open external links in a new tab',
136138
tabs: [
137139
{
138140
code: './examples/external-links.html',
@@ -147,9 +149,9 @@ const data: AdminReferenceEntityTemplateSchema = {
147149
},
148150
{
149151
description:
150-
'Shows how to use the `lang` attribute to specify the language of a link, supporting internationalization and proper screen reader pronunciation.',
152+
'Set the `lang` attribute so screen readers pronounce the link text correctly. This example shows a French-language link with the `lang` attribute set.',
151153
codeblock: {
152-
title: 'Links with Language Attribute',
154+
title: 'Set the language for a link',
153155
tabs: [
154156
{
155157
code: './examples/links-with-language-attribute.html',
@@ -164,9 +166,9 @@ const data: AdminReferenceEntityTemplateSchema = {
164166
},
165167
{
166168
description:
167-
'Demonstrates how links can have different visual tones, including default, neutral, and critical, allowing for varied contextual styling.',
169+
'Configure links to inherit the tone of their parent paragraph to match the surrounding context. This example shows links inside paragraphs with six different tones.',
168170
codeblock: {
169-
title: 'Links with Different Tones',
171+
title: 'Match link tone to surrounding context',
170172
tabs: [
171173
{
172174
code: './examples/links-with-different-tones.html',

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

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,10 @@ const data: AdminReferenceEntityTemplateSchema = {
4444
description: 'Component examples',
4545
examples: [
4646
{
47+
description:
48+
'Add a dropdown menu of actions triggered by a button. This example shows a menu with three icon buttons including a critical delete action.',
4749
codeblock: {
48-
title: 'Default',
50+
title: 'Add a basic actions menu',
4951
tabs: [
5052
{
5153
code: './examples/default.html',
@@ -68,9 +70,9 @@ const data: AdminReferenceEntityTemplateSchema = {
6870
},
6971
{
7072
description:
71-
'Shows how to organize menu items into logical sections with headings, helping to group related actions and improve menu readability.',
73+
'Organize menu items into labeled groups so merchants can quickly find related actions. This example shows two sections with headings separating product actions from export options.',
7274
codeblock: {
73-
title: 'Menu with Sections',
75+
title: 'Organize items into sections',
7476
tabs: [
7577
{
7678
code: './examples/menu-with-sections.html',
@@ -89,9 +91,9 @@ const data: AdminReferenceEntityTemplateSchema = {
8991
},
9092
{
9193
description:
92-
"Demonstrates a menu with a mix of link-based buttons, standard buttons, and a disabled button, showcasing the menu's flexibility in handling different interaction states.",
94+
'Mix link-based, standard, and disabled buttons in a single menu. This example shows a menu with a link that opens in a new tab, a disabled action, and a download link.',
9395
codeblock: {
94-
title: 'Menu with Links and Disabled Items',
96+
title: 'Add links and disabled items to a menu',
9597
tabs: [
9698
{
9799
code: './examples/menu-with-links-and-disabled-items.html',
@@ -110,9 +112,9 @@ const data: AdminReferenceEntityTemplateSchema = {
110112
},
111113
{
112114
description:
113-
"Presents a comprehensive menu showing how to create sections with different action groups and include a critical action at the menu's root level.",
115+
'Combine sections with root-level items to separate grouped actions from standalone ones like a destructive action. This example shows two sections for customer management alongside a root-level delete button.',
114116
codeblock: {
115-
title: 'Actions menu with sections',
117+
title: 'Mix sections with root-level actions',
116118
tabs: [
117119
{
118120
code: './examples/customer-actions-menu.html',
@@ -131,9 +133,9 @@ const data: AdminReferenceEntityTemplateSchema = {
131133
},
132134
{
133135
description:
134-
'Illustrates a complex menu with nested sections, demonstrating how to organize multiple related actions with icons.',
136+
'Build a settings-style menu with multiple sections and a standalone action at the bottom. This example shows account and store settings sections with a root-level sign-out link.',
135137
codeblock: {
136-
title: 'Menu with nested sections',
138+
title: 'Build a settings menu with sections',
137139
tabs: [
138140
{
139141
code: './examples/settings-menu.html',
@@ -152,9 +154,9 @@ const data: AdminReferenceEntityTemplateSchema = {
152154
},
153155
{
154156
description:
155-
'Use an icon-only button as the menu trigger for a compact "more actions" pattern commonly used in toolbars and table rows.',
157+
'Use an icon-only button as the menu trigger for a compact "more actions" pattern. This example shows a three-dot icon button that opens a menu with common product actions.',
156158
codeblock: {
157-
title: 'Icon-only trigger',
159+
title: 'Trigger a menu from an icon-only button',
158160
tabs: [
159161
{
160162
code: './examples/icon-only-trigger.html',

0 commit comments

Comments
 (0)