Skip to content

Commit 58933a1

Browse files
[UI components]: Docs updates for components for remote-dom release (#2861)
* changes for docs * updating examples * build script * Update packages/ui-extensions/src/surfaces/checkout/components/Button/examples/basic-button.example.html Co-authored-by: Jean-Frederic Fortier <[email protected]> * Update packages/ui-extensions/src/surfaces/checkout/components/Paragraph/examples/basic-paragraph.example.html Co-authored-by: Jean-Frederic Fortier <[email protected]> * feedback * optimized images * adding missing shared components * banner to new category * Update packages/ui-extensions/src/surfaces/checkout/components/Banner/examples/basic-banner.example.html Co-authored-by: Jean-Frederic Fortier <[email protected]> * Update packages/ui-extensions/src/surfaces/checkout/components/Button/examples/basic-button.example.html Co-authored-by: Jean-Frederic Fortier <[email protected]> * Update packages/ui-extensions/docs/surfaces/checkout/categories/components.doc.ts Co-authored-by: Jean-Frederic Fortier <[email protected]> * removing image * adding alt text --------- Co-authored-by: Jean-Frederic Fortier <[email protected]>
1 parent c41336e commit 58933a1

File tree

75 files changed

+70
-105
lines changed

Some content is hidden

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

75 files changed

+70
-105
lines changed

packages/ui-extensions/docs/surfaces/checkout/build-docs.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,21 +35,22 @@ fi
3535

3636
COMPILE_DOCS="yarn tsc --project $DOCS_PATH/tsconfig.docs.json --types react --moduleResolution node --target esNext --module CommonJS && yarn generate-docs --overridePath ./$DOCS_PATH/typeOverride.json --input ./$DOCS_PATH/reference ./$SRC_PATH --typesInput ./$SRC_PATH --output ./$DOCS_PATH/generated"
3737
COMPILE_STATIC_PAGES="yarn tsc $DOCS_PATH/staticPages/*.doc.ts --types react --moduleResolution node --target esNext --module CommonJS && yarn generate-docs --isLandingPage --input ./$DOCS_PATH/staticPages --output ./$DOCS_PATH/generated"
38+
COMPILE_CATEGORIES="yarn tsc $DOCS_PATH/categories/*.doc.ts --moduleResolution node --target esNext --module CommonJS && pnpm exec generate-docs --isCategoryPage --input ./$DOCS_PATH/categories --output ./$DOCS_PATH/generated"
3839

3940
# Rename components.d.ts to components.ts so it can be picked up be the generate-docs tool
4041
cp $COMPONENTS_DEFINITIONS $COMPONENTS_TS
4142

4243
if echo "$PWD" | grep -q '\checkout-web'; then
4344
# We are generating docs from the private package, which does not have other surfaces aside from checkout
44-
eval $COMPILE_DOCS && eval $COMPILE_STATIC_PAGES
45+
eval $COMPILE_DOCS && eval $COMPILE_STATIC_PAGES && eval $COMPILE_CATEGORIES
4546
build_exit=$?
4647
else
4748
# Other surfaces may have duplicate types that cause issues with documentation generation,
4849
# so we erase their contents and replace them afterwards
4950
echo "export {}" > src/surfaces/customer-account.ts
5051
echo "export {}" > src/surfaces/admin.ts
5152
echo "export {}" > src/surfaces/point-of-sale.ts
52-
eval $COMPILE_DOCS && eval $COMPILE_STATIC_PAGES
53+
eval $COMPILE_DOCS && eval $COMPILE_STATIC_PAGES && eval $COMPILE_CATEGORIES
5354
build_exit=$?
5455
git checkout HEAD -- src/surfaces/customer-account.ts
5556
git checkout HEAD -- src/surfaces/admin.ts
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import type {CategoryTemplateSchema} from '@shopify/generate-docs';
2+
3+
const data: CategoryTemplateSchema = {
4+
category: 'polaris-web-components',
5+
sections: [
6+
{
7+
type: 'Generic',
8+
anchorLink: 'notification-banner',
9+
title: '',
10+
sectionContent: '',
11+
sectionNotice: [
12+
{
13+
type: 'info',
14+
title: 'Early access',
15+
sectionContent:
16+
'This is an early access preview of Polaris built with web components. If you’re looking for a stable React implementation, see the [Checkout React documentation](/docs/api/checkout-ui-extensions/2025-04/components).',
17+
},
18+
],
19+
},
20+
],
21+
};
22+
23+
export default data;
-3.86 KB
-3.61 KB
-13.5 KB
-12 KB
-11.1 KB
-5.65 KB
2.69 KB
-6.56 KB

0 commit comments

Comments
 (0)