diff --git a/.changeset/storefront-custom-samples.md b/.changeset/storefront-custom-samples.md deleted file mode 100644 index 128307cd..00000000 --- a/.changeset/storefront-custom-samples.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@godaddy/gd-commerce-storefront": minor ---- - -A site can show its own sample products before a store is connected. `sampleProducts` on `Catalog` and `CatalogRoot` takes an array as well as `true`. Each sample has a `key`, `name` and `price`, and optionally a `compareAtPrice`, `description` and `imageUrl`, such as a file in the site's public folder. The card parts show a sample's image, description, price and Sale badge, and the sample cart keeps each line's image. While no store is connected, `CatalogRoot` throws for an invalid list, such as duplicate keys, a packaged sample's key or a decimal price; once one is connected, development builds log the problem instead and the store's catalog still renders. A cart line shows the current fields of a mounted catalog's sample with the same key. `CartItemImage` renders nothing when its image fails to load. `sampleProducts` still shows samples only while the server reports `unbound`, and `true` still shows the six packaged samples without images. - -Custom parts can read the site's own sample fields. `useProductCard()` and `useCartItem()` return `sample`, typed with the site's sample type, such as `useProductCard()`. A new `useCatalog()` returns the catalog's `count`, `isSample` and `status` for a custom product count. Card images and their loading placeholders follow a new `--commerce-card-image-aspect` theme property, which defaults to square. The `SampleProduct` and `CatalogState` types are exported. The default design is unchanged. diff --git a/packages/commerce-storefront/CHANGELOG.md b/packages/commerce-storefront/CHANGELOG.md index 0392dcbf..bca11b42 100644 --- a/packages/commerce-storefront/CHANGELOG.md +++ b/packages/commerce-storefront/CHANGELOG.md @@ -1,5 +1,13 @@ # @godaddy/gd-commerce-storefront +## 0.11.0 + +### Minor Changes + +- 53bbe3b: A site can show its own sample products before a store is connected. `sampleProducts` on `Catalog` and `CatalogRoot` takes an array as well as `true`. Each sample has a `key`, `name` and `price`, and optionally a `compareAtPrice`, `description` and `imageUrl`, such as a file in the site's public folder. The card parts show a sample's image, description, price and Sale badge, and the sample cart keeps each line's image. While no store is connected, `CatalogRoot` throws for an invalid list, such as duplicate keys, a packaged sample's key or a decimal price; once one is connected, development builds log the problem instead and the store's catalog still renders. A cart line shows the current fields of a mounted catalog's sample with the same key. `CartItemImage` renders nothing when its image fails to load. `sampleProducts` still shows samples only while the server reports `unbound`, and `true` still shows the six packaged samples without images. + + Custom parts can read the site's own sample fields. `useProductCard()` and `useCartItem()` return `sample`, typed with the site's sample type, such as `useProductCard()`. A new `useCatalog()` returns the catalog's `count`, `isSample` and `status` for a custom product count. Card images and their loading placeholders follow a new `--commerce-card-image-aspect` theme property, which defaults to square. The `SampleProduct` and `CatalogState` types are exported. The default design is unchanged. + ## 0.10.0 ### Minor Changes diff --git a/packages/commerce-storefront/package.json b/packages/commerce-storefront/package.json index c941c14c..e2cb9a28 100644 --- a/packages/commerce-storefront/package.json +++ b/packages/commerce-storefront/package.json @@ -1,6 +1,6 @@ { "name": "@godaddy/gd-commerce-storefront", - "version": "0.10.0", + "version": "0.11.0", "description": "Opinionated React storefront templates for GoDaddy Commerce", "type": "module", "license": "MIT",