Skip to content

Releases: packdigital/pack-hydrogen-theme-blueprint

v1.12.2 Adds bot protection to Analytics, adds check for Admin API env, corrects query name

05 Mar 19:33
09ca7a5
Compare
Choose a tag to compare
  • Adds bot protection to Analytics; prevents analytics events (e.g. page view) from executing if bot is detected [commit] [commit]
  • Checks if Admin API env is set, disables admin client if not [commit]
  • Corrects query name for CART_ATTRIBUTES_QUERY from last release [commit]

v1.12.1 New sections (ShoppableSocialVideo, Product), new components (ProductModal, TransparentNavigation, BlotoutAnalytics, Expand), useCartUpdateAttributes hook, correct typing for root data, misc minor code cleanup

04 Mar 00:53
6198383
Compare
Choose a tag to compare

New:

  • Brings over the ShoppableSocialVideo section and ProductModal component from Pack Shops [commit]
    • ShoppableSocialVideo provides a single screen and single page mobile shopping experience by adding a full-screen video with a products slider over top. Each product slide can open the full product in a ProductModal without leaving the primary page. See example Shop page
    • ProductModal can be utilized outside of ShoppableSocialVideo by using the useProductModal hook
  • Adds header settings options to allow for Transparent Navigation for selected pages [commit]
    • These settings are recommended for pages with the ShoppableSocialVideo section
    • Also adds new settings for the regular nav for background, icon and text color
  • Adds Product as a section, where an above the fold product component can be rendered on a page, opposed to a PDP. Note, only single products are recommended for this section as product groupings are not supported [commit]
    • Ensure adding getProductsMapForPage in products.server.ts and fetching productsMap in the ($locale).pages.$handle.tsx loader from the ShoppableSocialVideo commit, when implementing this section
  • Adds BlotoutAnalytics to Analytics [commit]
    • Also adds in proper product and variant typing to all files within Analytics
  • Adds a new Expand component that provides animation to accordions [commit]
  • Adds useCartUpdateAttributes hook which should be used to update cart attributes while ensuring not to override existing attributes [commit]

Fix:

  • Fixes the typing of the data returned from useRootLoaderData after last release's update around Single Fetch [commit]
    • Also adds proper typing to data returned from the root that was inheriting a default type of any

Cleanup:

  • Misc cleanup with typescript, imports, comments, notation, etc. [commit]

v1.12.0 Admin API client to preview draft products in customizer, improved product metafields querying

27 Feb 21:56
290f08b
Compare
Choose a tag to compare

Admin API:

  • Adds the /admin-api folder under /lib that houses the Admin API client logic. Adds the new createAdminClient in server.ts to generate the admin client to be used in a loader/action [commit]
    • See also this later commit, adding a check for PRIVATE_ADMIN_API_TOKEN and prevent the build from not running if not yet set
  • Utilizes the Admin API client to fetch draft products to be previewable while in the customizer. Normalizes Admin API products to look like Storefront API products [commit]
  • Adds a draft overlay over draft product media [commit]
  • Adds Admin API Readme [commit]

Improvement**:

  • Improves product metafields querying by adding the desired metafield identifiers to the initial product query [commit]
    • The metafields data in the product object will no longer be the parsed object generated in the loader. It will be how metafields comes in as is from the API, as an array
    • Instead, a new hook useParsedProductMetafields can be utilized to parse the metafields array for quickly referencing the metafields data instead of mapping through the original array

Cleanup**:

  • Renames the folder /data/graphql/shopify to /data/graphq/storefront in preparation of the new admin client. Deletes unnecessary fragments.ts file [commit]
  • Moves groupings logic in the products route loader to a separate util [commit]
  • Separates the /lib/constants.tsx into separate files in a /constants folder. Adds a new constant for the default Storefront API version [commit]

**Note, these commits are not integral to the Admin API client, but the Admin API commits in this release expect these particular changes to the codebase

v1.11.0 Alleviates HMR update error from Vite migration, updates loader/action returns for Single Fetch, runs loader queries concurrently, updates @pack and other packages to latest

26 Feb 18:07
c32ffdb
Compare
Choose a tag to compare

Vite:

  • As a supplemental migration task to the Vite migration from release 1.10.0, the /components barrel file (i.e. index.ts) is removed and all '~/components' imports are edited to reflect this change [commit]
    • As discovered, there is what is assumed to be some kind of HMR update limit limitation with the Hydrogen Remix x Vite integration, which was causing the error Error: internal error with certain [vite] hmr update's and required a localhost reload to see the intended changes. This only applied to saves that would have otherwise given an hmr invalidate warning while still applying the changes. As a current workaround, removing the sizable /components index.ts file alleviates the error
    • There are also reported benefits to limiting large barrel files, such as less issues with tree shaking, and quicker bundling time

Migration:

  • Removes uses of json and defer from @shopify/remix-oxygen, as part of opting into Single Fetch, i.e. v3_singleFetch within vite.config.ts. For loader or action returns that have options, e.g. headers or status, data from @shopify/remix-oxygen is used in place of json or defer. For returns without options, no util is needed and an object can simply be returned [commit]

Improvement:

  • Runs loader API requests concurrently with Promise.all() where applicable [commit]

