diff --git a/.changeset/calm-crabs-run.md b/.changeset/calm-crabs-run.md deleted file mode 100644 index 2f0bf859fb..0000000000 --- a/.changeset/calm-crabs-run.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@shopify/ui-extensions': patch -'@shopify/ui-extensions-react': patch ---- - -Homogenizes terminology to use the term "placement" in place of "supported location", "placement reference", and others. diff --git a/.changeset/famous-pillows-work.md b/.changeset/famous-pillows-work.md deleted file mode 100644 index 56b9fbb527..0000000000 --- a/.changeset/famous-pillows-work.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@shopify/ui-extensions': minor -'@shopify/ui-extensions-react': minor ---- - -Add new block extension targets: collection, draft-order, abandoned-checkout, and product-variant diff --git a/.changeset/fresh-shoes-buy.md b/.changeset/fresh-shoes-buy.md deleted file mode 100644 index a985427f35..0000000000 --- a/.changeset/fresh-shoes-buy.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@shopify/ui-extensions': minor -'@shopify/ui-extensions-react': minor ---- - -Updates Order Status API with `processedAt` attribute diff --git a/.changeset/happy-kings-shop.md b/.changeset/happy-kings-shop.md deleted file mode 100644 index 35566741ac..0000000000 --- a/.changeset/happy-kings-shop.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@shopify/ui-extensions': minor -'@shopify/ui-extensions-react': minor ---- - -- Adds `useCustomerPrivacy` hook. diff --git a/.changeset/hot-flowers-glow.md b/.changeset/hot-flowers-glow.md deleted file mode 100644 index 7dd2911d14..0000000000 --- a/.changeset/hot-flowers-glow.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@shopify/ui-extensions': patch ---- - -Moves `Capability` type to shared types file diff --git a/.changeset/hungry-beans-complain.md b/.changeset/hungry-beans-complain.md deleted file mode 100644 index bcbca2c33c..0000000000 --- a/.changeset/hungry-beans-complain.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@shopify/ui-extensions': minor ---- - -Adds `selectedCountryCode` to `AddressAutocompleteSuggestionApi`. diff --git a/.changeset/long-news-prove.md b/.changeset/long-news-prove.md deleted file mode 100644 index b8d1812fda..0000000000 --- a/.changeset/long-news-prove.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@shopify/ui-extensions': minor -'@shopify/ui-extensions-react': minor ---- - -Support split shipping in Shipping option list and item targets. diff --git a/.changeset/lovely-pots-scream.md b/.changeset/lovely-pots-scream.md deleted file mode 100644 index d57938df31..0000000000 --- a/.changeset/lovely-pots-scream.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@shopify/ui-extensions': patch ---- - -Add metafields to PickupLocationOption diff --git a/.changeset/nasty-hotels-press.md b/.changeset/nasty-hotels-press.md deleted file mode 100644 index 501e103738..0000000000 --- a/.changeset/nasty-hotels-press.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@shopify/ui-extensions': patch ---- - -Added `appMetafields` field to `AddressAutocompleteStandardApi` diff --git a/.changeset/new-pugs-shop.md b/.changeset/new-pugs-shop.md deleted file mode 100644 index 886a4c7e1a..0000000000 --- a/.changeset/new-pugs-shop.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@shopify/ui-extensions': patch -'@shopify/ui-extensions-react': patch ---- - -add authenticationState api to customer account ui extension diff --git a/.changeset/orange-ants-sniff.md b/.changeset/orange-ants-sniff.md deleted file mode 100644 index cb2bce7fcf..0000000000 --- a/.changeset/orange-ants-sniff.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@shopify/ui-extensions': minor -'@shopify/ui-extensions-react': minor ---- - -- Adds the ability to read and write tracking consent metafield data to the Customer Privacy API. -- Updates the `Sheet` component and examples. diff --git a/.changeset/serious-experts-admire.md b/.changeset/serious-experts-admire.md deleted file mode 100644 index 654e4394ed..0000000000 --- a/.changeset/serious-experts-admire.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@shopify/ui-extensions': minor -'@shopify/ui-extensions-react': minor ---- - -Add Extension Target for Reorder Flow diff --git a/.changeset/silver-jobs-sneeze.md b/.changeset/silver-jobs-sneeze.md deleted file mode 100644 index 350c1a6012..0000000000 --- a/.changeset/silver-jobs-sneeze.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@shopify/ui-extensions': patch -'@shopify/ui-extensions-react': patch ---- - -Add Switch component diff --git a/.changeset/rich-chicken-repeat.md b/.changeset/soft-clowns-turn.md similarity index 65% rename from .changeset/rich-chicken-repeat.md rename to .changeset/soft-clowns-turn.md index 8fe520a997..05c7fcd4aa 100644 --- a/.changeset/rich-chicken-repeat.md +++ b/.changeset/soft-clowns-turn.md @@ -1,6 +1,6 @@ --- -'@shopify/ui-extensions': patch '@shopify/ui-extensions-react': patch +'@shopify/ui-extensions': patch --- -Publish display property +update Screen.onReceiveParams description diff --git a/.changeset/swift-cherries-prove.md b/.changeset/swift-cherries-prove.md deleted file mode 100644 index ae38b3e329..0000000000 --- a/.changeset/swift-cherries-prove.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@shopify/ui-extensions': minor ---- - -Add resource picker to admin block extension diff --git a/.changeset/tall-cows-explain.md b/.changeset/tall-cows-explain.md deleted file mode 100644 index 2df41a95cf..0000000000 --- a/.changeset/tall-cows-explain.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@shopify/ui-extensions': minor -'@shopify/ui-extensions-react': minor ---- - -Add AdminPrintAction component diff --git a/.changeset/tall-fireants-sleep.md b/.changeset/tall-fireants-sleep.md deleted file mode 100644 index fecf4f508e..0000000000 --- a/.changeset/tall-fireants-sleep.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@shopify/ui-extensions': minor -'@shopify/ui-extensions-react': minor ---- - -Add admin print action targets diff --git a/.changeset/twelve-otters-think.md b/.changeset/twelve-otters-think.md deleted file mode 100644 index eee10eb572..0000000000 --- a/.changeset/twelve-otters-think.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@shopify/ui-extensions': patch -'@shopify/ui-extensions-react': patch ---- - -Improve error messaging when a React hook is used from a different API surface than the extension calling it. diff --git a/.changeset/violet-flowers-deny.md b/.changeset/violet-flowers-deny.md deleted file mode 100644 index 5d52c8063f..0000000000 --- a/.changeset/violet-flowers-deny.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -'@shopify/ui-extensions-react': minor -'@shopify/ui-extensions': minor ---- - -- Adds `oneTimeUse` to `ShippingAddress` to denote whether the address can be saved in checkout. -- Adds `sku` to `ProductVariant` in checkout. -- Adds `bullet` icon in checkout. diff --git a/.changeset/weak-snakes-ring.md b/.changeset/weak-snakes-ring.md deleted file mode 100644 index 6060826629..0000000000 --- a/.changeset/weak-snakes-ring.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@shopify/ui-extensions': patch ---- - -- Add code examples for custom address autocomplete extensions -- Update documentation for custom address autocomplete extensions -- Misc. type updates and documentation updates diff --git a/.changeset/yellow-lions-behave.md b/.changeset/yellow-lions-behave.md deleted file mode 100644 index 7749c62070..0000000000 --- a/.changeset/yellow-lions-behave.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@shopify/ui-extensions': minor -'@shopify/ui-extensions-react': minor ---- - -- Adds `purchase.address-autocomplete.suggest` extension target -- Adds the `primaryAction` and `secondaryAction` to the `Sheet` component diff --git a/.github/workflows/changesets-reminder.yml b/.github/workflows/changesets-reminder.yml index 2ecf41ee1f..b7d9d99748 100644 --- a/.github/workflows/changesets-reminder.yml +++ b/.github/workflows/changesets-reminder.yml @@ -9,6 +9,7 @@ on: - 2023-10 - 2024-01 - 2024-04 + - 2024-07 - unstable paths: - 'packages/*/src/**' diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 39f064cb82..091281aff4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: - id: typescript-cache name: Restore TypeScript cache - uses: actions/cache@v1 + uses: actions/cache@v4 with: path: | packages/*/build/ts @@ -31,7 +31,7 @@ jobs: - id: jest-cache name: Restore jest cache - uses: actions/cache@v1 + uses: actions/cache@v4 with: path: .loom/cache/jest/ key: ${{ runner.os }}-jest-v1-${{ github.sha }} @@ -50,7 +50,7 @@ jobs: - id: eslint-cache name: Restore ESLint cache - uses: actions/cache@v1 + uses: actions/cache@v4 with: path: .loom/cache/eslint key: ${{ runner.os }}-eslint-v1-${{ github.sha }} @@ -59,3 +59,14 @@ jobs: - name: Lint run: yarn lint + + test-build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - uses: ./.github/workflows/actions/prepare + + - id: test-build + name: Build docs locally to ensure they can be built in CI + run: yarn docs:admin diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 3b8f0fcc15..d05bd008d7 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -8,6 +8,7 @@ on: - 2023-10 - 2024-01 - 2024-04 + - 2024-07 concurrency: ${{ github.workflow }}-${{ github.ref }} diff --git a/package.json b/package.json index 919ecb73f8..6e662979cb 100644 --- a/package.json +++ b/package.json @@ -50,6 +50,6 @@ "prettier": "^2.8.0", "react": ">=18.0.0", "typescript": "^4.9.0", - "@shopify/generate-docs": "0.16.0" + "@shopify/generate-docs": "0.16.4" } } diff --git a/packages/ui-extensions-react/CHANGELOG.md b/packages/ui-extensions-react/CHANGELOG.md index 1a8f30bd8e..d66245b284 100644 --- a/packages/ui-extensions-react/CHANGELOG.md +++ b/packages/ui-extensions-react/CHANGELOG.md @@ -1,5 +1,54 @@ # @shopify/ui-extensions-react +## 2024.7.0 + +### Minor Changes + +- [#1888](https://github.com/Shopify/ui-extensions/pull/1888) [`199a90fef0f4ce90a8f6ae6a8298c9d9c437f2f4`](https://github.com/Shopify/ui-extensions/commit/199a90fef0f4ce90a8f6ae6a8298c9d9c437f2f4) Thanks [@elanalynn](https://github.com/elanalynn)! - Add new block extension targets: collection, draft-order, abandoned-checkout, and product-variant + +- [#1981](https://github.com/Shopify/ui-extensions/pull/1981) [`ba2510f0f4737a56abe4171a08b8adea4488f8b4`](https://github.com/Shopify/ui-extensions/commit/ba2510f0f4737a56abe4171a08b8adea4488f8b4) Thanks [@shopify-github-actions-access](https://github.com/apps/shopify-github-actions-access)! - Updates Order Status API with `processedAt` attribute + +- [#1987](https://github.com/Shopify/ui-extensions/pull/1987) [`952489d3c27a2f5c8bcdad29e516480fe71e94e8`](https://github.com/Shopify/ui-extensions/commit/952489d3c27a2f5c8bcdad29e516480fe71e94e8) Thanks [@rcaplanshopify](https://github.com/rcaplanshopify)! - - Adds `useCustomerPrivacy` hook. + +- [#2144](https://github.com/Shopify/ui-extensions/pull/2144) [`321749e68edf6d64a82ffe2c4c99d0f19ac4e63c`](https://github.com/Shopify/ui-extensions/commit/321749e68edf6d64a82ffe2c4c99d0f19ac4e63c) Thanks [@jamesvidler](https://github.com/jamesvidler)! - Added `CartInstructions` (accessed using `api.instructions`) to checkout. These represent the cart instructions used to create the checkout and possibly limit extension capabilities. These instructions should be checked prior to performing any actions that may be affected by them. + + For example, if you intend to add a discount code via the `applyDiscountCodeChange` method, check `api.instructions.discounts.canUpdateDiscountCodes` to ensure it's supported in this checkout. + +- [#2067](https://github.com/Shopify/ui-extensions/pull/2067) [`3c3505c16c1deb6f202cbecf6747c0fdc6b79228`](https://github.com/Shopify/ui-extensions/commit/3c3505c16c1deb6f202cbecf6747c0fdc6b79228) Thanks [@shopify-github-actions-access](https://github.com/apps/shopify-github-actions-access)! - Support split shipping in Shipping option list and item targets. + +- [#1924](https://github.com/Shopify/ui-extensions/pull/1924) [`a4f275abcb0c0166e0383fc5c1ed544b938def29`](https://github.com/Shopify/ui-extensions/commit/a4f275abcb0c0166e0383fc5c1ed544b938def29) Thanks [@rcaplanshopify](https://github.com/rcaplanshopify)! - - Adds the ability to read and write tracking consent metafield data to the Customer Privacy API. + + - Updates the `Sheet` component and examples. + +- [#1807](https://github.com/Shopify/ui-extensions/pull/1807) [`08067cbba140d72f115e38f218dd0caead13f0d5`](https://github.com/Shopify/ui-extensions/commit/08067cbba140d72f115e38f218dd0caead13f0d5) Thanks [@nataliejeong](https://github.com/nataliejeong)! - Add Extension Target for Reorder Flow + +- [#2040](https://github.com/Shopify/ui-extensions/pull/2040) [`c8d876e83f3144361e09c375c3dc89af2029655b`](https://github.com/Shopify/ui-extensions/commit/c8d876e83f3144361e09c375c3dc89af2029655b) Thanks [@elanalynn](https://github.com/elanalynn)! - Add AdminPrintAction component + +- [#2065](https://github.com/Shopify/ui-extensions/pull/2065) [`c2c51b82135fadf9dd4a2b1ad95dc59cabd9064c`](https://github.com/Shopify/ui-extensions/commit/c2c51b82135fadf9dd4a2b1ad95dc59cabd9064c) Thanks [@elanalynn](https://github.com/elanalynn)! - Add admin print action targets + +- [#2118](https://github.com/Shopify/ui-extensions/pull/2118) [`0016e7e5031934e21b26398958d69b97a20ccebd`](https://github.com/Shopify/ui-extensions/commit/0016e7e5031934e21b26398958d69b97a20ccebd) Thanks [@shopify-github-actions-access](https://github.com/apps/shopify-github-actions-access)! - - Adds `oneTimeUse` to `ShippingAddress` to denote whether the address can be saved in checkout. + + - Adds `sku` to `ProductVariant` in checkout. + - Adds `bullet` icon in checkout. + +- [#1916](https://github.com/Shopify/ui-extensions/pull/1916) [`f9a593edd7bc6ea9f46f3927efd3b9fa6ebc5b5a`](https://github.com/Shopify/ui-extensions/commit/f9a593edd7bc6ea9f46f3927efd3b9fa6ebc5b5a) Thanks [@mleandres](https://github.com/mleandres)! - - Adds `purchase.address-autocomplete.suggest` extension target + - Adds the `primaryAction` and `secondaryAction` to the `Sheet` component + +### Patch Changes + +- [#2015](https://github.com/Shopify/ui-extensions/pull/2015) [`5ded8d2cb5d9ae502aa75183714f84dc92b820ea`](https://github.com/Shopify/ui-extensions/commit/5ded8d2cb5d9ae502aa75183714f84dc92b820ea) Thanks [@PSalmers](https://github.com/PSalmers)! - Homogenizes terminology to use the term "placement" in place of "supported location", "placement reference", and others. + +- [#2037](https://github.com/Shopify/ui-extensions/pull/2037) [`0fd33b35c651b89d24c4fc560f376e91658d70a6`](https://github.com/Shopify/ui-extensions/commit/0fd33b35c651b89d24c4fc560f376e91658d70a6) Thanks [@brianshen1990](https://github.com/brianshen1990)! - add authenticationState api to customer account ui extension + +- [#2053](https://github.com/Shopify/ui-extensions/pull/2053) [`9c1777d48e0d81fea811cfbcd9764e98cf65778d`](https://github.com/Shopify/ui-extensions/commit/9c1777d48e0d81fea811cfbcd9764e98cf65778d) Thanks [@ncardeli](https://github.com/ncardeli)! - Publish display property + +- [#2014](https://github.com/Shopify/ui-extensions/pull/2014) [`ac077c8becee6f02fbb4fd9f04d029dbf9b838f2`](https://github.com/Shopify/ui-extensions/commit/ac077c8becee6f02fbb4fd9f04d029dbf9b838f2) Thanks [@oliverigor](https://github.com/oliverigor)! - Add Switch component + +- [#1942](https://github.com/Shopify/ui-extensions/pull/1942) [`b086046068ccb984b37c92a4e17378ada1774524`](https://github.com/Shopify/ui-extensions/commit/b086046068ccb984b37c92a4e17378ada1774524) Thanks [@jamesvidler](https://github.com/jamesvidler)! - Improve error messaging when a React hook is used from a different API surface than the extension calling it. + +- Updated dependencies [[`5ded8d2cb5d9ae502aa75183714f84dc92b820ea`](https://github.com/Shopify/ui-extensions/commit/5ded8d2cb5d9ae502aa75183714f84dc92b820ea), [`199a90fef0f4ce90a8f6ae6a8298c9d9c437f2f4`](https://github.com/Shopify/ui-extensions/commit/199a90fef0f4ce90a8f6ae6a8298c9d9c437f2f4), [`ba2510f0f4737a56abe4171a08b8adea4488f8b4`](https://github.com/Shopify/ui-extensions/commit/ba2510f0f4737a56abe4171a08b8adea4488f8b4), [`952489d3c27a2f5c8bcdad29e516480fe71e94e8`](https://github.com/Shopify/ui-extensions/commit/952489d3c27a2f5c8bcdad29e516480fe71e94e8), [`321749e68edf6d64a82ffe2c4c99d0f19ac4e63c`](https://github.com/Shopify/ui-extensions/commit/321749e68edf6d64a82ffe2c4c99d0f19ac4e63c), [`a87b8f3ac19ba9db78ed5933c2e0099195dc8c5b`](https://github.com/Shopify/ui-extensions/commit/a87b8f3ac19ba9db78ed5933c2e0099195dc8c5b), [`47512e33ddfb3d99a48fbcebdd20647cbc149fd7`](https://github.com/Shopify/ui-extensions/commit/47512e33ddfb3d99a48fbcebdd20647cbc149fd7), [`3c3505c16c1deb6f202cbecf6747c0fdc6b79228`](https://github.com/Shopify/ui-extensions/commit/3c3505c16c1deb6f202cbecf6747c0fdc6b79228), [`0c05f0d17d91a9cb7ad61f1806d7d0a20bd09912`](https://github.com/Shopify/ui-extensions/commit/0c05f0d17d91a9cb7ad61f1806d7d0a20bd09912), [`c30a9639a5209862f4177f26ef3bc26e299c3c7b`](https://github.com/Shopify/ui-extensions/commit/c30a9639a5209862f4177f26ef3bc26e299c3c7b), [`0fd33b35c651b89d24c4fc560f376e91658d70a6`](https://github.com/Shopify/ui-extensions/commit/0fd33b35c651b89d24c4fc560f376e91658d70a6), [`a4f275abcb0c0166e0383fc5c1ed544b938def29`](https://github.com/Shopify/ui-extensions/commit/a4f275abcb0c0166e0383fc5c1ed544b938def29), [`9c1777d48e0d81fea811cfbcd9764e98cf65778d`](https://github.com/Shopify/ui-extensions/commit/9c1777d48e0d81fea811cfbcd9764e98cf65778d), [`08067cbba140d72f115e38f218dd0caead13f0d5`](https://github.com/Shopify/ui-extensions/commit/08067cbba140d72f115e38f218dd0caead13f0d5), [`ac077c8becee6f02fbb4fd9f04d029dbf9b838f2`](https://github.com/Shopify/ui-extensions/commit/ac077c8becee6f02fbb4fd9f04d029dbf9b838f2), [`bf839358269255bb6a86fd9a64295b4ea89d6004`](https://github.com/Shopify/ui-extensions/commit/bf839358269255bb6a86fd9a64295b4ea89d6004), [`c8d876e83f3144361e09c375c3dc89af2029655b`](https://github.com/Shopify/ui-extensions/commit/c8d876e83f3144361e09c375c3dc89af2029655b), [`c2c51b82135fadf9dd4a2b1ad95dc59cabd9064c`](https://github.com/Shopify/ui-extensions/commit/c2c51b82135fadf9dd4a2b1ad95dc59cabd9064c), [`b086046068ccb984b37c92a4e17378ada1774524`](https://github.com/Shopify/ui-extensions/commit/b086046068ccb984b37c92a4e17378ada1774524), [`0016e7e5031934e21b26398958d69b97a20ccebd`](https://github.com/Shopify/ui-extensions/commit/0016e7e5031934e21b26398958d69b97a20ccebd), [`a744908ee0cedbc627a7bfac18294f34cad8746d`](https://github.com/Shopify/ui-extensions/commit/a744908ee0cedbc627a7bfac18294f34cad8746d), [`f9a593edd7bc6ea9f46f3927efd3b9fa6ebc5b5a`](https://github.com/Shopify/ui-extensions/commit/f9a593edd7bc6ea9f46f3927efd3b9fa6ebc5b5a)]: + - @shopify/ui-extensions@2024.7.0 + ## 2024.4.0 ### Minor Changes diff --git a/packages/ui-extensions-react/package.json b/packages/ui-extensions-react/package.json index d7523dc844..89cb58d80b 100644 --- a/packages/ui-extensions-react/package.json +++ b/packages/ui-extensions-react/package.json @@ -1,6 +1,6 @@ { "name": "@shopify/ui-extensions-react", - "version": "0.0.0-unstable", + "version": "2024.7.0", "description": "React bindings for @shopify/ui-extensions", "publishConfig": { "access": "public", @@ -66,7 +66,7 @@ "@types/react": ">=18.2.67" }, "peerDependencies": { - "@shopify/ui-extensions": "0.0.0-unstable", + "@shopify/ui-extensions": "2024.7.0", "react": ">=18.0.0" }, "peerDependenciesMeta": { @@ -80,7 +80,7 @@ "devDependencies": { "@faker-js/faker": "^8.4.1", "@quilted/react-testing": "^0.5.31", - "@shopify/ui-extensions": "0.0.0-unstable", + "@shopify/ui-extensions": "2024.7.0", "react": "^18.0.0", "react-reconciler": "0.29.0", "react-test-renderer": "^18.2.0" diff --git a/packages/ui-extensions-react/src/surfaces/admin/components/AdminAction/examples/adminaction-form.example.tsx b/packages/ui-extensions-react/src/surfaces/admin/components/AdminAction/examples/adminaction-form.example.tsx new file mode 100644 index 0000000000..94b5ca6864 --- /dev/null +++ b/packages/ui-extensions-react/src/surfaces/admin/components/AdminAction/examples/adminaction-form.example.tsx @@ -0,0 +1,48 @@ +import React from 'react'; +import {reactExtension, useApi, AdminAction, Button, TextField, Select, BlockStack} from '@shopify/ui-extensions-react/admin'; + +function App() { + const {data, close} = useApi('admin.product-details.action.render'); + const productId = data.selected[0]?.id; + + return ( + { + await fetch('/api/products/assign-warehouse', { + method: 'POST', + headers: {'Content-Type': 'application/json'}, + body: JSON.stringify({productId}), + }); + close(); + }} + > + Assign to warehouse + + } + secondaryAction={ + + } + > + + + + + { + setShippingClass(value); + setError(undefined); + }} + /> + + + ); +} + +export default reactExtension( + 'admin.product-details.action.render', + () => , +); diff --git a/packages/ui-extensions-react/src/surfaces/admin/components/Select/examples/select-placeholder.example.tsx b/packages/ui-extensions-react/src/surfaces/admin/components/Select/examples/select-placeholder.example.tsx new file mode 100644 index 0000000000..c4963290c4 --- /dev/null +++ b/packages/ui-extensions-react/src/surfaces/admin/components/Select/examples/select-placeholder.example.tsx @@ -0,0 +1,27 @@ +import {reactExtension, Select, BlockStack, Text} from '@shopify/ui-extensions-react/admin'; + +function App() { + + return ( + + Product classification +