Skip to content

Commit

Permalink
Merge branch 'canary' into feature/GCOM-1260-2
Browse files Browse the repository at this point in the history
# Conflicts:
#	examples/magento-graphcms/package.json
#	examples/magento-graphcms/pages/[...url].tsx
#	packages/hygraph-ui/package.json
#	yarn.lock
  • Loading branch information
paales committed Jan 9, 2024
2 parents 326df0d + 303d4ed commit a4cef15
Show file tree
Hide file tree
Showing 162 changed files with 1,542 additions and 1,375 deletions.
5 changes: 5 additions & 0 deletions .changeset/fast-moles-explain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@graphcommerce/magento-product': patch
---

The ProductFilters and ProductList queries would only run after the hygraphPageContent query would be resolved, although they don't depend on each other, now they run in parallel.
5 changes: 5 additions & 0 deletions .changeset/forty-islands-march.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@graphcommerce/magento-search": patch
---

Make sure the search link in the header is a nextjs navigation
4 changes: 4 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,12 @@
"eleven-hats-kneel",
"empty-ads-run",
"famous-impalas-destroy",
"fast-moles-explain",
"fifty-impalas-hug",
"fifty-parents-move",
"fifty-taxis-speak",
"flat-emus-look",
"forty-islands-march",
"forty-rocks-bow",
"four-peaches-bake",
"fresh-games-roll",
Expand Down Expand Up @@ -123,6 +125,7 @@
"plenty-icons-cough",
"poor-badgers-heal",
"pretty-hairs-prove",
"purple-shirts-allow",
"quick-queens-rush",
"quiet-boats-leave",
"quiet-cheetahs-build",
Expand Down Expand Up @@ -155,6 +158,7 @@
"strong-ants-confess",
"stupid-ears-wink",
"stupid-mice-check",
"swift-buckets-love",
"tall-candles-watch",
"tall-poems-reflect",
"tall-spies-reflect",
Expand Down
5 changes: 5 additions & 0 deletions .changeset/purple-shirts-allow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@graphcommerce/magento-product": patch
---

Do not break words when wrapping
5 changes: 5 additions & 0 deletions .changeset/swift-buckets-love.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@graphcommerce/magento-search": patch
---

Take the per_page configuration in account for the search results
2 changes: 2 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Change Log

## 8.0.0-canary.75

## 8.0.0-canary.74

