Add assets config key support for UI extension points#7363
Add assets config key support for UI extension points#7363JoshuaWhite1 wants to merge 1 commit intomainfrom
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
f12da72 to
61822d3
Compare
There was a problem hiding this comment.
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
assetsto the baseNewExtensionPointSchemaZod schema. - Passes
assetsthrough when buildingextension_pointsinUIExtensionSchema. - Registers
extension_points[].assetsas aconfigKeyand 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.
61822d3 to
94bc002
Compare
94bc002 to
bf935ec
Compare
vividviolet
left a comment
There was a problem hiding this comment.
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)
| groupBy: 'target', | ||
| key: 'extension_points[].intents[].schema', | ||
| }, | ||
| { |
There was a problem hiding this comment.
Look how easy it was to set this up for ui-extension. Good job @alfonso-noriega @isaacroldan!
bf935ec to
04932cc
Compare
04932cc to
8d94171
Compare

Part of https://github.com/shop/issues-admin-extensibility/issues/2439
WHY are these changes introduced?
Adds support for an
assetsfield on UI extension points, allowing extension point configurations to declare associated assets.WHAT is this pull request doing?
assetsfield toNewExtensionPointSchemain the extension schemasassetsproperty through when transforming extension point targeting configurations inUIExtensionSchemaextension_points[].assetsas aconfigKeyin the UI extension specification so it is properly grouped and tracked per extension point targetDevNewExtensionPointSchemato omitassetsfrom the base type and redefine it as a map of namedAssetobjects (withlastUpdated), preserving the existing dev payload structure while accommodating the new schema fieldHow to test your changes?
assetsfield in the configurationshopify app devand verify the extension point payload includes theassetsfield correctlyassetsto the expected{ [name: string]: Asset }structureChecklist
patchfor bug fixes ·minorfor new features ·majorfor breaking changes) and added a changeset withpnpm changeset add