docs
  1. SCAYLE Resource Center
  2. Support and Resources
  3. Changelogs
  4. Feature Packages
  5. @scayle/storefront-product-detail

@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. The peerDependency 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 the storefront-product-listing package. It now accepts a filtersPrefix parameter, allowing you to specify a custom prefix for filter-related query parameters.
    • The useProductListSort composable has been added to the storefront-product-listing package. It now accepts a sortingOptions and defaultSortingKey parameter, to config the sorting options and set the initial sorting value.
    • The useProductListFilter composable has been added to the storefront-product-listing package. It accepts currentCategoryId, which represents the active category, and ProductListFilterOptions for specifying options for the underlying useFilters composable.
    • The filters utility has been added to the storefront-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 the storefront-product-listing package. It now accepts a categoryId and ProductsByCategoryOptions object that has certain fetching products by category params(category & categoryId), fetchingOptions, productsPerPage, fetchProductsCacheTtl, cacheKeyPrefix, fetchingKey, withParams (for product) and query (current route query state).
    • The useProductListingSeoData composable has been added to the storefront-product-listing package. It accepts reactive category, breadcrumbs, an object of type UrlParams (containing a baseUrl and fullPath) 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 and storefront-nuxt packages to version 8 and update your implementation to reflect the changes in RPC composables:
      • The composables useProductListFilter and useProductsByCategory now return a status property instead of fetching. The status can have one of the following values: idle, pending, error, or success.
      • The fetch method has been replaced by refresh. Update your logic accordingly to use the new method.