## 8.0.0-canary.73
Expand Down
8 changes: 0 additions & 8 deletions docs/framework/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,14 +249,6 @@ GC_HYGRAPH_WRITE_ACCESS_TOKEN="AccessTokenFromHygraph"
yarn graphcommerce hygraph-migrate
```

#### legacyProductRoute: boolean

On older versions of GraphCommerce products would use a product type specific route.

This should only be set to true if you use the /product/[url] AND /product/configurable/[url] routes.

@deprecated Will be removed in a future version. [migration](../upgrading/graphcommerce-5-to-6.md#product-routing-changes)

#### limitSsg: boolean

Limit the static generation of SSG when building
Expand Down
4 changes: 2 additions & 2 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
"name": "@graphcommerce/docs",
"homepage": "https://www.graphcommerce.org/docs",
"repository": "github:graphcommerce-org/graphcommerce/docs",
"version": "8.0.0-canary.74",
"version": "8.0.0-canary.75",
"sideEffects": true,
"peerDependencies": {
"@graphcommerce/prettier-config-pwa": "^8.0.0-canary.74"
"@graphcommerce/prettier-config-pwa": "^8.0.0-canary.75"
},
"prettier": "@graphcommerce/prettier-config-pwa"
}
2 changes: 2 additions & 0 deletions examples/magento-graphcms/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Change Log

## 8.0.0-canary.75

## 8.0.0-canary.74

## 8.0.0-canary.73
Expand Down
104 changes: 52 additions & 52 deletions examples/magento-graphcms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@graphcommerce/magento-graphcms",
"homepage": "https://www.graphcommerce.org/",
"repository": "github:graphcommerce-org/graphcommerce",
"version": "8.0.0-canary.74",
"version": "8.0.0-canary.75",
"private": true,
"sideEffects": false,
"engines": {
Expand All @@ -21,54 +21,54 @@
"dependencies": {
"@apollo/client": "~3.8.8",
"@ducanh2912/next-pwa": "9.7.2",
"@graphcommerce/cli": "8.0.0-canary.74",
"@graphcommerce/content-areas": "8.0.0-canary.74",
"@graphcommerce/demo-magento-graphcommerce": "8.0.0-canary.74",
"@graphcommerce/ecommerce-ui": "8.0.0-canary.74",
"@graphcommerce/framer-next-pages": "8.0.0-canary.74",
"@graphcommerce/framer-scroller": "8.0.0-canary.74",
"@graphcommerce/framer-utils": "8.0.0-canary.74",
"@graphcommerce/googleanalytics": "8.0.0-canary.74",
"@graphcommerce/googlerecaptcha": "8.0.0-canary.74",
"@graphcommerce/googletagmanager": "8.0.0-canary.74",
"@graphcommerce/graphcms-ui": "8.0.0-canary.74",
"@graphcommerce/graphql": "8.0.0-canary.74",
"@graphcommerce/graphql-mesh": "8.0.0-canary.74",
"@graphcommerce/hygraph-cli": "8.0.0-canary.74",
"@graphcommerce/hygraph-dynamic-rows": "8.0.0-canary.74",
"@graphcommerce/image": "8.0.0-canary.74",
"@graphcommerce/lingui-next": "8.0.0-canary.74",
"@graphcommerce/magento-cart": "8.0.0-canary.74",
"@graphcommerce/magento-cart-billing-address": "8.0.0-canary.74",
"@graphcommerce/magento-cart-checkout": "8.0.0-canary.74",
"@graphcommerce/magento-cart-coupon": "8.0.0-canary.74",
"@graphcommerce/magento-cart-email": "8.0.0-canary.74",
"@graphcommerce/magento-cart-items": "8.0.0-canary.74",
"@graphcommerce/magento-cart-payment-method": "8.0.0-canary.74",
"@graphcommerce/magento-cart-shipping-address": "8.0.0-canary.74",
"@graphcommerce/magento-cart-shipping-method": "8.0.0-canary.74",
"@graphcommerce/magento-category": "8.0.0-canary.74",
"@graphcommerce/magento-cms": "8.0.0-canary.74",
"@graphcommerce/magento-compare": "8.0.0-canary.74",
"@graphcommerce/magento-customer": "8.0.0-canary.74",
"@graphcommerce/magento-graphql": "8.0.0-canary.74",
"@graphcommerce/magento-newsletter": "8.0.0-canary.74",
"@graphcommerce/magento-payment-included": "8.0.0-canary.74",
"@graphcommerce/magento-product": "8.0.0-canary.74",
"@graphcommerce/magento-product-bundle": "8.0.0-canary.74",
"@graphcommerce/magento-product-configurable": "8.0.0-canary.74",
"@graphcommerce/magento-product-downloadable": "8.0.0-canary.74",
"@graphcommerce/magento-product-grouped": "8.0.0-canary.74",
"@graphcommerce/magento-product-simple": "8.0.0-canary.74",
"@graphcommerce/magento-product-virtual": "8.0.0-canary.74",
"@graphcommerce/magento-recently-viewed-products": "8.0.0-canary.74",
"@graphcommerce/magento-review": "8.0.0-canary.74",
"@graphcommerce/magento-search": "8.0.0-canary.74",
"@graphcommerce/magento-store": "8.0.0-canary.74",
"@graphcommerce/magento-wishlist": "8.0.0-canary.74",
"@graphcommerce/next-config": "8.0.0-canary.74",
"@graphcommerce/next-ui": "8.0.0-canary.74",
"@graphcommerce/react-hook-form": "8.0.0-canary.74",
"@graphcommerce/cli": "8.0.0-canary.75",
"@graphcommerce/content-areas": "8.0.0-canary.75",
"@graphcommerce/demo-magento-graphcommerce": "8.0.0-canary.75",
"@graphcommerce/ecommerce-ui": "8.0.0-canary.75",
"@graphcommerce/framer-next-pages": "8.0.0-canary.75",
"@graphcommerce/framer-scroller": "8.0.0-canary.75",
"@graphcommerce/framer-utils": "8.0.0-canary.75",
"@graphcommerce/googleanalytics": "8.0.0-canary.75",
"@graphcommerce/googlerecaptcha": "8.0.0-canary.75",
"@graphcommerce/googletagmanager": "8.0.0-canary.75",
"@graphcommerce/graphcms-ui": "8.0.0-canary.75",
"@graphcommerce/graphql": "8.0.0-canary.75",
"@graphcommerce/graphql-mesh": "8.0.0-canary.75",
"@graphcommerce/hygraph-cli": "8.0.0-canary.75",
"@graphcommerce/hygraph-dynamic-rows": "8.0.0-canary.75",
"@graphcommerce/image": "8.0.0-canary.75",
"@graphcommerce/lingui-next": "8.0.0-canary.75",
"@graphcommerce/magento-cart": "8.0.0-canary.75",
"@graphcommerce/magento-cart-billing-address": "8.0.0-canary.75",
"@graphcommerce/magento-cart-checkout": "8.0.0-canary.75",
"@graphcommerce/magento-cart-coupon": "8.0.0-canary.75",
"@graphcommerce/magento-cart-email": "8.0.0-canary.75",
"@graphcommerce/magento-cart-items": "8.0.0-canary.75",
"@graphcommerce/magento-cart-payment-method": "8.0.0-canary.75",
"@graphcommerce/magento-cart-shipping-address": "8.0.0-canary.75",
"@graphcommerce/magento-cart-shipping-method": "8.0.0-canary.75",
"@graphcommerce/magento-category": "8.0.0-canary.75",
"@graphcommerce/magento-cms": "8.0.0-canary.75",
"@graphcommerce/magento-compare": "8.0.0-canary.75",
"@graphcommerce/magento-customer": "8.0.0-canary.75",
"@graphcommerce/magento-graphql": "8.0.0-canary.75",
"@graphcommerce/magento-newsletter": "8.0.0-canary.75",
"@graphcommerce/magento-payment-included": "8.0.0-canary.75",
"@graphcommerce/magento-product": "8.0.0-canary.75",
"@graphcommerce/magento-product-bundle": "8.0.0-canary.75",
"@graphcommerce/magento-product-configurable": "8.0.0-canary.75",
"@graphcommerce/magento-product-downloadable": "8.0.0-canary.75",
"@graphcommerce/magento-product-grouped": "8.0.0-canary.75",
"@graphcommerce/magento-product-simple": "8.0.0-canary.75",
"@graphcommerce/magento-product-virtual": "8.0.0-canary.75",
"@graphcommerce/magento-recently-viewed-products": "8.0.0-canary.75",
"@graphcommerce/magento-review": "8.0.0-canary.75",
"@graphcommerce/magento-search": "8.0.0-canary.75",
"@graphcommerce/magento-store": "8.0.0-canary.75",
"@graphcommerce/magento-wishlist": "8.0.0-canary.75",
"@graphcommerce/next-config": "8.0.0-canary.75",
"@graphcommerce/next-ui": "8.0.0-canary.75",
"@graphcommerce/react-hook-form": "8.0.0-canary.75",
"@lingui/core": "4.6.0",
"@lingui/macro": "4.6.0",
"@lingui/react": "4.6.0",
Expand All @@ -93,9 +93,9 @@
"webpack": "5.89.0"
},
"devDependencies": {
"@graphcommerce/eslint-config-pwa": "8.0.0-canary.74",
"@graphcommerce/prettier-config-pwa": "8.0.0-canary.74",
"@graphcommerce/typescript-config-pwa": "8.0.0-canary.74",
"@graphcommerce/eslint-config-pwa": "8.0.0-canary.75",
"@graphcommerce/prettier-config-pwa": "8.0.0-canary.75",
"@graphcommerce/typescript-config-pwa": "8.0.0-canary.75",
"@lingui/cli": "4.6.0",
"@playwright/test": "1.40.1",
"@types/node": "^18",
Expand Down
55 changes: 23 additions & 32 deletions examples/magento-graphcms/pages/[...url].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -173,38 +173,29 @@ export const getStaticProps: GetPageStaticProps = async ({ params, locale }) =>
}

const content = pageContent(staticClient, url, category)
const hasPage = filteredCategoryUid ? false : (await content).notFound !== true
const hasCategory = Boolean(productListParams && categoryUid)

if (!productListParams || !(hasPage || hasCategory))
return redirectOrNotFound(staticClient, conf, params, locale)

if (!hasCategory) {
return {
props: {
content: await content,
...(await categoryPage).data,
...(await layout).data,
apolloState: await conf.then(() => client.cache.extract()),
},
revalidate: 60 * 20,
}
}

const filters = staticClient.query({
query: ProductFiltersDocument,
variables: { filters: { category_uid: { eq: categoryUid } } },
})
const products = staticClient.query({
query: ProductListDocument,
variables: {
pageSize: (await conf).data.storeConfig?.grid_per_page ?? 24,
...productListParams,
filters: { ...productListParams.filters, category_uid: { eq: categoryUid } },
},
})

if ((await products).errors) return { notFound: true }
const filters = hasCategory
? staticClient.query({
query: ProductFiltersDocument,
variables: { filters: { category_uid: { eq: categoryUid } } },
})
: undefined
const products = hasCategory
? staticClient.query({
query: ProductListDocument,
variables: {
pageSize: (await conf).data.storeConfig?.grid_per_page ?? 24,
...productListParams,
filters: { ...productListParams?.filters, category_uid: { eq: categoryUid } },
},
})
: undefined

const hasPage = filteredCategoryUid ? false : (await pages).data.pages.length > 0
if (!hasCategory && !hasPage) return redirectOrNotFound(staticClient, conf, params, locale)

if ((await products)?.errors) return { notFound: true }

const { category_name, category_url_path } =
(await categoryPage).data.categories?.items?.[0]?.breadcrumbs?.[0] ?? {}
Expand All @@ -218,8 +209,8 @@ export const getStaticProps: GetPageStaticProps = async ({ params, locale }) =>
props: {
content: await content,
...(await categoryPage).data,
...(await products).data,
...(await filters).data,
...(await products)?.data,
...(await filters)?.data,
...(await layout).data,
filterTypes: await filterTypes,
params: productListParams,
Expand Down
6 changes: 5 additions & 1 deletion examples/magento-graphcms/pages/search/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,11 @@ export const getStaticProps: GetPageStaticProps = async ({ params, locale }) =>

const products = staticClient.query({
query: ProductListDocument,
variables: { ...productListParams, search, pageSize: 12 },
variables: {
pageSize: (await conf).data.storeConfig?.grid_per_page ?? 12,
...productListParams,
search,
},
})

const categories = search
Expand Down
2 changes: 2 additions & 0 deletions packages/address-fields-nl/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# @graphcommerce/address-fields-nl

## 8.0.0-canary.75

## 8.0.0-canary.74

## 8.0.0-canary.73
Expand Down
18 changes: 9 additions & 9 deletions packages/address-fields-nl/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@graphcommerce/address-fields-nl",
"homepage": "https://www.graphcommerce.org/",
"repository": "github:graphcommerce-org/graphcommerce",
"version": "8.0.0-canary.74",
"version": "8.0.0-canary.75",
"sideEffects": false,
"prettier": "@graphcommerce/prettier-config-pwa",
"eslintConfig": {
Expand All @@ -12,14 +12,14 @@
}
},
"peerDependencies": {
"@graphcommerce/ecommerce-ui": "^8.0.0-canary.74",
"@graphcommerce/eslint-config-pwa": "^8.0.0-canary.74",
"@graphcommerce/graphql": "^8.0.0-canary.74",
"@graphcommerce/magento-customer": "^8.0.0-canary.74",
"@graphcommerce/magento-store": "^8.0.0-canary.74",
"@graphcommerce/next-ui": "^8.0.0-canary.74",
"@graphcommerce/prettier-config-pwa": "^8.0.0-canary.74",
"@graphcommerce/typescript-config-pwa": "^8.0.0-canary.74",
"@graphcommerce/ecommerce-ui": "^8.0.0-canary.75",
"@graphcommerce/eslint-config-pwa": "^8.0.0-canary.75",
"@graphcommerce/graphql": "^8.0.0-canary.75",
"@graphcommerce/magento-customer": "^8.0.0-canary.75",
"@graphcommerce/magento-store": "^8.0.0-canary.75",
"@graphcommerce/next-ui": "^8.0.0-canary.75",
"@graphcommerce/prettier-config-pwa": "^8.0.0-canary.75",
"@graphcommerce/typescript-config-pwa": "^8.0.0-canary.75",
"@lingui/core": "^4.2.1",
"@lingui/macro": "^4.2.1",
"@lingui/react": "^4.2.1",
Expand Down
2 changes: 2 additions & 0 deletions packages/algolia-search/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# @graphcommerce/algolia-search

## 8.0.0-canary.75

## 8.0.0-canary.74

## 8.0.0-canary.73
Expand Down
24 changes: 12 additions & 12 deletions packages/algolia-search/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@graphcommerce/algolia-search",
"homepage": "https://www.graphcommerce.org/",
"repository": "github:graphcommerce-org/graphcommerce",
"version": "8.0.0-canary.74",
"version": "8.0.0-canary.75",
"sideEffects": false,
"prettier": "@graphcommerce/prettier-config-pwa",
"eslintConfig": {
Expand All @@ -16,17 +16,17 @@
"react-instantsearch-hooks-web": "^6.47.3"
},
"peerDependencies": {
"@graphcommerce/ecommerce-ui": "^8.0.0-canary.74",
"@graphcommerce/eslint-config-pwa": "^8.0.0-canary.74",
"@graphcommerce/graphql": "^8.0.0-canary.74",
"@graphcommerce/graphql-mesh": "^8.0.0-canary.74",
"@graphcommerce/magento-product": "^8.0.0-canary.74",
"@graphcommerce/magento-search": "^8.0.0-canary.74",
"@graphcommerce/magento-store": "^8.0.0-canary.74",
"@graphcommerce/next-config": "^8.0.0-canary.74",
"@graphcommerce/next-ui": "^8.0.0-canary.74",
"@graphcommerce/prettier-config-pwa": "^8.0.0-canary.74",
"@graphcommerce/typescript-config-pwa": "^8.0.0-canary.74",
"@graphcommerce/ecommerce-ui": "^8.0.0-canary.75",
"@graphcommerce/eslint-config-pwa": "^8.0.0-canary.75",
"@graphcommerce/graphql": "^8.0.0-canary.75",
"@graphcommerce/graphql-mesh": "^8.0.0-canary.75",
"@graphcommerce/magento-product": "^8.0.0-canary.75",
"@graphcommerce/magento-search": "^8.0.0-canary.75",
"@graphcommerce/magento-store": "^8.0.0-canary.75",
"@graphcommerce/next-config": "^8.0.0-canary.75",
"@graphcommerce/next-ui": "^8.0.0-canary.75",
"@graphcommerce/prettier-config-pwa": "^8.0.0-canary.75",
"@graphcommerce/typescript-config-pwa": "^8.0.0-canary.75",
"@lingui/core": "^4.2.1",
"@lingui/macro": "^4.2.1",
"@lingui/react": "^4.2.1",
Expand Down
2 changes: 2 additions & 0 deletions packages/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# @graphcommerce/cli

## 8.0.0-canary.75

## 8.0.0-canary.74

## 8.0.0-canary.73
Expand Down
Loading

0 comments on commit a4cef15

Please sign in to comment.