Releases: packdigital/pack-hydrogen-theme-blueprint
Releases · packdigital/pack-hydrogen-theme-blueprint
v1.12.2 Adds bot protection to Analytics, adds check for Admin API env, corrects query name
- 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
New:
- Brings over the
ShoppableSocialVideo
section andProductModal
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 aProductModal
without leaving the primary page. See example Shop pageProductModal
can be utilized outside ofShoppableSocialVideo
by using theuseProductModal
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
- These settings are recommended for pages with the
- Adds
Product
as a section, where an above the fold product component can be rendered on apage
, opposed to a PDP. Note, only single products are recommended for this section as product groupings are not supported [commit]- Ensure adding
getProductsMapForPage
inproducts.server.ts
and fetchingproductsMap
in the($locale).pages.$handle.tsx
loader from theShoppableSocialVideo
commit, when implementing this section
- Ensure adding
- Adds
BlotoutAnalytics
toAnalytics
[commit]- Also adds in proper product and variant typing to all files within
Analytics
- Also adds in proper product and variant typing to all files within
- 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 ofany
- Also adds proper typing to data returned from the
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
Admin API:
- Adds the
/admin-api
folder under/lib
that houses the Admin API client logic. Adds the newcreateAdminClient
inserver.ts
to generate theadmin
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
- See also this later commit, adding a check for
- 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 howmetafields
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
- The
Cleanup**:
- Renames the folder
/data/graphql/shopify
to/data/graphq/storefront
in preparation of the new admin client. Deletes unnecessaryfragments.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
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 anhmr 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
- 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
Migration:
- Removes uses of
json
anddefer
from@shopify/remix-oxygen
, as part of opting into Single Fetch, i.e.v3_singleFetch
withinvite.config.ts
. For loader or action returns that have options, e.g.headers
orstatus
,data
from@shopify/remix-oxygen
is used in place ofjson
ordefer
. For returns without options, no util is needed and an object can simply be returned [commit]- Also reference this commit from release v1.12.1 when following the main 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
totrue
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
andSiteSetting
from@pack/types
which are now expected when using@pack/react
'sregisterSection
andregisterStorefrontSettingsSchema
- Section and storefront settings schemas can now be typed by importing the
- Utilizes new Customizer messaging protocol so connection can be debugged in Customizer (enable debug UI in right utility panel by setting
- Updates
@shopify
and@remix
packages to latest. UpdatesstorefrontApiVersion
to2025-01
[commit] - Updates other packages to latest. Locks
tailwind
to lastv3
version beforev4
[commit]
v1.10.2 Replaces color select with color picker, replaces video url with media selector, fixes sitemap.xml url's
Fix:
- Corrects the sitemap xml url's for pack native template types from release v1.10.0 [commit]
Improvement:
-
Changes all color schema fields from a
select
list of theme colors to thecolor
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 theimage
(i.e.media
) schema field, which accepts video; Updates some video cms data [commit]- Adds video option to
Banner
section - Renames
ImageCms
type toMediaCms
- Switches all mention/use of
src
withurl
to better follow Shopify pattern
- Adds video option to
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
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 itsProvider
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
toSocialMediaGrid
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
Migration:
- Migrates Remix's application builder from Remix compiler to Vite. See Remix Vite documentation [commit]
Routine:
- Updates
hydrogen
packages to2024.10
and all other packages to latest [commit] [commit] - Adds additional consent settings required for hydrogen
2024.10
version [commit] - Adds
"type": "module"
topackage.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 toAnalytics
[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:
v1.9.7 Reverts PDP url param set method, adds logic to ignore tracking url params as product options
v1.9.7 Reverts PDP url param set method, adds logic to ignore tracking url params as product options
- Reverts the use of
useSearchParams
to update the product page url from releasev1.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
Update:
- Renames
PackAnalytics
to justAnalytics
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 allImage
's with thewidth
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]