@scayle/storefront-product-detail
v1.0.0
Major Changes
- This release introduces the
@scayle/storefront-product-listing
package, decoupling composables and utilities of the Product Listing Page (PLP) functionality from the SCAYLE Storefront Boilerplate for enhanced modularity and integration. This separation empowers developers with greater control over PLP updates and simplifies its integration into existing Storefront-based projects. - This release requires
@scayle/[email protected]
or higher. Support for@scayle/[email protected]
has been discontinued. Please update your dependencies accordingly. ThepeerDependency
range has been updated to^8.0.0
.
Minor Changes
- Compared to the original implementation within the SCAYLE Storefront Boilerplate, the
@scayle/storefront-product-detail
package has received some improvements and refactoring:- The
useAppliedFilters
composable has been added to thestorefront-product-listing
package. It now accepts afiltersPrefix
parameter, allowing you to specify a custom prefix for filter-related query parameters. - The
useProductListSort
composable has been added to thestorefront-product-listing
package. It now accepts asortingOptions
anddefaultSortingKey
parameter, to config the sorting options and set the initial sorting value. - The
useProductListFilter
composable has been added to thestorefront-product-listing
package. It acceptscurrentCategoryId
, which represents the active category, andProductListFilterOptions
for specifying options for the underlyinguseFilters
composable. - The
filters
utility has been added to thestorefront-product-listing
package. It provides utilities for filter query manipulation. - All exports are now defined in a single file, and everything is exposed via the
#storefront-product-listing
import. - The
useProductsByCategory
composable has been added to thestorefront-product-listing
package. It now accepts acategoryId
andProductsByCategoryOptions
object that has certain fetching products by category params(category
&categoryId
),fetchingOptions
,productsPerPage
,fetchProductsCacheTtl
,cacheKeyPrefix
,fetchingKey
,withParams
(for product) andquery
(current route query state). - The
useProductListingSeoData
composable has been added to thestorefront-product-listing
package. It accepts reactivecategory
,breadcrumbs
, an object of typeUrlParams
(containing abaseUrl
andfullPath
) which are used for building SEO data. - Product Listing-related test factories are now exposed externally. They can be used as follows:
import { filtersFactory } from '@scayle/storefront-product-listing'
- Upgrade the
storefront-core
andstorefront-nuxt
packages to version 8 and update your implementation to reflect the changes in RPC composables:- The composables
useProductListFilter
anduseProductsByCategory
now return astatus
property instead offetching
. Thestatus
can have one of the following values:idle
,pending
,error
, orsuccess
. - The
fetch
method has been replaced byrefresh
. Update your logic accordingly to use the new method.
- The composables
- The