Skip to content

Commit 1169383

Browse files
authored
Merge pull request #3483 from Shopify/doc-refinement-and-fixes
Refactor text components for improved formatting and accessibility
2 parents 1dae805 + 27b5efd commit 1169383

27 files changed

+82
-34
lines changed

packages/ui-extensions/docs/surfaces/admin/build-docs.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ const templates = {
195195
wrapperAttributes: 'padding="base"',
196196
}),
197197
fullWidth: createTemplate({
198+
layoutStyles: 'display: grid; place-items: center;',
198199
wrapperElement: 's-box',
199200
wrapperAttributes: 'padding="base", inlineSize="100%"',
200201
}),

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,9 @@ const data: AdminReferenceEntityTemplateSchema = {
140140
{
141141
code: './examples/with-interest-relationship.jsx',
142142
language: 'preview-jsx',
143+
customStyles: {
144+
minHeight: '200px',
145+
},
143146
},
144147
],
145148
},
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
<s-icon type="delete" tone="critical" interestFor="delete-button-1"></s-icon>
1+
<s-tooltip id="info-tooltip">
2+
SKU must be unique across all products and cannot be changed after creation
3+
</s-tooltip>
4+
<s-icon type="info" tone="info" interestFor="info-tooltip" />
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
1-
<s-icon type="delete" tone="critical" interestFor="delete-button-1" />
1+
<>
2+
<s-tooltip id="info-tooltip">
3+
SKU must be unique across all products and cannot be changed after creation
4+
</s-tooltip>
5+
<s-icon type="info" tone="info" interestFor="info-tooltip" />
6+
</>
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
<s-paragraph dir="rtl">محتوى النص باللغة العربية</s-paragraph>
1+
<s-paragraph dir="rtl">
2+
محتوى النص باللغة العربية
3+
</s-paragraph>
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
<s-paragraph dir="rtl">محتوى النص باللغة العربية</s-paragraph>
1+
<s-paragraph dir="rtl">
2+
محتوى النص باللغة العربية
3+
</s-paragraph>

packages/ui-extensions/src/surfaces/admin/components/Section/examples/section-with-accessibility-label.html

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@
33
accessibilityLabel="Order payment breakdown and totals"
44
>
55
<s-stack gap="base">
6-
<s-text>Subtotal: $42.99</s-text>
7-
<s-text>Tax: $5.59</s-text>
8-
<s-text>Shipping: $1.41</s-text>
9-
<s-text><strong>Total: $49.99</strong></s-text>
6+
<s-paragraph>Subtotal: $42.99</s-paragraph>
7+
<s-paragraph>Tax: $5.59</s-paragraph>
8+
<s-paragraph>Shipping: $1.41</s-paragraph>
9+
<s-paragraph>
10+
<s-text type="strong">Total: $49.99</s-text>
11+
</s-paragraph>
1012
</s-stack>
1113
</s-section>

packages/ui-extensions/src/surfaces/admin/components/Section/examples/section-with-accessibility-label.jsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
accessibilityLabel="Order payment breakdown and totals"
44
>
55
<s-stack>
6-
<s-text>Subtotal: $42.99</s-text>
7-
<s-text>Tax: $5.59</s-text>
8-
<s-text>Shipping: $1.41</s-text>
9-
<s-text>
10-
<strong>Total: $49.99</strong>
11-
</s-text>
6+
<s-paragraph>Subtotal: $42.99</s-paragraph>
7+
<s-paragraph>Tax: $5.59</s-paragraph>
8+
<s-paragraph>Shipping: $1.41</s-paragraph>
9+
<s-paragraph>
10+
<s-text type="strong">Total: $49.99</s-text>
11+
</s-paragraph>
1212
</s-stack>
1313
</s-section>

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,13 @@ const data: AdminReferenceEntityTemplateSchema = {
127127
{
128128
code: './examples/custom-alignment.html',
129129
language: 'html',
130+
layout: 'fullWidth',
130131
},
131132

132133
{
133134
code: './examples/custom-alignment.jsx',
134135
language: 'preview-jsx',
136+
layout: 'fullWidth',
135137
},
136138
],
137139
},
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
<s-text accessibility-visibility="exclusive">Product prices include tax</s-text>
1+
<s-text accessibilityVisibility="exclusive">
2+
Product prices include tax
3+
</s-text>

0 commit comments

Comments
 (0)