Skip to content

Commit

Permalink
Add print targets
Browse files Browse the repository at this point in the history
  • Loading branch information
elanalynn committed Jun 11, 2024
1 parent f2d1ce4 commit cee44bc
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .changeset/tall-fireants-sleep.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@shopify/ui-extensions': minor
'@shopify/ui-extensions-react': minor
---

Add admin print action targets
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,39 @@ You register targets in your \`shopify.extension.toml\` and inside the Javascrip
},
],
},
{
type: 'GenericAccordion',
title: 'Admin print actions locations',
anchorLink: 'print-locations',
sectionContent:
'Admin action extensions appear on order and product pages in the admin.',
accordionContent: [
{
title: 'Order details',
description:
'This page shows information about a single order. The `admin.order-details.print-action.render` target is available on this page.',
image: 'admin.order-details.print-action.render.png',
},
{
title: 'Product details',
description:
'This page shows information about a single product. The `admin.product-details.print-action.render` target is available on this page.',
image: 'admin.collection-details.block.render.png',
},
{
title: 'Order index selection',
description:
'This page shows a table of multiple orders. The `admin.order-index.selection-print-action.render` target is available on this page when multiple orders are selected.',
image: 'admin.order-index.selection-print-action.render.png',
},
{
title: 'Product index selection',
description:
'This page shows a table of multiple products. The `admin.product-index.selection-print-action.render` target is available on this page when multiple products are selected.',
image: 'admin.product-index.selection-print-action.render.png',
},
],
},
{
type: 'Markdown',
title: 'Customer segmentation locations',
Expand Down
48 changes: 46 additions & 2 deletions packages/ui-extensions/src/surfaces/admin/extension-targets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ export interface ExtensionTargets {
>;

/**
* Renders an admin action extension in the abandonded checkout page. Open this extension from the "More Actions" menu.
* Renders an admin action extension in the abandoned checkout page. Open this extension from the "More Actions" menu.
*
* See the [list of available components](/docs/api/admin-extensions/components).
*/
Expand Down Expand Up @@ -335,7 +335,7 @@ export interface ExtensionTargets {
>;

/**
* Renders an admin action extension in the customer index page when multiple resources are selected. Open this extension from the "More Actions" menu of the resource list. The resource ids are available to this extension at runtime.
* Renders an admin action extension in the customer index page when multiple resources are selected. Open this extension from the "More Actions" menu of the resource list. The resource ids are available to this extension at runtime.
*
* See the [list of available components](/docs/api/admin-extensions/components).
*/
Expand All @@ -354,6 +354,50 @@ export interface ExtensionTargets {
AllComponents
>;

// Print actions and bulk print actions

/**
* Renders an admin print action extension in the order index page when multiple resources are selected. Open this extension from the "Print" menu of the resource list. The resource ids are available to this extension at runtime.
*
* See the [list of available components](/docs/api/admin-extensions/components).
*/
'admin.order-details.print-action.render': RenderExtension<
ActionExtensionApi<'admin.order-details.print-action.render'>,
AllComponents
>;

/**
* Renders an admin print action extension in the product index page when multiple resources are selected. Open this extension from the "Print" menu of the resource list. The resource ids are available to this extension at runtime.
*
* See the [list of available components](/docs/api/admin-extensions/components).
*/
'admin.product-details.print-action.render': RenderExtension<
ActionExtensionApi<'admin.product-details.print-action.render'>,
AllComponents
>;

/**
* Renders an admin print action extension in the order index page when multiple resources are selected. Open this extension from the "Print" menu of the resource list. The resource ids are available to this extension at runtime.
*
* See the [list of available components](/docs/api/admin-extensions/components).
*/
'admin.order-index.selection-print-action.render': RenderExtension<
ActionExtensionApi<'admin.order-index.selection-print-action.render'>,
AllComponents
>;

/**
* Renders an admin print action extension in the product index page when multiple resources are selected. Open this extension from the "Print" menu of the resource list. The resource ids are available to this extension at runtime.
*
* See the [list of available components](/docs/api/admin-extensions/components).
*/
'admin.product-index.selection-print-action.render': RenderExtension<
ActionExtensionApi<'admin.product-index.selection-print-action.render'>,
AllComponents
>;

// Other

/**
* Renders Product Configuration on product details and product variant details
*
Expand Down

0 comments on commit cee44bc

Please sign in to comment.