Repository navigation
Version Packages - #1513
Merged
Merged
Version Packages#1513
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@godaddy/gd-commerce-storefront@0.6.0
Minor Changes
1958f0a: Make the storefront parts more extensible without reimplementing their rules.
ProductDetailsRoottakes aproductIdprop, which falls back to the route's:productId, so a product can render in a quick view or outside its route.urlState={false}keeps that root's selection out of the page URL, so two roots on one page no longer share a selection.loading,notFoundanderrorreplace those states. A root with no product ID now shows the not-found state without requesting/products/, and warns in development.CatalogRootandCatalogtakepageSize, which defaults to 6.CatalogRoottakesurlState={false}for a second catalog on a page.CatalogEmptyrenders a custom empty state, likeCartEmpty.CartButton,AddToCartButton,ProductDetailsAddToCart,ProductCardAction,CartCheckout,CartItemRemove,CartTitle,CartDescriptionandProductDetailsBackLinktake replacement text as children, or a function of the part's state, such as({ busy }) => …. The controls keep their behavior, and a replaced label stays the start of the accessible name.CartItemRemovenow names its line with visually hidden text instead ofaria-label; its accessible name is unchanged.CommerceProviderandCommerceStorefronttakelocalefor price formatting, which defaults toen-US; an invalid tag falls back to it.localeonly formats; localized UI text will be a separate opt-in prop.useMoney()formats prices in that locale for custom parts,money()takes an optional locale, andProductImageis exported.ProductImagenow loads a newurlafter an earlier one failed, instead of keeping the placeholder.onEventreportsitem-added,quantity-changed,item-removed,discount-applied,checkout-startedanderrorevents. A host callback that throws or rejects, includingonItemAdded, is now logged instead of failing the cart operation and showing its message as a cart error.data-commerce-partattribute, such ascart-checkout, documented as a styling hook. No elements are added or removed.