@godaddy/gd-commerce-storefront 0.6.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -35,7 +35,7 @@ The companion `@godaddy/gd-commerce-server` returns 404 from product details whe
35
35
 
36
36
  ## Configuration
37
37
 
38
- `cartScope` is a nonempty opaque identifier for the effective store/channel/currency binding. It is not a secret. Rotate it when that binding changes so a saved cart cannot cross stores or currencies. `currencyCode` is a three-letter uppercase ISO 4217 code, for example `USD`. Money integers use that currency's smallest unit: USD 1234 is $12.34; JPY 1234 is ¥1,234. The cart shows the draft-order subtotal and the message “Shipping, taxes, and discounts are calculated at checkout.” The message has the stable `commerce-cart-checkout-adjustments-note` class so a host can hide it without changing the component.
38
+ `cartScope` is a nonempty opaque identifier for the effective store/channel/currency binding. It is not a secret. Rotate it when that binding changes so a saved cart cannot cross stores or currencies. `currencyCode` is a three-letter uppercase ISO 4217 code, for example `USD`. Money integers use that currency's smallest unit: USD 1234 is $12.34; JPY 1234 is ¥1,234. The cart shows the draft-order subtotal and a row saying “Shipping, taxes & discounts: Calculated at checkout.” The row has the stable `commerce-cart-checkout-adjustments-note` class so a host can hide it without changing the component.
39
39
 
40
40
  The browser rechecks configuration on window focus when stale. Return current server configuration rather than a browser-selected store. Persisted IDs use the package-specific key documented in the README; migration from another application's storage keys belongs to that application's integration.
41
41
 
@@ -68,6 +68,8 @@ Exported `SKUGroup`, `SKU`, `Connection`, `SkuGroupsResult` and `SkuGroupResult`
68
68
 
69
69
  For options, return `attributes.edges[].node` with `name`, `label`, and `values.edges[].node` containing `name` and `label`. For example, the attribute `color` has values named `blue` and `clay`. The browser sends those value names as repeated `attributeValues` parameters. Return the group with a SKU connection filtered to that exact combination. Zero or multiple results cannot be purchased. Include accurate `totalCount` and `hasNextPage`; a truncated one-item result must never look like a complete match.
70
70
 
71
+ Optionally, give each SKU in the unfiltered response its `attributeValues.edges[].node.name`. With every SKU and its value names, the product page crosses out values whose SKUs are all sold out, given the shopper's other selections. Without them, or when `hasNextPage` is true, no value is marked sold out; the add button still reports a sold-out SKU once it is chosen.
72
+
71
73
  Products without attribute definitions can offer explicit SKU selection only when all SKUs are returned with unique IDs and unique nonempty labels/names. Ambiguous or incomplete collections cannot be purchased. No inventory records means untracked inventory; records without an `AVAILABLE` quantity mean unavailable. Supply appropriate records for physical inventory.
72
74
 
73
75
  ## Cart responses
@@ -132,9 +134,14 @@ live data only when the deployed server reports a new state. If a host's deploym
132
134
  state from deployment configuration, a deployed site keeps showing samples until that
133
135
  configuration is updated, for example by publishing again.
134
136
 
135
- The storefront polls every five seconds while the page is visible and the state is `unbound` or
136
- `connecting`, and refreshes on mount and focus. A failed refresh immediately hides samples, without
137
- automatic request retries. While the last response was `connecting`, refresh failures keep the
138
- connecting state for up to 60 seconds, so a host restart during connection does not flash an
139
- error. Polling continues, and a longer failure reports the error. Aborted configuration requests cannot overwrite newer responses.
137
+ While the page is visible and the state is `unbound` or `connecting`, the storefront polls every
138
+ five seconds for five minutes after the page loads, then every minute, and stops thirty minutes
139
+ after load. It also refreshes on mount and focus, and reloading or retrying starts polling again. A
140
+ page still `connecting` when polling stops shows an error with a retry button, so finish connecting
141
+ well within thirty minutes. A failed refresh immediately hides
142
+ samples, without automatic request retries. While the last response was `connecting`, refresh
143
+ failures keep the connecting state for up to 60 seconds, so a host restart during connection does
144
+ not flash an error. This holds only in the first five minutes; after that, polls are a minute
145
+ apart, and the first failure reports the error. Polling continues, and a longer failure reports
146
+ the error. Aborted configuration requests cannot overwrite newer responses.
140
147
  Release server and client support before using the `sampleProducts` prop. No new endpoint is required.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@godaddy/gd-commerce-storefront",
3
- "version": "0.6.0",
3
+ "version": "0.8.0",
4
4
  "description": "Opinionated React storefront templates for GoDaddy Commerce",
5
5
  "type": "module",
6
6
  "license": "MIT",