Skip to content

Commit 28027d5

Browse files
authored
[Docs]: Fast-follows changes to components docs and APIs (#3527)
* known changes * more changes * changeset * changeset updates * build-docs file
1 parent b73b8bc commit 28027d5

File tree

125 files changed

+1259
-971
lines changed

Some content is hidden

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

125 files changed

+1259
-971
lines changed

.changeset/cruel-crabs-rest.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@shopify/ui-extensions': patch
3+
---
4+
5+
- Adding toggle state to Announcement callback events docs
6+
- Adding correct Map callback events docs
7+
- Adding setup updated setup instructions for checkout extensions

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

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ fail_and_exit() {
1414
run_sed() {
1515
if [[ "$OSTYPE" == "darwin"* ]]; then
1616
# macOS
17+
# WARNING: do not synchronize this with checkout-web
1718
sed -Ei '' "$1" "$2"
1819
else
1920
# Linux and other Unix-like systems
@@ -100,19 +101,23 @@ copy_generated_docs_to_shopify_dev() {
100101
if [ -d $SHOPIFY_DEV_PATH ]; then
101102
mkdir -p $SHOPIFY_DEV_PATH/db/data/docs/templated_apis/checkout_extensions/$API_VERSION
102103
cp ./$DOCS_PATH/generated/* $SHOPIFY_DEV_PATH/db/data/docs/templated_apis/checkout_extensions/$API_VERSION
103-
# Replace 'unstable' with the exact API version in relative doc links
104-
run_sed \
105-
"s/\/docs\/api\/checkout-ui-extensions\/unstable/\/docs\/api\/checkout-ui-extensions\/$API_VERSION/gi" \
106-
$SHOPIFY_DEV_PATH/db/data/docs/templated_apis/checkout_extensions/$API_VERSION/generated_docs_data.json
107-
sed_exit=$?
108-
if [ $sed_exit -ne 0 ]; then
109-
fail_and_exit $sed_exit
110-
fi
104+
105+
# Replace 'latest' with the exact API version in relative doc links
106+
for file in generated_docs_data.json generated_static_pages.json; do
107+
run_sed \
108+
"s/\/docs\/api\/checkout-ui-extensions\/latest/\/docs\/api\/checkout-ui-extensions\/$API_VERSION/gi" \
109+
"$SHOPIFY_DEV_PATH/db/data/docs/templated_apis/checkout_extensions/$API_VERSION/$file"
110+
sed_exit=$?
111+
if [ $sed_exit -ne 0 ]; then
112+
fail_and_exit $sed_exit
113+
fi
114+
done
115+
111116
rsync -a --delete ./$DOCS_PATH/screenshots/ $SHOPIFY_DEV_PATH/react-app/public/images/templated-apis-screenshots/checkout-ui-extensions/$API_VERSION
112117
echo "Docs: https://shopify-dev.shop.dev/docs/api/checkout-ui-extensions"
113118
else
114-
echo "Not copying docs to shopify-dev because it was not found at $SHOPIFY_DEV_PATH."
115-
fi
119+
echo "Not copying docs to shopify-dev because it was not found at $SHOPIFY_DEV_PATH."
120+
fi
116121
}
117122

118123
# Assume we have a relative path to shopify-dev (for non-local environments like CI, and Github Actions)

packages/ui-extensions/docs/surfaces/checkout/reference/apis/delivery.doc.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const data: ReferenceEntityTemplateSchema = {
1212
description: `
1313
The APIs for interacting with delivery and shipping options.
1414
15-
> > Tip: Not all extension targets implement all APIs. Check the documentation for the extension target you are using to see which APIs are available.
15+
> Tip: Not all extension targets implement all APIs. Check the documentation for the extension target you are using to see which APIs are available.
1616
`,
1717
overviewPreviewDescription:
1818
'The APIs for interacting with delivery and shipping options.',

packages/ui-extensions/docs/surfaces/checkout/reference/examples/extension-targets.example.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ api_version = "2025-10"
33
[[extensions]]
44
name = "My checkout extension"
55
handle = "checkout-ui"
6+
uid = "fddfc370-27c7-c30f-4ee0-a927194e2accadefd40c"
67
type = "ui_extension"
78

89
[[extensions.targeting]]

packages/ui-extensions/docs/surfaces/checkout/reference/examples/settings.example.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ api_version = "2025-10"
33
[[extensions]]
44
name = "My checkout extension"
55
handle = "checkout-ui"
6+
uid = "fddfc370-27c7-c30f-4ee0-a927194e2accadefd40c"
67
type = "ui_extension"
78

89
[[extensions.targeting]]

packages/ui-extensions/docs/surfaces/checkout/reference/examples/ui-components/checkbox-links.example.tsx

Lines changed: 0 additions & 31 deletions
This file was deleted.

packages/ui-extensions/docs/surfaces/checkout/reference/examples/ui-components/clipboarditem-oncopy.example.tsx

Lines changed: 0 additions & 51 deletions
This file was deleted.

packages/ui-extensions/docs/surfaces/checkout/reference/examples/ui-components/disclosure-and-alignment.example.tsx

Lines changed: 0 additions & 137 deletions
This file was deleted.

0 commit comments

Comments
 (0)