Shopify / ui-extensions

MIT License
269 stars 35 forks source link

Add shouldRender method to ui-extensions #2458

Closed elanalynn closed 4 days ago

elanalynn commented 2 weeks ago

Background

Part of the project for conditional rendering admin extensions, we need to introduce a shouldRender method to register the functions that control the rendering of the action extensions.

Solution

🎩

For complete e2e testing of conditional rendering, see instruction here.

You can just test that this version of ui-extensions works by pointing the reference in the extension's package.json "@shopify/ui-extensions": "0.0.0-snapshot-20241107212535".

You should be able to import the shouldRender method from @shopify/ui-extensions and use it in your extension.

Checklist

elanalynn commented 2 weeks ago

/snapit

shopify-github-actions-access[bot] commented 2 weeks ago

🫰✨ Thanks @elanalynn! Your snapshots have been published to npm.

Test the snapshots by updating your package.json with the newly published versions:

"@shopify/data-extensions": "0.0.0-snapshot-20241106220158",
"@shopify/ui-extensions": "0.0.0-snapshot-20241106220158",
"@shopify/ui-extensions-react": "0.0.0-snapshot-20241106220158"
elanalynn commented 2 weeks ago

/snapit

shopify-github-actions-access[bot] commented 2 weeks ago

🫰✨ Thanks @elanalynn! Your snapshots have been published to npm.

Test the snapshots by updating your package.json with the newly published versions:

"@shopify/data-extensions": "0.0.0-snapshot-20241107212535",
"@shopify/ui-extensions": "0.0.0-snapshot-20241107212535",
"@shopify/ui-extensions-react": "0.0.0-snapshot-20241107212535"
elanalynn commented 1 week ago

/snapit

shopify-github-actions-access[bot] commented 1 week ago

🫰✨ Thanks @elanalynn! Your snapshots have been published to npm.

Test the snapshots by updating your package.json with the newly published versions:

"@shopify/data-extensions": "0.0.0-snapshot-20241113210423",
"@shopify/ui-extensions": "0.0.0-snapshot-20241113210423",
"@shopify/ui-extensions-react": "0.0.0-snapshot-20241113210423"