docs: add line highlight validation (#14380)
* docs: add line highlight validation * add to all projects * fixes * fixes * fix * fixes
This commit is contained in:
1 parent
6380c1fdf4
commit
cb33388202
59 files changed
+514
-243
No files matched your search
@@ -1297,8 +1297,8 @@ export const createBundledProductComponentHighlights2 = [
|
||||
["3", "currentProductPage", "The current page of products retrieved from the server."],
|
||||
["4", "productsCount", "The total number of products."],
|
||||
["5", "hasNextPage", "Whether there are more products to load."],
|
||||
["9", "useQuery", "Retrieve the products from the API route."],
|
||||
["23", "fetchMoreProducts", "Fetch more products when the user scrolls to the end of the list."],
|
||||
["10", "useQuery", "Retrieve the products from the API route."],
|
||||
["24", "fetchMoreProducts", "Fetch more products when the user scrolls to the end of the list."],
|
||||
]
|
||||
|
||||
```tsx title="src/admin/components/create-bundled-product.tsx" highlights={createBundledProductComponentHighlights2}
|
||||
@@ -1799,7 +1799,7 @@ export const prepareBundleCartDataStepHighlights = [
|
||||
["12", "bundle", "The bundle to add to the cart."],
|
||||
["15", "quantity", "The quantity of the bundle to add to the cart."],
|
||||
["16", "items", "The selected variants for each item in the bundle."],
|
||||
["15", "bundleItems", "Prepare the items to be added to the cart."],
|
||||
["25", "bundleItems", "Prepare the items to be added to the cart."],
|
||||
["45", "variant_id", "The ID of the selected variant to add to the cart."],
|
||||
["46", "quantity", "The quantity of the variant to add to the cart."],
|
||||
["47", "metadata", "The metadata for the line item in the cart."],
|
||||
|
||||
@@ -1887,9 +1887,9 @@ Create the file `src/workflows/create-digital-product-order/steps/create-digital
|
||||
|
||||
export const createDpoHighlights = [
|
||||
["18", "InferTypeOf", "Infer the type of the `DigitalProduct` data model since it's a variable."],
|
||||
["33", "createDigitalProductOrders", "Create the digital product order."],
|
||||
["41", "digital_product_order", "Pass the created digital product order to the compensation function."],
|
||||
["51", "deleteDigitalProductOrders", "Delete the digital product order if an error occurs in the workflow."]
|
||||
["32", "createDigitalProductOrders", "Create the digital product order."],
|
||||
["40", "digital_product_order", "Pass the created digital product order to the compensation function."],
|
||||
["50", "deleteDigitalProductOrders", "Delete the digital product order if an error occurs in the workflow."]
|
||||
]
|
||||
|
||||
```ts title="src/workflows/create-digital-product-order/steps/create-digital-product-order.ts" highlights={createDpoHighlights} collapsibleLines="1-14" expandMoreLabel="Show Imports"
|
||||
@@ -2653,10 +2653,10 @@ Create the file `src/api/store/customers/me/digital-products/[mediaId]/download/
|
||||
|
||||
export const downloadUrlHighlights = [
|
||||
["20", "query.graph", "Get the customer's orders and linked digital orders."],
|
||||
["36", "query.graph", "Get the digital product orders of the customer and associated products and media."],
|
||||
["56", "foundMedia", "Set `foundMedia` if the media's ID is equal to the ID passed as a route parameter."],
|
||||
["65", "!foundMedia", "If `foundMedia` isn't set, throw an error."],
|
||||
["72", "retrieveFile", "Retrieve the details of the media's file."]
|
||||
["34", "query.graph", "Get the digital product orders of the customer and associated products and media."],
|
||||
["55", "foundMedia", "Set `foundMedia` if the media's ID is equal to the ID passed as a route parameter."],
|
||||
["61", "!foundMedia", "If `foundMedia` isn't set, throw an error."],
|
||||
["68", "retrieveFile", "Retrieve the details of the media's file."]
|
||||
]
|
||||
|
||||
```ts title="src/api/store/customers/me/digital-products/[mediaId]/download/route.ts" highlights={downloadUrlHighlights} collapsibleLines="1-10" expandMoreLabel="Show Imports"
|
||||
|
||||
@@ -1751,7 +1751,7 @@ Create the file `src/workflows/delivery/steps/notify-restaurant.ts` with the fol
|
||||
export const notifyRestaurantStepHighlights = [
|
||||
["11", "async", "Set the step as async."],
|
||||
["18", "graph", "Retrieve the delivery and its restaurant."],
|
||||
["30", "emit", "Emit a custom event that can be used to notify the restaurant that a new delivery is created."]
|
||||
["28", "emit", "Emit a custom event that can be used to notify the restaurant that a new delivery is created."]
|
||||
]
|
||||
|
||||
```ts title="src/workflows/delivery/steps/notify-restaurant.ts" highlights={notifyRestaurantStepHighlights} collapsibleLines="1-6" expandButtonLabel="Show Imports"
|
||||
@@ -1835,7 +1835,7 @@ This step is async and its only purpose is to wait until it’s marked as succes
|
||||
Create the file `src/workflows/delivery/steps/create-order.ts` with the following content:
|
||||
|
||||
export const createOrderStepHighlights1 = [
|
||||
["16", "deliveryQuery", "Retrieve the delivery with its linked cart's details."]
|
||||
["15", "delivery", "Retrieve the delivery with its linked cart's details."]
|
||||
]
|
||||
|
||||
```ts title="src/workflows/delivery/steps/create-order.ts" highlights={createOrderStepHighlights1} collapsibleLines="1-9" expandButtonLabel="Show Imports"
|
||||
|
||||
@@ -585,11 +585,11 @@ You can now create the workflow that creates a vendor and its admin.
|
||||
Create the file `src/workflows/marketplace/create-vendor/index.ts` with the following content:
|
||||
|
||||
export const vendorWorkflowHighlights = [
|
||||
["27", "createVendorStep", "Create the vendor."],
|
||||
["33", "transform", "Prepare the vendor admin's data."],
|
||||
["43", "createVendorAdminStep", "Create the vendor admin."],
|
||||
["47", "setAuthAppMetadataStep", "Create the `vendor` actor type."],
|
||||
["53", "useQueryGraphStep", "Retrieve the created vendor with its admins."],
|
||||
["28", "createVendorStep", "Create the vendor."],
|
||||
["34", "transform", "Prepare the vendor admin's data."],
|
||||
["44", "createVendorAdminStep", "Create the vendor admin."],
|
||||
["48", "setAuthAppMetadataStep", "Create the `vendor` actor type."],
|
||||
["54", "useQueryGraphStep", "Retrieve the created vendor with its admins."],
|
||||
]
|
||||
|
||||
```ts title="src/workflows/marketplace/create-vendor/index.ts" highlights={vendorWorkflowHighlights}
|
||||
@@ -1542,7 +1542,6 @@ export const vendorOrder3Highlights = [
|
||||
["3", "map", "Loop over the vendor IDs and create a child order with only their items."],
|
||||
["11", "prepareOrderData", "Format the order data and pass it as the workflow's input."],
|
||||
["18", "push", "Add a link between the vendor and the order to be created later."],
|
||||
["30", "cancelOrderWorkflow", "Cancel all created workflows if an error occurs while creating any of them."]
|
||||
]
|
||||
|
||||
```ts title="src/workflows/marketplace/create-vendor-orders/steps/create-vendor-orders.ts" highlights={vendorOrder3Highlights}
|
||||
|
||||
@@ -722,10 +722,14 @@ The compensation function receives the subscription as a parameter. It cancels t
|
||||
Create the file `src/workflows/create-subscription/index.ts` with the following content:
|
||||
|
||||
export const createSubscriptionWorkflowHighlights = [
|
||||
["26", "completeCartWorkflow", "Complete the cart and create the order."],
|
||||
["32", "useQueryGraphStep", "Retrieve the order's details."],
|
||||
["87", "createSubscriptionStep", "Create the subscription."],
|
||||
["94", "createRemoteLinkStep", "Create the links returned by the previous step."]
|
||||
["29", "acquireLockStep", "Acquire a lock on the cart to prevent race conditions."],
|
||||
["34", "completeCartWorkflow", "Complete the cart and create the order."],
|
||||
["40", "useQueryGraphStep", "Retrieve the order's details."],
|
||||
["95", "useQueryGraphStep", "Retrieve any existing subscription links for the order."],
|
||||
["101", "when", "Check if a subscription already exists for the order."],
|
||||
["108", "createSubscriptionStep", "Create the subscription."],
|
||||
["115", "createRemoteLinkStep", "Create the links returned by the previous step."],
|
||||
["120", "releaseLockStep", "Release the lock on the cart."]
|
||||
]
|
||||
|
||||
```ts title="src/workflows/create-subscription/index.ts" highlights={createSubscriptionWorkflowHighlights} collapsibleLines="1-13" expandMoreLabel="Show Imports"
|
||||
|
||||
@@ -1212,13 +1212,7 @@ This displays the selected seat number and show date for ticket products instead
|
||||
|
||||
You should also remove the quantity selector for ticket products since you can't purchase multiple tickets for the same seat. Remove the following highlighted lines from the `return` statement of the `Item` component:
|
||||
|
||||
export const removeHighlights = [
|
||||
["5"], ["6"], ["7"], ["8"], ["9"], ["10"], ["11"], ["12"], ["13"], ["14"],
|
||||
["15"], ["16"], ["17"], ["18"], ["19"], ["20"], ["21"], ["22"], ["23"], ["24"],
|
||||
["25"], ["26"], ["27"], ["29"]
|
||||
]
|
||||
|
||||
```tsx title="src/modules/cart/components/item/index.tsx" highlights={removeHighlights}
|
||||
```tsx title="src/modules/cart/components/item/index.tsx"
|
||||
{type === "full" && (
|
||||
<Table.Cell>
|
||||
<div className="flex gap-2 items-center w-28">
|
||||
|
||||
Reference in new issue
Block a user