Skip to content

Conversation

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented May 16, 2022

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to v1.x-2022-07, this PR will be updated.

Releases

@shopify/[email protected]

Minor Changes

  • #1257 5cd7a672 Thanks @frandiox! - Support for CSS Modules has been improved. It now behaves closer to the default behavior in Vite where styles are collected automatically.

    Remove the StyleTag component that was needed before:

    export default function MyComponent() {
      return (
        <div>
    -      <myStyles.StyleTag />
          <h1>Title</h1>
        </div>
      );
    }

    Optionally, update your wildcard imports to default or named imports:

    -import * as myStyles from './my.module.css';
    +import myStyles from './my.module.css';
    // Or
    +import {red, green, blue} from './my.module.css';
  • #1271 9d0359b8 Thanks @frehner! - ## <Image/>

    The <Image/> component and related utility functions were reworked and the following changes apply:

    • useImageUrl is no longer available; use shopifyImageLoader instead, which is available to run both server- and client-side.
    • The TypeScript experience with <Image/> is improved; props will be validated better, and loader and loaderOptions will be better typed
    • When using the src prop, width and height are now required
    • When using the data prop, data.width and data.height or width and height props are required
    • The src and data props are mutually exclusive
    • The loader prop now receives a singular param as an object
    • options has been merged with loaderOptions. When using the data prop, loaderOptions will be the options for Shopify CDN images. When using the src prop, loaderOptions will be whatever you define them to be.
    • The TypeScript type ImageSizeOptions is now named ShopifyLoaderOptions
    • The TypeScript type ImageLoaderOptions is now named ShopifyLoaderParams
    • The priority prop was removed; use the HTML-standard loading prop instead

    <Video/>

    • The <Video/> component's options props was renamed to imagePreviewOptions to add clarity as to what the options were for.
    • imagePreviewOptions matches the (newly updated) shape of <Image/>'s loaderOptions
  • #1290 437b1616 Thanks @jplhomer! - Allow cart queries to be customized by adding a new cartFragment prop to CartProvider. Learn more.

Patch Changes

[email protected]

@github-actions github-actions bot force-pushed the changeset-release/v1.x-2022-07 branch 11 times, most recently from 4cef240 to 74a9682 Compare May 17, 2022 20:59
@github-actions github-actions bot force-pushed the changeset-release/v1.x-2022-07 branch from 74a9682 to 6712347 Compare May 18, 2022 04:04
@frandiox frandiox merged commit bf78563 into v1.x-2022-07 May 18, 2022
@frandiox frandiox deleted the changeset-release/v1.x-2022-07 branch May 18, 2022 04:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant