@graphcommerce/magento-category 7.0.0-canary.21 → 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,206 @@
1
1
  # Change Log
2
2
 
3
- ## 7.0.0-canary.21
3
+ ## 7.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [`e55d8c390`](https://github.com/graphcommerce-org/graphcommerce/commit/e55d8c390d90b4bb7bab11c6a99027ac72bd7e3e) - Created a new sidebar layout system, can be configured with productFiltersLayout in the graphcommerce.config.js ([@paales](https://github.com/paales))
8
+
9
+ ### Minor Changes
10
+
11
+ - [#1961](https://github.com/graphcommerce-org/graphcommerce/pull/1961) [`4a759c662`](https://github.com/graphcommerce-org/graphcommerce/commit/4a759c66215eaa69edc342b898e05e8f92c3ba9a) - Add Open Graph meta tags to all pages ([@Giovanni-Schroevers](https://github.com/Giovanni-Schroevers))
12
+
13
+ - [#1977](https://github.com/graphcommerce-org/graphcommerce/pull/1977) [`61ff9b6e1`](https://github.com/graphcommerce-org/graphcommerce/commit/61ff9b6e1ff2aef1f497957f637391d5f01004c8) - Replace recursive GetCategoryStaticPaths query with fragment so the query can be injected ([@Giovanni-Schroevers](https://github.com/Giovanni-Schroevers))
14
+
15
+ ### Patch Changes
16
+
17
+ - [#1959](https://github.com/graphcommerce-org/graphcommerce/pull/1959) [`aacada269`](https://github.com/graphcommerce-org/graphcommerce/commit/aacada2691d345d2c819eda8668a30cb8d4e85b6) - Category description would have be too small on some breakppoints. We now define a maxWidth on the description so it always renders properly. ([@JoshuaS98](https://github.com/JoshuaS98))
18
+
19
+ - [#1914](https://github.com/graphcommerce-org/graphcommerce/pull/1914) [`c237f2f2c`](https://github.com/graphcommerce-org/graphcommerce/commit/c237f2f2c87d9e3c8aefc536a13b5b9203556f27) - Category pages now have the ability to select the displayed pageSize of a page if the backend provides multiple options. A non-default pageSize and a non-default sort option will now receive noindex meta tags when viewed. ([@paales](https://github.com/paales))
20
+
21
+ - [#2001](https://github.com/graphcommerce-org/graphcommerce/pull/2001) [`9cc5f8495`](https://github.com/graphcommerce-org/graphcommerce/commit/9cc5f8495d0970d457ac15eda4bb4e7cd3f8120a) - Migrate to productListLink, away from the ProductListLink component ([@paales](https://github.com/paales))
22
+
23
+ - [#2017](https://github.com/graphcommerce-org/graphcommerce/pull/2017) [`f5c2bcc57`](https://github.com/graphcommerce-org/graphcommerce/commit/f5c2bcc57120a94d1af71c6002d2e370c1c39f14) - Changed canonical link of paginated pages. So this matches the canonical structure of non paginated pages. ([@Jessevdpoel](https://github.com/Jessevdpoel))
24
+
25
+ ## 6.2.0-canary.98
26
+
27
+ ## 6.2.0-canary.97
28
+
29
+ ## 6.2.0-canary.96
30
+
31
+ ## 6.2.0-canary.95
32
+
33
+ ## 6.2.0-canary.94
34
+
35
+ ## 6.2.0-canary.93
36
+
37
+ ## 6.2.0-canary.92
38
+
39
+ ## 6.2.0-canary.91
40
+
41
+ ## 6.2.0-canary.90
42
+
43
+ ## 6.2.0-canary.89
44
+
45
+ ## 6.2.0-canary.88
46
+
47
+ ## 6.2.0-canary.87
48
+
49
+ ## 6.2.0-canary.86
50
+
51
+ ## 6.2.0-canary.85
52
+
53
+ ## 6.2.0-canary.84
54
+
55
+ ## 6.2.0-canary.83
56
+
57
+ ## 6.2.0-canary.82
58
+
59
+ ## 6.2.0-canary.81
60
+
61
+ ## 6.2.0-canary.80
62
+
63
+ ### Patch Changes
64
+
65
+ - [#2001](https://github.com/graphcommerce-org/graphcommerce/pull/2001) [`9cc5f8495`](https://github.com/graphcommerce-org/graphcommerce/commit/9cc5f8495d0970d457ac15eda4bb4e7cd3f8120a) - Migrate to productListLink, away from the ProductListLink component ([@paales](https://github.com/paales))
66
+
67
+ ## 6.2.0-canary.79
68
+
69
+ ## 6.2.0-canary.78
70
+
71
+ ## 6.2.0-canary.77
72
+
73
+ ### Patch Changes
74
+
75
+ - [#2017](https://github.com/graphcommerce-org/graphcommerce/pull/2017) [`f5c2bcc57`](https://github.com/graphcommerce-org/graphcommerce/commit/f5c2bcc57120a94d1af71c6002d2e370c1c39f14) - Changed canonical link of paginated pages. So this matches the canonical structure of non paginated pages. ([@Jessevdpoel](https://github.com/Jessevdpoel))
76
+
77
+ ## 6.2.0-canary.76
78
+
79
+ ## 6.2.0-canary.75
80
+
81
+ ## 6.2.0-canary.74
82
+
83
+ ## 6.2.0-canary.73
84
+
85
+ ## 6.2.0-canary.72
86
+
87
+ ## 6.2.0-canary.71
88
+
89
+ ## 6.2.0-canary.70
90
+
91
+ ## 6.2.0-canary.69
92
+
93
+ ## 6.2.0-canary.68
94
+
95
+ ## 6.2.0-canary.67
96
+
97
+ ## 6.2.0-canary.66
98
+
99
+ ## 6.2.0-canary.65
100
+
101
+ ## 6.2.0-canary.64
102
+
103
+ ## 6.2.0-canary.63
104
+
105
+ ## 6.2.0-canary.62
106
+
107
+ ## 6.2.0-canary.61
108
+
109
+ ## 6.2.0-canary.60
110
+
111
+ ## 6.2.0-canary.59
112
+
113
+ ### Minor Changes
114
+
115
+ - [#1977](https://github.com/graphcommerce-org/graphcommerce/pull/1977) [`61ff9b6e1`](https://github.com/graphcommerce-org/graphcommerce/commit/61ff9b6e1ff2aef1f497957f637391d5f01004c8) - Replace recursive GetCategoryStaticPaths query with fragment so the query can be injected ([@Giovanni-Schroevers](https://github.com/Giovanni-Schroevers))
116
+
117
+ ## 6.2.0-canary.58
118
+
119
+ ## 6.2.0-canary.57
120
+
121
+ ## 6.2.0-canary.56
122
+
123
+ ## 6.2.0-canary.55
124
+
125
+ ## 6.2.0-canary.54
126
+
127
+ ## 6.2.0-canary.53
128
+
129
+ ## 6.2.0-canary.52
130
+
131
+ ## 6.2.0-canary.51
132
+
133
+ ## 6.2.0-canary.50
134
+
135
+ ### Minor Changes
136
+
137
+ - [`e55d8c390`](https://github.com/graphcommerce-org/graphcommerce/commit/e55d8c390d90b4bb7bab11c6a99027ac72bd7e3e) - Created a new sidebar layout system, can be configured with productFiltersLayout in the graphcommerce.config.js ([@paales](https://github.com/paales))
138
+
139
+ ## 6.2.0-canary.49
140
+
141
+ ### Patch Changes
142
+
143
+ - [#1959](https://github.com/graphcommerce-org/graphcommerce/pull/1959) [`aacada269`](https://github.com/graphcommerce-org/graphcommerce/commit/aacada2691d345d2c819eda8668a30cb8d4e85b6) - Change the maxwidth of a category description to be a pixel based values instead of a percentage of the viewport width ([@JoshuaS98](https://github.com/JoshuaS98))
144
+
145
+ ## 6.2.0-canary.48
146
+
147
+ ### Minor Changes
148
+
149
+ - [#1961](https://github.com/graphcommerce-org/graphcommerce/pull/1961) [`4a759c662`](https://github.com/graphcommerce-org/graphcommerce/commit/4a759c66215eaa69edc342b898e05e8f92c3ba9a) - Add Open Graph meta tags to all pages ([@Giovanni-Schroevers](https://github.com/Giovanni-Schroevers))
150
+
151
+ ## 6.2.0-canary.47
152
+
153
+ ## 6.2.0-canary.46
154
+
155
+ ## 6.2.0-canary.45
156
+
157
+ ## 6.2.0-canary.44
158
+
159
+ ## 6.2.0-canary.43
160
+
161
+ ## 6.2.0-canary.42
162
+
163
+ ## 6.2.0-canary.41
164
+
165
+ ## 6.2.0-canary.40
166
+
167
+ ## 6.2.0-canary.39
168
+
169
+ ## 6.2.0-canary.38
170
+
171
+ ## 6.2.0-canary.37
172
+
173
+ ## 6.2.0-canary.36
174
+
175
+ ## 6.2.0-canary.35
176
+
177
+ ## 6.2.0-canary.34
178
+
179
+ ## 6.2.0-canary.33
180
+
181
+ ## 6.2.0-canary.32
182
+
183
+ ## 6.2.0-canary.31
184
+
185
+ ## 6.2.0-canary.30
186
+
187
+ ## 6.2.0-canary.29
188
+
189
+ ## 6.2.0-canary.28
190
+
191
+ ## 6.2.0-canary.27
192
+
193
+ ## 6.2.0-canary.26
194
+
195
+ ## 6.2.0-canary.25
196
+
197
+ ## 6.2.0-canary.24
198
+
199
+ ## 6.2.0-canary.23
200
+
201
+ ## 6.2.0-canary.22
202
+
203
+ ## 6.2.0-canary.21
4
204
 
5
205
  ## 6.2.0-canary.20
6
206
 
@@ -1,6 +1,6 @@
1
1
  import { filterNonNullableKeys } from '@graphcommerce/next-ui'
2
2
  import { Trans } from '@lingui/react'
3
- import { Breadcrumbs, BreadcrumbsProps, Container, Link, Typography } from '@mui/material'
3
+ import { Breadcrumbs, BreadcrumbsProps, Link, Typography } from '@mui/material'
4
4
  import { CategoryBreadcrumbFragment } from './CategoryBreadcrumb.gql'
5
5
 
6
6
  type CategoryPageBreadcrumbsProps = CategoryBreadcrumbFragment & Omit<BreadcrumbsProps, 'children'>
@@ -15,7 +15,7 @@ export function CategoryBreadcrumb(props: CategoryPageBreadcrumbsProps) {
15
15
  </Link>
16
16
  {filterNonNullableKeys(breadcrumbs, ['category_level'])
17
17
  .sort((a, b) => a.category_level - b.category_level)
18
- .map((breadcrumb, i) => (
18
+ .map((breadcrumb) => (
19
19
  <Link
20
20
  underline='hover'
21
21
  key={breadcrumb.category_uid}
@@ -1,7 +1,8 @@
1
1
  import { Scroller, ScrollerProvider } from '@graphcommerce/framer-scroller'
2
- import { ProductListLink, ProductListParams } from '@graphcommerce/magento-product'
2
+ import { ProductListParams } from '@graphcommerce/magento-product'
3
+ import { productListLink } from '@graphcommerce/magento-product/hooks/useProductListLink'
3
4
  import { extendableComponent } from '@graphcommerce/next-ui'
4
- import { Box, SxProps, Theme } from '@mui/material'
5
+ import { Box, Link, SxProps, Theme } from '@mui/material'
5
6
  import { CategoryChildrenFragment } from './CategoryChildren.gql'
6
7
 
7
8
  type CategoryChildrenProps = Omit<CategoryChildrenFragment, 'uid'> & {
@@ -40,13 +41,15 @@ export function CategoryChildren(props: CategoryChildrenProps) {
40
41
  if (!cat?.url_path || !cat.name || !cat.include_in_menu) return null
41
42
 
42
43
  return (
43
- <ProductListLink
44
+ <Link
44
45
  key={cat.url_path}
45
46
  underline='none'
46
47
  color='inherit'
47
- url={cat.url_path}
48
- filters={{ category_uid: { eq: cat.uid } }}
49
- sort={params.sort}
48
+ href={productListLink({
49
+ ...params,
50
+ url: cat.url_path,
51
+ filters: { category_uid: { eq: cat.uid } },
52
+ })}
50
53
  className={classes.link}
51
54
  sx={(theme) => ({
52
55
  whiteSpace: 'nowrap',
@@ -78,7 +81,7 @@ export function CategoryChildren(props: CategoryChildrenProps) {
78
81
  })}
79
82
  >
80
83
  {cat.name}
81
- </ProductListLink>
84
+ </Link>
82
85
  )
83
86
  })}
84
87
  </Scroller>
@@ -25,12 +25,7 @@ export function CategoryDescription(props: CategoryDescriptionProps) {
25
25
  margin: `0 auto ${theme.spacings.sm}`,
26
26
  padding: `0 ${theme.page.horizontal}`,
27
27
  textAlign: 'center',
28
- [theme.breakpoints.up('md')]: {
29
- maxWidth: '50%',
30
- },
31
- [theme.breakpoints.up('xl')]: {
32
- maxWidth: '30%',
33
- },
28
+ maxWidth: { md: '900px' },
34
29
  typography: 'subtitle1',
35
30
  }),
36
31
  ...(Array.isArray(sx) ? sx : [sx]),
@@ -1,6 +1,6 @@
1
- import { ProductListLink } from '@graphcommerce/magento-product'
1
+ import { productListLink } from '@graphcommerce/magento-product'
2
2
  import { breakpointVal, Row, extendableComponent } from '@graphcommerce/next-ui'
3
- import { Box, SxProps, Theme, Typography } from '@mui/material'
3
+ import { Box, Link, SxProps, Theme, Typography } from '@mui/material'
4
4
  import React from 'react'
5
5
  import { CategoryHeroNavFragment } from './CategoryHeroNav.gql'
6
6
 
@@ -88,18 +88,20 @@ export function CategoryHeroNav({ children, title, asset, sx = [] }: CategoryHer
88
88
  if (!category?.url_path || !category.uid || !category.name || !category.include_in_menu)
89
89
  return null
90
90
  return (
91
- <ProductListLink
91
+ <Link
92
92
  underline='none'
93
93
  color='textPrimary'
94
- url={category.url_path}
95
- filters={{ category_uid: { eq: category.uid } }}
96
- sort={{}}
94
+ href={productListLink({
95
+ url: category.url_path,
96
+ filters: { category_uid: { eq: category.uid } },
97
+ sort: {},
98
+ })}
97
99
  key={category.uid}
98
100
  >
99
101
  <Typography variant='h4' component='span'>
100
102
  {category.name}
101
103
  </Typography>
102
- </ProductListLink>
104
+ </Link>
103
105
  )
104
106
  })}
105
107
  </Box>
@@ -2,4 +2,5 @@ fragment CategoryMeta on CategoryTree {
2
2
  name
3
3
  meta_title
4
4
  meta_description
5
+ image
5
6
  }
@@ -12,13 +12,14 @@ export type CategoryMetaProps = CategoryMetaFragment &
12
12
  }
13
13
 
14
14
  export function CategoryMeta(props: CategoryMetaProps) {
15
- const { meta_title, meta_description, name, params } = props
16
- let { title, metaDescription, metaRobots, canonical } = props
15
+ const { meta_title, meta_description, name, params, image, ogImageUseFallback } = props
16
+ let { title, metaDescription, metaRobots, canonical, ogImage } = props
17
17
  if (!title) title = ''
18
18
  if (!metaDescription) metaDescription = ''
19
19
 
20
20
  if (!title && meta_title) title = meta_title
21
21
  if (!title && name) title = name
22
+ if (!ogImage && image) ogImage = image
22
23
  if (!metaDescription && meta_description) metaDescription = meta_description
23
24
 
24
25
  if (params?.url && !canonical) canonical = `/${params.url}`
@@ -51,7 +52,9 @@ export function CategoryMeta(props: CategoryMetaProps) {
51
52
  title={titleTrans}
52
53
  metaDescription={metaDescriptionTrans}
53
54
  metaRobots={noIndex ? ['noindex'] : metaRobots}
54
- canonical={isPaginated ? `${canonical}/q/page/${currentPage}` : canonical}
55
+ canonical={isPaginated ? `${canonical}/page/${currentPage}` : canonical}
56
+ ogImage={ogImage}
57
+ ogImageUseFallback={ogImageUseFallback}
55
58
  />
56
59
  )
57
60
  }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/magento-category",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "7.0.0-canary.21",
5
+ "version": "7.0.0",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -12,21 +12,22 @@
12
12
  }
13
13
  },
14
14
  "devDependencies": {
15
- "@graphcommerce/eslint-config-pwa": "7.0.0-canary.21",
16
- "@graphcommerce/prettier-config-pwa": "7.0.0-canary.21",
17
- "@graphcommerce/typescript-config-pwa": "7.0.0-canary.21"
15
+ "@graphcommerce/eslint-config-pwa": "7.0.0",
16
+ "@graphcommerce/prettier-config-pwa": "7.0.0",
17
+ "@graphcommerce/typescript-config-pwa": "7.0.0"
18
18
  },
19
19
  "dependencies": {
20
- "@graphcommerce/framer-scroller": "7.0.0-canary.21",
21
- "@graphcommerce/graphql": "7.0.0-canary.21",
22
- "@graphcommerce/image": "7.0.0-canary.21",
23
- "@graphcommerce/magento-product": "7.0.0-canary.21",
24
- "@graphcommerce/magento-store": "7.0.0-canary.21",
25
- "@graphcommerce/next-ui": "7.0.0-canary.21"
20
+ "@graphcommerce/framer-scroller": "7.0.0",
21
+ "@graphcommerce/graphql": "7.0.0",
22
+ "@graphcommerce/image": "7.0.0",
23
+ "@graphcommerce/magento-product": "7.0.0",
24
+ "@graphcommerce/magento-store": "7.0.0",
25
+ "@graphcommerce/next-ui": "7.0.0"
26
26
  },
27
27
  "peerDependencies": {
28
- "@lingui/react": "^3.13.2",
29
- "@lingui/core": "^3.13.2",
28
+ "@lingui/react": "^4.2.1",
29
+ "@lingui/core": "^4.2.1",
30
+ "@lingui/macro": "^4.2.1",
30
31
  "@mui/material": "^5.10.16",
31
32
  "next": "^13.2.0",
32
33
  "react": "^18.2.0",
@@ -0,0 +1,24 @@
1
+ fragment CategoryPathFragment on CategoryTree @injectable {
2
+ uid
3
+ url_path
4
+ children {
5
+ uid
6
+ url_path
7
+ children {
8
+ uid
9
+ url_path
10
+ children {
11
+ uid
12
+ url_path
13
+ children {
14
+ uid
15
+ url_path
16
+ children {
17
+ uid
18
+ url_path
19
+ }
20
+ }
21
+ }
22
+ }
23
+ }
24
+ }
@@ -1,28 +1,7 @@
1
1
  query GetCategoryStaticPaths {
2
2
  categories {
3
3
  items {
4
- uid
5
- url_path
6
- children {
7
- uid
8
- url_path
9
- children {
10
- uid
11
- url_path
12
- children {
13
- uid
14
- url_path
15
- children {
16
- uid
17
- url_path
18
- children {
19
- uid
20
- url_path
21
- }
22
- }
23
- }
24
- }
25
- }
4
+ ...CategoryPathFragment
26
5
  }
27
6
  }
28
7
  }