Routine:

  • Updates @pack packages to latest. Updates include the below [commit]
    • Utilizes new Customizer messaging protocol so connection can be debugged in Customizer (enable debug UI in right utility panel by setting PACK_DEBUG_LOGS to true in LocalStorage on packdigital.com.
    • Utilizes @pack/types which provides typing and schema validation for both section and storefront setting schemas — schema validation errors will be logged in terminal upon running your storefront.
      • Section and storefront settings schemas can now be typed by importing the Section and SiteSetting from @pack/types which are now expected when using @pack/react's registerSection and registerStorefrontSettingsSchema
  • Updates @shopify and @remix packages to latest. Updates storefrontApiVersion to 2025-01 [commit]
  • Updates other packages to latest. Locks tailwind to last v3 version before v4 [commit]

v1.10.2 Replaces color select with color picker, replaces video url with media selector, fixes sitemap.xml url's

15 Jan 06:02
82a2719
Compare
Choose a tag to compare

Fix:

Improvement:

  • Changes all color schema fields from a select list of theme colors to the color picker field [commit]

    • Passes in a default array of theme hex codes for quicker selection with the color picker
    • Updates HeroContent to use <style> to accommodate different text colors between mobile and desktop, as a caveat of the new color picker
    • Changes the grayscale default theme colors to neutral- for generalized semantics for different themes
  • Changes all video url text fields to use the image (i.e. media) schema field, which accepts video; Updates some video cms data [commit]

    • Adds video option to Banner section
    • Renames ImageCms type to MediaCms
    • Switches all mention/use of src with url to better follow Shopify pattern

v1.10.1 Alleviates Vite HMR error, fixes Mobile Menu products slider page break, minor fixes to products hook, contexts provider and locale, package updates, misc minor updates

31 Dec 00:28
6e669b6
Compare
Choose a tag to compare

Fix:

  • Updates the GraphQL imports to alleviate the Vite (from release v1.10.0) HMR error. Previously, saving a change with the GraphQL queries or fragments would log an error in the terminal and the query update would only be observed after restarting localhost. Also separates Pack and Shopify GraphQL queries into separate files as cleanup [commit]
  • Updates MobileMenu products slider to account for invalid products. Previously, an invalid product would break the page [commit]

Minor fix:

  • Ensures useProductsByIds hook returns products in intended order [commit]
  • Separates useContext hooks from its Provider file to alleviate Vite React Refresh error [commit]
  • Accounts for .data prefix when parsing locale from request in server [commit]

Routine:

  • Update @shopify, @remix-run, @vite packages to latest [commit]

Improvement:

  • Changes SocialImagesGrid to SocialMediaGrid and add video support [commit]

Cleanup:

  • Misc minor code cleanup [commit]

v1.10.0 Vite migration, Hydrogen package updates, new sitemap generation, Klaviyo analytics, code improvements

09 Dec 17:55
a7e7aff
Compare
Choose a tag to compare

Migration:

Routine:

  • Updates hydrogen packages to 2024.10 and all other packages to latest [commit] [commit]
  • Adds additional consent settings required for hydrogen 2024.10 version [commit]
  • Adds "type": "module" to package.json and adjusts file exports or file extensions accordingly [commit]

Improvement:

  • Utilizes Hydrogen's sitemap to paginate sitemaps for product and collection pages. Previously, large stores would generate a singular sitemap that would not be functional due to the large number of server side requests. Also cleans up logic for other sitemaps and product feed [commit]

New:

  • Adds default KlaviyoEvents component to Analytics [commit]

Minor fix:

  • Fixes the currency code fallback for the view cart analytics event. Previously an empty cart had a currency code of "XXX" [commit]
  • Corrects hook usage in usePreviewModeCustomerFetch from change in release v1.9.3 [commit]

Minor improvement:

  • Updates the cart graphql query to accommodate product bundles [commit]
  • Adds logic to automatically scroll to hash on navigation [commit]
  • Checks for PACK_SECRET_TOKEN before the Pack client initializes [commit]

Minor cleanup:

  • Graphql cleanup and adds codegen dependencies [commit]
  • Minor misc code cleanup [commit]

v1.9.7 Reverts PDP url param set method, adds logic to ignore tracking url params as product options

08 Nov 00:22
f1779f0
Compare
Choose a tag to compare
  • Reverts the use of useSearchParams to update the product page url from release v1.9.4. If the product page had a url param that wasn't a product option, e.g. tracking url param, the user would be unable to successfully select any variant other than the first one [commit]
  • Adds additional check to not include common tracking url parameters as possible product options when a product page first loads [commit]

v1.9.6 Renames PackAnalytics, fixes double login analytics events, removes redundant providers from GlobalProvider, fixes loading specific content envs, adds cache control to xml routes, misc cleanup

06 Nov 00:23
35d1520
Compare
Choose a tag to compare

Update:

  • Renames PackAnalytics to just Analytics to avoid confusion the analytics logic is custom to Pack [commit]

Fix:

  • Fixes double events firing for login and register analytics events [commit]

Minor fix:

  • Removes redundant providers left over in GlobalProvider [commit]
  • Fixes loading specific content environments [commit]
  • Adds missing px to all Image's with the width attribute [commit]

Improvement:

  • Adds cache control to xml routes [commit]
  • Updates application error verbiage to limit confusion while in customizer [commit]

Cleanup:

  • Misc minor code cleanup [commit]

v1.9.5 Correction to cookie domain used for analytics

22 Oct 19:40
30588ca
Compare
Choose a tag to compare
  • Passes cookieDomain to Analytics.Provider [commit]
  • Adds Domain= to the pack_session cookie and removes SameSite=Strict [commit]