Skip to content

Releases: Shopify/hydrogen

skeleton@2024.7.6

12 Sep 01:30
5197eef
Compare
Choose a tag to compare

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/remix-oxygen@2.0.7

12 Sep 01:30
5197eef
Compare
Choose a tag to compare

Patch Changes

  • Prevent infinite redirects when a double slash exists in the URL (#2449) by @blittle

@shopify/mini-oxygen@3.0.5

12 Sep 01:30
5197eef
Compare
Choose a tag to compare

Patch Changes

  • Prevent infinite redirects when a double slash exists in the URL (#2449) by @blittle

  • Add oxygen-buyer-postal-code and oxygen-buyer-metro-code headers (#2429) by @jgodson

@shopify/hydrogen@2024.7.5

12 Sep 01:30
5197eef
Compare
Choose a tag to compare

Patch Changes

@shopify/hydrogen-react@2024.7.3

12 Sep 01:30
5197eef
Compare
Choose a tag to compare

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/create-hydrogen@5.0.5

12 Sep 01:30
5197eef
Compare
Choose a tag to compare

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/cli-hydrogen@8.4.2

12 Sep 01:30
5197eef
Compare
Choose a tag to compare

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 @frandiox

    It is recommended to delete client sourcemaps before deploying the app to production.

  • Updated dependencies [664a09d5, 9dd4c615]:

    • @shopify/mini-oxygen@3.0.5

skeleton@2024.7.5

14 Aug 10:14
8df49d7
Compare
Choose a tag to compare

Patch Changes

@shopify/hydrogen@2024.7.4

14 Aug 10:14
8df49d7
Compare
Choose a tag to compare

Patch Changes

  • Fix the Script component to not throw when using it for inline scripts with dangerouslySetInnerHTML (#2428) by @blittle

@shopify/create-hydrogen@5.0.4

14 Aug 10:14
8df49d7
Compare
Choose a tag to compare

Patch Changes

  • Update starter template with latest Hydrogen version. (#2432) by @frandiox