From 2aba48f86a0a445d130877ac8b221e995c99855e Mon Sep 17 00:00:00 2001 From: Josh White Date: Tue, 19 Mar 2024 14:46:57 -0400 Subject: [PATCH 1/7] add new extension targets for action extensions everywhere --- .../src/surfaces/admin/extension-targets.ts | 91 +++++++++++++++++++ 1 file changed, 91 insertions(+) diff --git a/packages/ui-extensions/src/surfaces/admin/extension-targets.ts b/packages/ui-extensions/src/surfaces/admin/extension-targets.ts index a3dbc2116..6ffb405e1 100644 --- a/packages/ui-extensions/src/surfaces/admin/extension-targets.ts +++ b/packages/ui-extensions/src/surfaces/admin/extension-targets.ts @@ -171,6 +171,87 @@ export interface ExtensionTargets { AllComponents >; + /** + * Renders an Admin Action in the discount index page. Open this extension from the "More Actions" menu. + * + * See the [list of available components](/docs/api/admin-extensions/components). + */ + 'admin.discount-index.action.render': RenderExtension< + ActionExtensionApi<'admin.discount-index.action.render'>, + AllComponents + >; + + /** + * Renders an Admin Action in the collection details page. Open this extension from the "More Actions" menu. + * + * See the [list of available components](/docs/api/admin-extensions/components). + */ + 'admin.collection-details.action.render': RenderExtension< + ActionExtensionApi<'admin.collection-details.action.render'>, + AllComponents + >; + + /** + * Renders an Admin Action in the collection index page. Open this extension from the "More Actions" menu. + * + * See the [list of available components](/docs/api/admin-extensions/components). + */ + 'admin.collection-index.action.render': RenderExtension< + ActionExtensionApi<'admin.collection-index.action.render'>, + AllComponents + >; + + /** + * Renders an Admin Action in the abandonded checkout page. Open this extension from the "More Actions" menu. + * + * See the [list of available components](/docs/api/admin-extensions/components). + */ + 'admin.abandoned-checkout-details.action.render': RenderExtension< + ActionExtensionApi<'admin.abandoned-checkout-details.action.render'>, + AllComponents + >; + + /** + * Renders an Admin Action in the product variant details page. Open this extension from the "More Actions" menu. + * + * See the [list of available components](/docs/api/admin-extensions/components). + */ + 'admin.variant-details.action.render': RenderExtension< + ActionExtensionApi<'admin.variant-details.action.render'>, + AllComponents + >; + + /** + * Renders an Admin Action in the draft order details page. Open this extension from the "More Actions" menu. + * + * See the [list of available components](/docs/api/admin-extensions/components). + */ + 'admin.draft-order-details.action.render': RenderExtension< + ActionExtensionApi<'admin.draft-order-details.action.render'>, + AllComponents + >; + + /** + * Renders an Admin Action in the draft orders page. Open this extension from the "More Actions" menu. + * + * See the [list of available components](/docs/api/admin-extensions/components). + */ + 'admin.draft-order-index.action.render': RenderExtension< + ActionExtensionApi<'admin.draft-order-index.action.render'>, + AllComponents + >; + + /** + * Renders an Admin Action in the order fulfilled card. Open this extension from the "3-dot" menu inside the order fulfilled card. + * Note: This extension will only be visible in orders which were fulfilled by the same app as the extension. + * + * See the [list of available components](/docs/api/admin-extensions/components). + */ + 'admin.order-fulfilled-card.action.render': RenderExtension< + ActionExtensionApi<'admin.order-fulfilled-card.action.render'>, + AllComponents + >; + // Bulk Actions /** @@ -203,6 +284,16 @@ export interface ExtensionTargets { AllComponents >; + /** + * Renders an Admin Action in the draft order page when multiple resources are selected. Open this extension from the "3-dot" menu. + * + * See the [list of available components](/docs/api/admin-extensions/components). + */ + 'admin.draft-order-index.selection-action.render': RenderExtension< + ActionExtensionApi<'admin.draft-order-index.selection-action.render'>, + AllComponents + >; + /** * Renders Product Configuration on product details and product variant details * From ec75f14e6a114f6e72d1c94ed76e049df7479a67 Mon Sep 17 00:00:00 2001 From: Josh White Date: Thu, 21 Mar 2024 14:36:38 -0400 Subject: [PATCH 2/7] add definition for discount details --- .../src/surfaces/admin/extension-targets.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/ui-extensions/src/surfaces/admin/extension-targets.ts b/packages/ui-extensions/src/surfaces/admin/extension-targets.ts index 6ffb405e1..12b295ef2 100644 --- a/packages/ui-extensions/src/surfaces/admin/extension-targets.ts +++ b/packages/ui-extensions/src/surfaces/admin/extension-targets.ts @@ -241,6 +241,16 @@ export interface ExtensionTargets { AllComponents >; + /** + * Renders an Admin Action in the discount details page. Open this extension from the "More Actions" menu. + * + * See the [list of available components](/docs/api/admin-extensions/components). + */ + 'admin.discount-details.action.render': RenderExtension< + ActionExtensionApi<'admin.discount-details.action.render'>, + AllComponents + >; + /** * Renders an Admin Action in the order fulfilled card. Open this extension from the "3-dot" menu inside the order fulfilled card. * Note: This extension will only be visible in orders which were fulfilled by the same app as the extension. From 216c669df00d373c885c4f9623174c540c2b1d97 Mon Sep 17 00:00:00 2001 From: Josh White Date: Thu, 21 Mar 2024 15:23:56 -0400 Subject: [PATCH 3/7] lower case admin action to follow style guide --- .../src/surfaces/admin/extension-targets.ts | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/packages/ui-extensions/src/surfaces/admin/extension-targets.ts b/packages/ui-extensions/src/surfaces/admin/extension-targets.ts index 12b295ef2..66cf38521 100644 --- a/packages/ui-extensions/src/surfaces/admin/extension-targets.ts +++ b/packages/ui-extensions/src/surfaces/admin/extension-targets.ts @@ -102,7 +102,7 @@ export interface ExtensionTargets { // Actions /** - * Renders an Admin Action in the product details page. Open this extension from the "More Actions" menu. + * Renders an admin action in the product details page. Open this extension from the "More Actions" menu. * * See the [list of available components](/docs/api/admin-extensions/components). */ @@ -112,7 +112,7 @@ export interface ExtensionTargets { >; /** - * Renders an Admin Action in the order details page. Open this extension from the "More Actions" menu. + * Renders an admin action in the order details page. Open this extension from the "More Actions" menu. * * See the [list of available components](/docs/api/admin-extensions/components). */ @@ -122,7 +122,7 @@ export interface ExtensionTargets { >; /** - * Renders an Admin Action in the customer details page. Open this extension from the "More Actions" menu. + * Renders an admin action in the customer details page. Open this extension from the "More Actions" menu. * * See the [list of available components](/docs/api/admin-extensions/components). */ @@ -132,7 +132,7 @@ export interface ExtensionTargets { >; /** - * Renders an Admin Action in the customer segment details page. Open this extension from the "Use segment" button. + * Renders an admin action in the customer segment details page. Open this extension from the "Use segment" button. * * See the [list of available components](/docs/api/admin-extensions/components). */ @@ -142,7 +142,7 @@ export interface ExtensionTargets { >; /** - * Renders an Admin Action in the product index page. Open this extension from the "More Actions" menu. + * Renders an admin action in the product index page. Open this extension from the "More Actions" menu. * * See the [list of available components](/docs/api/admin-extensions/components). */ @@ -152,7 +152,7 @@ export interface ExtensionTargets { >; /** - * Renders an Admin Action in the order index page. Open this extension from the "More Actions" menu. + * Renders an admin action in the order index page. Open this extension from the "More Actions" menu. * * See the [list of available components](/docs/api/admin-extensions/components). */ @@ -162,7 +162,7 @@ export interface ExtensionTargets { >; /** - * Renders an Admin Action in the customer index page. Open this extension from the "More Actions" menu. + * Renders an admin action in the customer index page. Open this extension from the "More Actions" menu. * * See the [list of available components](/docs/api/admin-extensions/components). */ @@ -172,7 +172,7 @@ export interface ExtensionTargets { >; /** - * Renders an Admin Action in the discount index page. Open this extension from the "More Actions" menu. + * Renders an admin action in the discount index page. Open this extension from the "More Actions" menu. * * See the [list of available components](/docs/api/admin-extensions/components). */ @@ -182,7 +182,7 @@ export interface ExtensionTargets { >; /** - * Renders an Admin Action in the collection details page. Open this extension from the "More Actions" menu. + * Renders an admin action in the collection details page. Open this extension from the "More Actions" menu. * * See the [list of available components](/docs/api/admin-extensions/components). */ @@ -192,7 +192,7 @@ export interface ExtensionTargets { >; /** - * Renders an Admin Action in the collection index page. Open this extension from the "More Actions" menu. + * Renders an admin action in the collection index page. Open this extension from the "More Actions" menu. * * See the [list of available components](/docs/api/admin-extensions/components). */ @@ -202,7 +202,7 @@ export interface ExtensionTargets { >; /** - * Renders an Admin Action in the abandonded checkout page. Open this extension from the "More Actions" menu. + * Renders an admin action in the abandonded checkout page. Open this extension from the "More Actions" menu. * * See the [list of available components](/docs/api/admin-extensions/components). */ @@ -212,7 +212,7 @@ export interface ExtensionTargets { >; /** - * Renders an Admin Action in the product variant details page. Open this extension from the "More Actions" menu. + * Renders an admin action in the product variant details page. Open this extension from the "More Actions" menu. * * See the [list of available components](/docs/api/admin-extensions/components). */ @@ -222,7 +222,7 @@ export interface ExtensionTargets { >; /** - * Renders an Admin Action in the draft order details page. Open this extension from the "More Actions" menu. + * Renders an admin action in the draft order details page. Open this extension from the "More Actions" menu. * * See the [list of available components](/docs/api/admin-extensions/components). */ @@ -232,7 +232,7 @@ export interface ExtensionTargets { >; /** - * Renders an Admin Action in the draft orders page. Open this extension from the "More Actions" menu. + * Renders an admin action in the draft orders page. Open this extension from the "More Actions" menu. * * See the [list of available components](/docs/api/admin-extensions/components). */ @@ -242,7 +242,7 @@ export interface ExtensionTargets { >; /** - * Renders an Admin Action in the discount details page. Open this extension from the "More Actions" menu. + * Renders an admin action in the discount details page. Open this extension from the "More Actions" menu. * * See the [list of available components](/docs/api/admin-extensions/components). */ @@ -252,7 +252,7 @@ export interface ExtensionTargets { >; /** - * Renders an Admin Action in the order fulfilled card. Open this extension from the "3-dot" menu inside the order fulfilled card. + * Renders an admin action in the order fulfilled card. Open this extension from the "3-dot" menu inside the order fulfilled card. * Note: This extension will only be visible in orders which were fulfilled by the same app as the extension. * * See the [list of available components](/docs/api/admin-extensions/components). @@ -265,7 +265,7 @@ export interface ExtensionTargets { // Bulk Actions /** - * Renders an Admin Action in the product 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 in the product 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). */ @@ -275,7 +275,7 @@ export interface ExtensionTargets { >; /** - * Renders an Admin Action in the order 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 in the order 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). */ @@ -285,7 +285,7 @@ export interface ExtensionTargets { >; /** - * Renders an Admin Action 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 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). */ @@ -295,7 +295,7 @@ export interface ExtensionTargets { >; /** - * Renders an Admin Action in the draft order page when multiple resources are selected. Open this extension from the "3-dot" menu. + * Renders an admin action in the draft order page when multiple resources are selected. Open this extension from the "3-dot" menu. * * See the [list of available components](/docs/api/admin-extensions/components). */ From 83033978ff3121b6c7b74daee80722d0363801fa Mon Sep 17 00:00:00 2001 From: Josh White Date: Mon, 25 Mar 2024 11:08:59 -0400 Subject: [PATCH 4/7] reword description of order-fulfilled-card --- packages/ui-extensions/src/surfaces/admin/extension-targets.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/ui-extensions/src/surfaces/admin/extension-targets.ts b/packages/ui-extensions/src/surfaces/admin/extension-targets.ts index 66cf38521..2c86051d8 100644 --- a/packages/ui-extensions/src/surfaces/admin/extension-targets.ts +++ b/packages/ui-extensions/src/surfaces/admin/extension-targets.ts @@ -253,7 +253,7 @@ export interface ExtensionTargets { /** * Renders an admin action in the order fulfilled card. Open this extension from the "3-dot" menu inside the order fulfilled card. - * Note: This extension will only be visible in orders which were fulfilled by the same app as the extension. + * Note: This extension will only be visible on orders which were fulfilled by your app. * * See the [list of available components](/docs/api/admin-extensions/components). */ From 10f4e4b27f70eae0974365351691eb5d726e56d8 Mon Sep 17 00:00:00 2001 From: Josh White Date: Mon, 25 Mar 2024 11:15:12 -0400 Subject: [PATCH 5/7] reword all action extension descriptions to explicitly say admin action extension --- .../src/surfaces/admin/extension-targets.ts | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/packages/ui-extensions/src/surfaces/admin/extension-targets.ts b/packages/ui-extensions/src/surfaces/admin/extension-targets.ts index 2c86051d8..bb3a7ace8 100644 --- a/packages/ui-extensions/src/surfaces/admin/extension-targets.ts +++ b/packages/ui-extensions/src/surfaces/admin/extension-targets.ts @@ -102,7 +102,7 @@ export interface ExtensionTargets { // Actions /** - * Renders an admin action in the product details page. Open this extension from the "More Actions" menu. + * Renders an admin action extension in the product details page. Open this extension from the "More Actions" menu. * * See the [list of available components](/docs/api/admin-extensions/components). */ @@ -112,7 +112,7 @@ export interface ExtensionTargets { >; /** - * Renders an admin action in the order details page. Open this extension from the "More Actions" menu. + * Renders an admin action extension in the order details page. Open this extension from the "More Actions" menu. * * See the [list of available components](/docs/api/admin-extensions/components). */ @@ -122,7 +122,7 @@ export interface ExtensionTargets { >; /** - * Renders an admin action in the customer details page. Open this extension from the "More Actions" menu. + * Renders an admin action extension in the customer details page. Open this extension from the "More Actions" menu. * * See the [list of available components](/docs/api/admin-extensions/components). */ @@ -132,7 +132,7 @@ export interface ExtensionTargets { >; /** - * Renders an admin action in the customer segment details page. Open this extension from the "Use segment" button. + * Renders an admin action extension in the customer segment details page. Open this extension from the "Use segment" button. * * See the [list of available components](/docs/api/admin-extensions/components). */ @@ -142,7 +142,7 @@ export interface ExtensionTargets { >; /** - * Renders an admin action in the product index page. Open this extension from the "More Actions" menu. + * Renders an admin action extension in the product index page. Open this extension from the "More Actions" menu. * * See the [list of available components](/docs/api/admin-extensions/components). */ @@ -152,7 +152,7 @@ export interface ExtensionTargets { >; /** - * Renders an admin action in the order index page. Open this extension from the "More Actions" menu. + * Renders an admin action extension in the order index page. Open this extension from the "More Actions" menu. * * See the [list of available components](/docs/api/admin-extensions/components). */ @@ -162,7 +162,7 @@ export interface ExtensionTargets { >; /** - * Renders an admin action in the customer index page. Open this extension from the "More Actions" menu. + * Renders an admin action extension in the customer index page. Open this extension from the "More Actions" menu. * * See the [list of available components](/docs/api/admin-extensions/components). */ @@ -172,7 +172,7 @@ export interface ExtensionTargets { >; /** - * Renders an admin action in the discount index page. Open this extension from the "More Actions" menu. + * Renders an admin action extension in the discount index page. Open this extension from the "More Actions" menu. * * See the [list of available components](/docs/api/admin-extensions/components). */ @@ -182,7 +182,7 @@ export interface ExtensionTargets { >; /** - * Renders an admin action in the collection details page. Open this extension from the "More Actions" menu. + * Renders an admin action extension in the collection details page. Open this extension from the "More Actions" menu. * * See the [list of available components](/docs/api/admin-extensions/components). */ @@ -192,7 +192,7 @@ export interface ExtensionTargets { >; /** - * Renders an admin action in the collection index page. Open this extension from the "More Actions" menu. + * Renders an admin action extension in the collection index page. Open this extension from the "More Actions" menu. * * See the [list of available components](/docs/api/admin-extensions/components). */ @@ -202,7 +202,7 @@ export interface ExtensionTargets { >; /** - * Renders an admin action in the abandonded checkout page. Open this extension from the "More Actions" menu. + * Renders an admin action extension in the abandonded checkout page. Open this extension from the "More Actions" menu. * * See the [list of available components](/docs/api/admin-extensions/components). */ @@ -212,7 +212,7 @@ export interface ExtensionTargets { >; /** - * Renders an admin action in the product variant details page. Open this extension from the "More Actions" menu. + * Renders an admin action extension in the product variant details page. Open this extension from the "More Actions" menu. * * See the [list of available components](/docs/api/admin-extensions/components). */ @@ -222,7 +222,7 @@ export interface ExtensionTargets { >; /** - * Renders an admin action in the draft order details page. Open this extension from the "More Actions" menu. + * Renders an admin action extension in the draft order details page. Open this extension from the "More Actions" menu. * * See the [list of available components](/docs/api/admin-extensions/components). */ @@ -232,7 +232,7 @@ export interface ExtensionTargets { >; /** - * Renders an admin action in the draft orders page. Open this extension from the "More Actions" menu. + * Renders an admin action extension in the draft orders page. Open this extension from the "More Actions" menu. * * See the [list of available components](/docs/api/admin-extensions/components). */ @@ -242,7 +242,7 @@ export interface ExtensionTargets { >; /** - * Renders an admin action in the discount details page. Open this extension from the "More Actions" menu. + * Renders an admin action extension in the discount details page. Open this extension from the "More Actions" menu. * * See the [list of available components](/docs/api/admin-extensions/components). */ @@ -252,7 +252,7 @@ export interface ExtensionTargets { >; /** - * Renders an admin action in the order fulfilled card. Open this extension from the "3-dot" menu inside the order fulfilled card. + * Renders an admin action extension in the order fulfilled card. Open this extension from the "3-dot" menu inside the order fulfilled card. * Note: This extension will only be visible on orders which were fulfilled by your app. * * See the [list of available components](/docs/api/admin-extensions/components). @@ -265,7 +265,7 @@ export interface ExtensionTargets { // Bulk Actions /** - * Renders an admin action in the product 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 product 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). */ @@ -275,7 +275,7 @@ export interface ExtensionTargets { >; /** - * Renders an admin action in the order 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 order 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). */ @@ -285,7 +285,7 @@ export interface ExtensionTargets { >; /** - * Renders an admin action 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). */ @@ -295,7 +295,7 @@ export interface ExtensionTargets { >; /** - * Renders an admin action in the draft order page when multiple resources are selected. Open this extension from the "3-dot" menu. + * Renders an admin action extension in the draft order page when multiple resources are selected. Open this extension from the "3-dot" menu. * * See the [list of available components](/docs/api/admin-extensions/components). */ From 00a3a0c1e7bf1652410af586bfc29f685faa5b53 Mon Sep 17 00:00:00 2001 From: Josh White Date: Mon, 25 Mar 2024 17:49:32 -0400 Subject: [PATCH 6/7] rename variant details to product variant details --- .../ui-extensions/src/surfaces/admin/extension-targets.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/ui-extensions/src/surfaces/admin/extension-targets.ts b/packages/ui-extensions/src/surfaces/admin/extension-targets.ts index bb3a7ace8..0670ec4c7 100644 --- a/packages/ui-extensions/src/surfaces/admin/extension-targets.ts +++ b/packages/ui-extensions/src/surfaces/admin/extension-targets.ts @@ -216,8 +216,8 @@ export interface ExtensionTargets { * * See the [list of available components](/docs/api/admin-extensions/components). */ - 'admin.variant-details.action.render': RenderExtension< - ActionExtensionApi<'admin.variant-details.action.render'>, + 'admin.product-variant-details.action.render': RenderExtension< + ActionExtensionApi<'admin.product-variant-details.action.render'>, AllComponents >; From 947b4433a494c05a197aab6460ecff405df27163 Mon Sep 17 00:00:00 2001 From: Josh White Date: Tue, 26 Mar 2024 12:07:36 -0400 Subject: [PATCH 7/7] create changeset --- .changeset/tidy-coins-retire.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changeset/tidy-coins-retire.md diff --git a/.changeset/tidy-coins-retire.md b/.changeset/tidy-coins-retire.md new file mode 100644 index 000000000..aecf2bcfb --- /dev/null +++ b/.changeset/tidy-coins-retire.md @@ -0,0 +1,6 @@ +--- +'@shopify/ui-extensions': minor +'@shopify/ui-extensions-react': minor +--- + +add new targets for action extensions