Skip to content

Add assets config key support for UI extension points#7363

Open
JoshuaWhite1 wants to merge 1 commit intomainfrom
04-21-add_assets_config_key_support_for_ui_extension_points
Open

Add assets config key support for UI extension points#7363
JoshuaWhite1 wants to merge 1 commit intomainfrom
04-21-add_assets_config_key_support_for_ui_extension_points

Conversation

@JoshuaWhite1
Copy link
Copy Markdown

@JoshuaWhite1 JoshuaWhite1 commented Apr 21, 2026

Part of https://github.com/shop/issues-admin-extensibility/issues/2439

WHY are these changes introduced?

Adds support for an assets field on UI extension points, allowing extension point configurations to declare associated assets.

WHAT is this pull request doing?

  • Adds an optional assets field to NewExtensionPointSchema in the extension schemas
  • Passes the assets property through when transforming extension point targeting configurations in UIExtensionSchema
  • Registers extension_points[].assets as a configKey in the UI extension specification so it is properly grouped and tracked per extension point target
  • Updates DevNewExtensionPointSchema to omit assets from the base type and redefine it as a map of named Asset objects (with lastUpdated), preserving the existing dev payload structure while accommodating the new schema field

How to test your changes?

  1. Create a UI extension with extension points that include an assets field in the configuration
  2. Run shopify app dev and verify the extension point payload includes the assets field correctly
  3. Verify that the dev server payload maps assets to the expected { [name: string]: Asset } structure

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes
  • I've considered analytics changes to measure impact
  • The change is user-facing — I've identified the correct bump type (patch for bug fixes · minor for new features · major for breaking changes) and added a changeset with pnpm changeset add

Copy link
Copy Markdown
Author

JoshuaWhite1 commented Apr 21, 2026

Base automatically changed from 04-17-support_bundle_folder_in_the_bundle_ui_step_config to main April 22, 2026 10:19
@elanalynn elanalynn force-pushed the 04-21-add_assets_config_key_support_for_ui_extension_points branch from f12da72 to 61822d3 Compare April 22, 2026 14:53
@elanalynn elanalynn marked this pull request as ready for review April 22, 2026 16:22
@elanalynn elanalynn requested a review from a team as a code owner April 22, 2026 16:23
Copilot AI review requested due to automatic review settings April 22, 2026 16:23
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds support for an assets field on UI extension point configurations so that assets can be declared per extension point target and carried through schema transforms and config key tracking.

Changes:

  • Adds assets to the base NewExtensionPointSchema Zod schema.
  • Passes assets through when building extension_points in UIExtensionSchema.
  • Registers extension_points[].assets as a configKey and adjusts dev payload typing to keep the existing {[name]: Asset} structure.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
packages/app/src/cli/services/dev/extension/payload/models.ts Updates dev extension point typing to omit base assets and redefine it as a named-asset map.
packages/app/src/cli/models/extensions/specifications/ui_extension.ts Threads assets through extension point targeting transform and registers it as a tracked config key.
packages/app/src/cli/models/extensions/schemas.ts Introduces assets on NewExtensionPointSchema.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/app/src/cli/models/extensions/schemas.ts
Comment thread packages/app/src/cli/services/dev/extension/payload/models.ts
@elanalynn elanalynn force-pushed the 04-21-add_assets_config_key_support_for_ui_extension_points branch from 61822d3 to 94bc002 Compare April 22, 2026 16:38
@JoshuaWhite1 JoshuaWhite1 force-pushed the 04-21-add_assets_config_key_support_for_ui_extension_points branch from 94bc002 to bf935ec Compare April 22, 2026 19:59
Copy link
Copy Markdown
Member

@vividviolet vividviolet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tophat'd together with @JoshuaWhite1 - working great with upcoming Core changes.

I also tested that we get a proper error when trying to set assets on a block ui extension (not supported)

Image

groupBy: 'target',
key: 'extension_points[].intents[].schema',
},
{
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look how easy it was to set this up for ui-extension. Good job @alfonso-noriega @isaacroldan!

@elanalynn elanalynn force-pushed the 04-21-add_assets_config_key_support_for_ui_extension_points branch from bf935ec to 04932cc Compare April 22, 2026 21:34
@elanalynn elanalynn force-pushed the 04-21-add_assets_config_key_support_for_ui_extension_points branch from 04932cc to 8d94171 Compare April 23, 2026 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants