-
Notifications
You must be signed in to change notification settings - Fork 323
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'v1.x-2022-07' into jl-persisted-state
* v1.x-2022-07: (37 commits) Adds Shopify/hydrogen-cli for development server (#1089) Make `useUrl()` reactive for subscribing to navigation events (#1082) fix e2e tests streaming and suspense draft (#1033) [Hydrogen docs]: Restructure and simplify IA (#1079) Use new storefront API headers in queryShop API helper (#1075) Remove the dep of hydrogen-ui for now until we get it publishing (#1076) [ci] release v1.x-2022-07 (#1048) Introduce a synchronous-looking version of fetch for server and client (#983) improve the current type of ShopifyContextValue to be based on ShopifyConfig (#1072) Foundational work to split hydrogen-ui to its own package (#1060) Allow returning new requests from API routes (#1057) [Hydrogen docs]: Analytics (#962) Analytics (#890) Allow line breaks inside script tags (#1061) Fix encoding of CSS Modules to solve hydration errors (#1062) [Hydrogen docs]: Update guidance on troubleshooting third-party dependencies (#1055) Update Vite RSC Plugin (#1054) Fix link prefetch (#1059) Initial devTools component (#998) ...
- Loading branch information
Showing
410 changed files
with
5,924 additions
and
5,318 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
docs/code_of_conduct.md | ||
packages/hydrogen/src/docs/hooks.md | ||
packages/hydrogen/src/docs/components.md | ||
packages/hydrogen/src/docs/hydrogen-reference.md | ||
packages/hydrogen/src/framework/docs/css-support.md | ||
packages/hydrogen/src/foundation/useQuery/README.md | ||
docs/framework/css-support.md | ||
docs/framework/work-with-rsc.md | ||
docs/hooks/usequery.md | ||
packages/hydrogen/CHANGELOG.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
'@shopify/hydrogen': patch | ||
--- | ||
|
||
Update `useUrl()` to allow a developer to subscribe to a reactive version of the current router location. | ||
|
||
Example: | ||
|
||
```jsx | ||
import {useUrl} from '@shopify/hydrogen/client'; | ||
|
||
function MyClientComponent() { | ||
const url = useUrl(); | ||
|
||
useEffect(() => { | ||
// Record navigation, analytics, etc | ||
}, [url]); | ||
} | ||
``` |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@shopify/hydrogen': patch | ||
--- | ||
|
||
Properly set buyer IP and secret token for API Route queryShop helper |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
'create-hydrogen-app': patch | ||
--- | ||
|
||
Use Shopify CLI to start a local development server instead of `vite`. | ||
|
||
To update your existing apps, install the Shopify & Hydrogen CLIs: | ||
|
||
```bash | ||
yarn add -D @shopify/cli @shopify/cli-hydrogen | ||
``` | ||
|
||
And update the `dev` script in your `package.json`: | ||
|
||
```diff | ||
- "dev": "vite", | ||
+ "dev": "shopify hydrogen dev", | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Discord announcement | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
build: | ||
if: startsWith(github.event.release.tag_name, '@shopify/hydrogen@') | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Set Hydrogen version as env | ||
run: | | ||
TAG=${{ github.event.release.tag_name }} | ||
echo "HYDROGEN_VERSION=${TAG//@shopify\/hydrogen@/}" >> $GITHUB_ENV | ||
- name: Discord notification | ||
env: | ||
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} | ||
DISCORD_USERNAME: Shopify Devs | ||
DISCORD_AVATAR: https://cdn.discordapp.com/avatars/905537246990590012/0f6a687b93ef3f81a036c817fb02ccbf.webp | ||
uses: Ilshidur/action-discord@08d9328877d6954120eef2b07abbc79249bb6210 | ||
with: | ||
args: "Hydrogen ${{ env.HYDROGEN_VERSION }} has been released.\n${{ github.event.release.html_url }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
The `BuyNowButton` component renders a button that adds an item to the cart and redirects the customer to checkout. | ||
|
||
## Example code | ||
|
||
```tsx | ||
import {BuyNowButton} from '@shopify/hydrogen'; | ||
|
||
export function MyComponent() { | ||
return ( | ||
<BuyNowButton quantity={1} variantId={'123'}> | ||
Buy it now | ||
</BuyNowButton> | ||
); | ||
} | ||
``` | ||
|
||
## Props | ||
|
||
| Name | Type | Description | | ||
| ----------- | ----------------------------------------------- | --------------------------------------------------------------------------------- | | ||
| quantity? | <code>number</code> | The item quantity. Defaults to 1. | | ||
| variantId | <code>string</code> | The ID of the variant. | | ||
| attributes? | <code>Object<<wbr>string, string<wbr>>[]</code> | An array of cart line attributes that belong to the item being added to the cart. | | ||
| children | <code>ReactNode<<wbr>Imported<wbr>></code> | Any `ReactNode` elements. | | ||
|
||
## Component type | ||
|
||
The `BuyNowButton` component is a shared component, which means that it renders on both the server and the client. For more information about component types, refer to [React Server Components](/custom-storefronts/hydrogen/framework/react-server-components). |
2 changes: 0 additions & 2 deletions
2
...c/components/CartCheckoutButton/README.md → docs/components/cartcheckoutbutton.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
...rc/components/CartEstimatedCost/README.md → docs/components/cartestimatedcost.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
...en/src/components/CartLineImage/README.md → docs/components/cartlineimage.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
...en/src/components/CartLinePrice/README.md → docs/components/cartlineprice.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
...components/CartLineProductTitle/README.md → docs/components/cartlineproducttitle.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
...src/components/CartLineProvider/README.md → docs/components/cartlineprovider.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
...src/components/CartLineQuantity/README.md → docs/components/cartlinequantity.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
...ts/CartLineQuantityAdjustButton/README.md → ...omponents/cartlinequantityadjustbutton.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
...drogen/src/components/CartLines/README.md → docs/components/cartlines.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
...rc/components/CartShopPayButton/README.md → docs/components/cartshoppaybutton.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
...en/src/components/ExternalVideo/README.md → docs/components/externalvideo.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
...rogen/src/foundation/FileRoutes/README.md → docs/components/fileroutes.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.