Releases: Shopify/hydrogen
@shopify/[email protected]
Patch Changes
- Emit a document event
shopifyCustomerPrivacyApiLoaded
when Customer Privacy API is ready and fix analytics events sending to Shopify. (#2528) by @wizardlyhel
@shopify/[email protected]
Patch Changes
- Update starter template with latest Hydrogen version. (#2535) by @scottdixon
@shopify/[email protected]
Patch Changes
- Update starter template with latest Hydrogen version. (#2535) by @scottdixon
[email protected]
Patch Changes
-
Update Shopify CLI and cli-kit dependencies to 3.66.1 (#2512) by @frandiox
-
createCartHandler supplies updateGiftCardCodes method (#2298) by @wizardlyhel
-
Fix menu links in side panel not working on mobile devices (#2450) by @wizardlyhel
// /app/components/Header.tsx export function HeaderMenu({ menu, primaryDomainUrl, viewport, publicStoreDomain, }: { menu: HeaderProps['header']['menu']; primaryDomainUrl: HeaderProps['header']['shop']['primaryDomain']['url']; viewport: Viewport; publicStoreDomain: HeaderProps['publicStoreDomain']; }) { const className = `header-menu-${viewport}`; + const {close} = useAside(); - function closeAside(event: React.MouseEvent<HTMLAnchorElement>) { - if (viewport === 'mobile') { - event.preventDefault(); - window.location.href = event.currentTarget.href; - } - } return ( <nav className={className} role="navigation"> {viewport === 'mobile' && ( <NavLink end - onClick={closeAside} + onClick={close} prefetch="intent" style={activeLinkStyle} to="/" > Home </NavLink> )} {(menu || FALLBACK_HEADER_MENU).items.map((item) => { if (!item.url) return null; // if the url is internal, we strip the domain const url = item.url.includes('myshopify.com') || item.url.includes(publicStoreDomain) || item.url.includes(primaryDomainUrl) ? new URL(item.url).pathname : item.url; return ( <NavLink className="header-menu-item" end key={item.id} - onClick={closeAside} + onClick={close} prefetch="intent" style={activeLinkStyle} to={url} > {item.title} </NavLink> ); })} </nav> ); }
-
Add localization support to consent privacy banner (#2457) by @juanpprieto
-
Updated dependencies [
d633e49a
,1b217cd6
,d929b561
,664a09d5
,0c1e511d
,eefa8203
]:- @Shopify/hydrogen@2024.7.5
- @shopify/[email protected]
@shopify/[email protected]
@shopify/[email protected]
@shopify/[email protected]
Patch Changes
-
Prevent CSP nonces from persisting between requests (#2500) by @juanpprieto
-
useOptimisticCart: optimistically calculate totalQuantity (#2459) by @scottdixon
-
createCartHandler supplies updateGiftCardCodes method (#2298) by @wizardlyhel
-
Introduce a new abstraction for generating sitemap index and child sitemaps. (#2478) by @blittle
See the sitemap example for how to use it and read the docs for more information.
-
Add localization support to consent privacy banner (#2457) by @juanpprieto
-
Updated dependencies [
ca0c7692
,81f2b540
]:- @shopify/[email protected]
@shopify/[email protected]
Patch Changes
-
Update ProductPrice to use price instead of priceV2, and hide compareAt price if less than regular price (#2461) by @andershagbard
-
Prevent Image component from generating srcset with higher dimensions than source image (#2469) by @andershagbard
@shopify/[email protected]
Patch Changes
-
Update Shopify CLI and cli-kit dependencies to 3.66.1 (#2512) by @frandiox
-
createCartHandler supplies updateGiftCardCodes method (#2298) by @wizardlyhel
-
Fix menu links in side panel not working on mobile devices (#2450) by @wizardlyhel
// /app/components/Header.tsx export function HeaderMenu({ menu, primaryDomainUrl, viewport, publicStoreDomain, }: { menu: HeaderProps['header']['menu']; primaryDomainUrl: HeaderProps['header']['shop']['primaryDomain']['url']; viewport: Viewport; publicStoreDomain: HeaderProps['publicStoreDomain']; }) { const className = `header-menu-${viewport}`; + const {close} = useAside(); - function closeAside(event: React.MouseEvent<HTMLAnchorElement>) { - if (viewport === 'mobile') { - event.preventDefault(); - window.location.href = event.currentTarget.href; - } - } return ( <nav className={className} role="navigation"> {viewport === 'mobile' && ( <NavLink end - onClick={closeAside} + onClick={close} prefetch="intent" style={activeLinkStyle} to="/" > Home </NavLink> )} {(menu || FALLBACK_HEADER_MENU).items.map((item) => { if (!item.url) return null; // if the url is internal, we strip the domain const url = item.url.includes('myshopify.com') || item.url.includes(publicStoreDomain) || item.url.includes(primaryDomainUrl) ? new URL(item.url).pathname : item.url; return ( <NavLink className="header-menu-item" end key={item.id} - onClick={closeAside} + onClick={close} prefetch="intent" style={activeLinkStyle} to={url} > {item.title} </NavLink> ); })} </nav> ); }
@shopify/[email protected]
Patch Changes
-
Update Shopify CLI and cli-kit dependencies to 3.66.1 (#2512) by @frandiox
-
Add
--force-client-sourcemap
flag. Client sourcemapping is avoided by default because it makes backend code visible in the browser. Use this flag to force enabling it. (#2477) by @frandioxIt is recommended to delete client sourcemaps before deploying the app to production.
-
Updated dependencies [
664a09d5
,9dd4c615
]:- @shopify/[email protected]