@graphcommerce/docs 8.1.0-canary.9 → 9.0.0-canary.55
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 +98 -0
- package/framework/config.md +36 -5
- package/framework/icons.md +14 -20
- package/framework/plugins-graphql.md +3 -3
- package/framework/preview-mode.md +31 -0
- package/framework/static-generation.md +4 -2
- package/framework/theming.md +6 -0
- package/getting-started/pages.md +10 -12
- package/package.json +2 -2
- package/roadmap.md +17 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,103 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 9.0.0-canary.55
|
|
4
|
+
|
|
5
|
+
## 9.0.0-canary.54
|
|
6
|
+
|
|
7
|
+
## 8.1.0-canary.53
|
|
8
|
+
|
|
9
|
+
## 8.1.0-canary.52
|
|
10
|
+
|
|
11
|
+
## 8.1.0-canary.51
|
|
12
|
+
|
|
13
|
+
## 8.1.0-canary.50
|
|
14
|
+
|
|
15
|
+
## 8.1.0-canary.49
|
|
16
|
+
|
|
17
|
+
## 8.1.0-canary.48
|
|
18
|
+
|
|
19
|
+
## 8.1.0-canary.47
|
|
20
|
+
|
|
21
|
+
## 8.1.0-canary.46
|
|
22
|
+
|
|
23
|
+
## 8.1.0-canary.45
|
|
24
|
+
|
|
25
|
+
## 8.1.0-canary.44
|
|
26
|
+
|
|
27
|
+
## 8.1.0-canary.43
|
|
28
|
+
|
|
29
|
+
## 8.1.0-canary.42
|
|
30
|
+
|
|
31
|
+
## 8.1.0-canary.41
|
|
32
|
+
|
|
33
|
+
### Patch Changes
|
|
34
|
+
|
|
35
|
+
- [#2242](https://github.com/graphcommerce-org/graphcommerce/pull/2242) [`a4cce76`](https://github.com/graphcommerce-org/graphcommerce/commit/a4cce76ca37af2bec604e953ada4bb11bd91f55d) - Add option to show an extended version of the pagination component. Configurable via the "productListPaginationVariant" key in your graphcommerce.config.js
|
|
36
|
+
COMPACT means: "< Page X of Y >"
|
|
37
|
+
EXTENDED means: "< 1 2 ... [5] ... 10 11 >" ([@FrankHarland](https://github.com/FrankHarland))
|
|
38
|
+
|
|
39
|
+
## 8.1.0-canary.40
|
|
40
|
+
|
|
41
|
+
## 8.1.0-canary.39
|
|
42
|
+
|
|
43
|
+
## 8.1.0-canary.38
|
|
44
|
+
|
|
45
|
+
## 8.1.0-canary.37
|
|
46
|
+
|
|
47
|
+
## 8.1.0-canary.36
|
|
48
|
+
|
|
49
|
+
## 8.1.0-canary.35
|
|
50
|
+
|
|
51
|
+
## 8.1.0-canary.34
|
|
52
|
+
|
|
53
|
+
## 8.1.0-canary.33
|
|
54
|
+
|
|
55
|
+
## 8.1.0-canary.32
|
|
56
|
+
|
|
57
|
+
## 8.1.0-canary.31
|
|
58
|
+
|
|
59
|
+
## 8.1.0-canary.30
|
|
60
|
+
|
|
61
|
+
## 8.1.0-canary.29
|
|
62
|
+
|
|
63
|
+
## 8.1.0-canary.28
|
|
64
|
+
|
|
65
|
+
## 8.1.0-canary.27
|
|
66
|
+
|
|
67
|
+
## 8.1.0-canary.26
|
|
68
|
+
|
|
69
|
+
## 8.1.0-canary.25
|
|
70
|
+
|
|
71
|
+
## 8.1.0-canary.24
|
|
72
|
+
|
|
73
|
+
## 8.1.0-canary.23
|
|
74
|
+
|
|
75
|
+
## 8.1.0-canary.22
|
|
76
|
+
|
|
77
|
+
## 8.1.0-canary.21
|
|
78
|
+
|
|
79
|
+
## 8.1.0-canary.20
|
|
80
|
+
|
|
81
|
+
## 8.1.0-canary.19
|
|
82
|
+
|
|
83
|
+
## 8.1.0-canary.18
|
|
84
|
+
|
|
85
|
+
## 8.1.0-canary.17
|
|
86
|
+
|
|
87
|
+
## 8.1.0-canary.16
|
|
88
|
+
|
|
89
|
+
## 8.1.0-canary.15
|
|
90
|
+
|
|
91
|
+
## 8.1.0-canary.14
|
|
92
|
+
|
|
93
|
+
## 8.1.0-canary.13
|
|
94
|
+
|
|
95
|
+
## 8.1.0-canary.12
|
|
96
|
+
|
|
97
|
+
## 8.1.0-canary.11
|
|
98
|
+
|
|
99
|
+
## 8.1.0-canary.10
|
|
100
|
+
|
|
3
101
|
## 8.1.0-canary.9
|
|
4
102
|
|
|
5
103
|
### Patch Changes
|
package/framework/config.md
CHANGED
|
@@ -109,10 +109,20 @@ GraphQL Magento endpoint.
|
|
|
109
109
|
Examples:
|
|
110
110
|
- https://magento2.test/graphql
|
|
111
111
|
|
|
112
|
+
#### magentoVersion: number (required)
|
|
113
|
+
|
|
114
|
+
Version of the Magento backend.
|
|
115
|
+
|
|
116
|
+
Values: 245, 246, 247 for Magento 2.4.5, 2.4.6, 2.4.7 respectively.
|
|
117
|
+
|
|
112
118
|
#### storefront: [GraphCommerceStorefrontConfig](#GraphCommerceStorefrontConfig)[] (required)
|
|
113
119
|
|
|
114
120
|
All storefront configuration for the project
|
|
115
121
|
|
|
122
|
+
#### breadcrumbs: boolean = `false`
|
|
123
|
+
|
|
124
|
+
Configuration for the SidebarGallery component
|
|
125
|
+
|
|
116
126
|
#### cartDisplayPricesInclTax: boolean
|
|
117
127
|
|
|
118
128
|
Due to a limitation of the GraphQL API it is not possible to determine if a cart should be displayed including or excluding tax.
|
|
@@ -159,16 +169,24 @@ Determines if, after adding a cross-sell item to the cart, the user should be re
|
|
|
159
169
|
|
|
160
170
|
Default: 'false'
|
|
161
171
|
|
|
162
|
-
####
|
|
172
|
+
#### customerAddressNoteEnable: boolean
|
|
173
|
+
|
|
174
|
+
Enables the shipping notes field in the checkout
|
|
175
|
+
|
|
176
|
+
#### customerCompanyFieldsEnable: boolean
|
|
163
177
|
|
|
164
|
-
|
|
165
|
-
|
|
178
|
+
Enables company fields inside the checkout:
|
|
179
|
+
- Company name
|
|
180
|
+
- VAT ID
|
|
166
181
|
|
|
167
|
-
|
|
168
|
-
|
|
182
|
+
#### customerDeleteEnabled: boolean
|
|
183
|
+
|
|
184
|
+
Enable customer account deletion through the account section
|
|
169
185
|
|
|
170
186
|
#### dataLayer: [DatalayerConfig](#DatalayerConfig)
|
|
171
187
|
|
|
188
|
+
Datalayer config
|
|
189
|
+
|
|
172
190
|
#### debug: [GraphCommerceDebugConfig](#GraphCommerceDebugConfig)
|
|
173
191
|
|
|
174
192
|
Debug configuration for GraphCommerce
|
|
@@ -283,6 +301,13 @@ SIDEBAR: Will be rendered as a sidebar on desktop and horizontal chips on mobile
|
|
|
283
301
|
|
|
284
302
|
Product filters with better UI for mobile and desktop.
|
|
285
303
|
|
|
304
|
+
#### productListPaginationVariant: COMPACT | EXTENDED = `COMPACT`
|
|
305
|
+
|
|
306
|
+
Pagination variant for the product listings.
|
|
307
|
+
|
|
308
|
+
COMPACT means: "< Page X of Y >"
|
|
309
|
+
EXTENDED means: "< 1 2 ... 4 [5] 6 ... 10 11 >"
|
|
310
|
+
|
|
286
311
|
#### productRoute: string
|
|
287
312
|
|
|
288
313
|
By default we route products to /p/[url] but you can change this to /product/[url] if you wish.
|
|
@@ -372,6 +397,12 @@ Examples:
|
|
|
372
397
|
|
|
373
398
|
Due to a limitation of the GraphQL API it is not possible to determine if a cart should be displayed including or excluding tax.
|
|
374
399
|
|
|
400
|
+
#### customerCompanyFieldsEnable: boolean
|
|
401
|
+
|
|
402
|
+
Enables company fields inside the checkout:
|
|
403
|
+
- Company name
|
|
404
|
+
- VAT ID
|
|
405
|
+
|
|
375
406
|
#### defaultLocale: boolean
|
|
376
407
|
|
|
377
408
|
There can only be one entry with defaultLocale set to true.
|
package/framework/icons.md
CHANGED
|
@@ -160,13 +160,11 @@ imported from there (the `<IconSvg>` component will convert the relative path to
|
|
|
160
160
|
an absolute path)
|
|
161
161
|
|
|
162
162
|
```tsx
|
|
163
|
-
|
|
163
|
+
//...
|
|
164
164
|
import customIcon from './my-custom-icon.svg'
|
|
165
165
|
|
|
166
|
-
|
|
167
|
-
return
|
|
168
|
-
<IconSvg src={iconSucustomIconpport} size='large' />
|
|
169
|
-
)
|
|
166
|
+
//...
|
|
167
|
+
return <IconSvg src={customIcon} size='large' />
|
|
170
168
|
```
|
|
171
169
|
|
|
172
170
|
To use a custom icon in your component, follow the same steps as described in
|
|
@@ -177,27 +175,23 @@ the [previous paragraph](#using-a-different-icon-from-the-icon-pack).
|
|
|
177
175
|
|
|
178
176
|
## Using a different icon pack
|
|
179
177
|
|
|
180
|
-
To override all or multiple icons with your own,
|
|
181
|
-
|
|
178
|
+
To override all or multiple icons with your own, you can write a replace plugin
|
|
179
|
+
to achieve this:
|
|
182
180
|
|
|
183
181
|
```tsx
|
|
184
|
-
// /
|
|
185
|
-
import {
|
|
182
|
+
// /plugins/icons/Icons.ts
|
|
183
|
+
import { PluginConfig } from '@graphcommerce/next-config'
|
|
184
|
+
import iconBasket from './basket.svg'
|
|
186
185
|
import customCartIcon from './my-custom-cart-icon.svg'
|
|
187
186
|
import customChatIcon from './my-custom-chat-icon.svg'
|
|
188
187
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
188
|
+
export const config: PluginConfig = {
|
|
189
|
+
type: 'replace',
|
|
190
|
+
module: '@graphcommerce/next-ui',
|
|
191
|
+
}
|
|
192
192
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
[iconCart, customCartIcon],
|
|
196
|
-
[iconChat, customChatIcon],
|
|
197
|
-
],
|
|
198
|
-
},
|
|
199
|
-
})
|
|
200
|
-
// ...
|
|
193
|
+
export const iconShoppingBag = iconBasket
|
|
194
|
+
export const iconChart = iconBasket
|
|
201
195
|
```
|
|
202
196
|
|
|
203
197
|
All icons must meet the svg specifications as described above
|
|
@@ -41,7 +41,7 @@ query ProductList(
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
# Fragment used for a ProductListItem used when rendering any listing
|
|
44
|
-
fragment ProductListItem on ProductInterface
|
|
44
|
+
fragment ProductListItem on ProductInterface {
|
|
45
45
|
uid
|
|
46
46
|
...ProductLink
|
|
47
47
|
sku
|
|
@@ -59,8 +59,8 @@ fragment ProductListItem on ProductInterface @injectable {
|
|
|
59
59
|
|
|
60
60
|
## How to modify an existing query?
|
|
61
61
|
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
Fragments inside GraphCommerce allows you to inject our own fields in the
|
|
63
|
+
fragments.
|
|
64
64
|
|
|
65
65
|
```graphql
|
|
66
66
|
fragment MyCustomFragment on ProductInterface
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Preview mode
|
|
2
|
+
|
|
3
|
+
GraphCommerce implements Next.js' preview mode which allows you to view the
|
|
4
|
+
realtime data from Magento and Hygraph.
|
|
5
|
+
|
|
6
|
+
You can select whether to view Hygraph content in the DRAFT of PUBLISHED stage
|
|
7
|
+
(or other if configured).
|
|
8
|
+
|
|
9
|
+
You can Revalidate / Regenerate a page to make sure it is always up to date when
|
|
10
|
+
viewing.
|
|
11
|
+
|
|
12
|
+
It bypasses all caches from Next.js, Magento and Hygraph (this means that
|
|
13
|
+
Preview Mode is expdcted to be slower but does show your changes directly).
|
|
14
|
+
|
|
15
|
+
## Accessing preview mode
|
|
16
|
+
|
|
17
|
+
To enter preview mode press `ALT + Backtick` (\`) on your keyboard. This will
|
|
18
|
+
open the preview mode toolbar on the bottom of the screen.
|
|
19
|
+
|
|
20
|
+

|
|
21
|
+
|
|
22
|
+
Fill in the secret and press the chevron button to enter preview mode.
|
|
23
|
+
|
|
24
|
+
You are now greeted with the preview mode toolbar:
|
|
25
|
+
|
|
26
|
+

|
|
27
|
+
|
|
28
|
+
## Enabling preview mode
|
|
29
|
+
|
|
30
|
+
Configure the `previewSecret` in your `graphcommerce.config.js` file to enable
|
|
31
|
+
preview mode.
|
|
@@ -43,8 +43,10 @@ data needed to render the layout (header, footer, menu etc.)
|
|
|
43
43
|
|
|
44
44
|
export const getStaticProps: GetPageStaticProps = async ({ locale }) => {
|
|
45
45
|
...
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
const layout = staticClient.query({
|
|
47
|
+
query: LayoutDocument,
|
|
48
|
+
fetchPolicy: cacheFirst(staticClient),
|
|
49
|
+
})
|
|
48
50
|
|
|
49
51
|
return {
|
|
50
52
|
props: {
|
package/framework/theming.md
CHANGED
|
@@ -246,6 +246,12 @@ width, borderRadius and margin. Performance-wise, font-size and line-height
|
|
|
246
246
|
should not be scaled with responsiveVal. To learn more, look into
|
|
247
247
|
[responsive font sizes](../framework/typography.md).
|
|
248
248
|
|
|
249
|
+
## Disabling darkmode or lightmode site wide
|
|
250
|
+
|
|
251
|
+
Remove light={lightTheme} or dark={darkTheme} from the
|
|
252
|
+
`<DarkLightModeThemeProvider />` in \_app.tsx to disable darkmode or lightmode
|
|
253
|
+
site wide.
|
|
254
|
+
|
|
249
255
|
## Next steps
|
|
250
256
|
|
|
251
257
|
- Learn about [icons](../framework/icons.md) in GraphCommerce
|
package/getting-started/pages.md
CHANGED
|
@@ -93,9 +93,9 @@ AboutUs.pageOptions = pageOptions
|
|
|
93
93
|
|
|
94
94
|
export default AboutUs
|
|
95
95
|
|
|
96
|
-
export const getStaticProps: GetPageStaticProps = async (
|
|
97
|
-
const client = graphqlSharedClient(
|
|
98
|
-
const staticClient = graphqlSsrClient(
|
|
96
|
+
export const getStaticProps: GetPageStaticProps = async (context) => {
|
|
97
|
+
const client = graphqlSharedClient(context)
|
|
98
|
+
const staticClient = graphqlSsrClient(context)
|
|
99
99
|
|
|
100
100
|
const conf = client.query({ query: StoreConfigDocument })
|
|
101
101
|
const layout = staticClient.query({
|
|
@@ -210,9 +210,9 @@ AboutUs.pageOptions = pageOptions
|
|
|
210
210
|
|
|
211
211
|
export default AboutUs
|
|
212
212
|
|
|
213
|
-
export const getStaticProps: GetPageStaticProps = async (
|
|
214
|
-
const client = graphqlSharedClient(
|
|
215
|
-
const staticClient = graphqlSsrClient(
|
|
213
|
+
export const getStaticProps: GetPageStaticProps = async (context) => {
|
|
214
|
+
const client = graphqlSharedClient(context)
|
|
215
|
+
const staticClient = graphqlSsrClient(context)
|
|
216
216
|
|
|
217
217
|
const conf = client.query({ query: StoreConfigDocument })
|
|
218
218
|
const page = hygraphPageContent(staticClient, 'about/about-us')
|
|
@@ -259,12 +259,10 @@ export const getStaticPaths: GetPageStaticPaths = (context) => ({
|
|
|
259
259
|
fallback: 'blocking',
|
|
260
260
|
})
|
|
261
261
|
|
|
262
|
-
export const getStaticProps: GetPageStaticProps = async ({
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
const client = graphqlSharedClient(locale)
|
|
267
|
-
const staticClient = graphqlSsrClient(locale)
|
|
262
|
+
export const getStaticProps: GetPageStaticProps = async (context) => {
|
|
263
|
+
const { params } = context
|
|
264
|
+
const client = graphqlSharedClient(context)
|
|
265
|
+
const staticClient = graphqlSsrClient(context)
|
|
268
266
|
|
|
269
267
|
const conf = client.query({ query: StoreConfigDocument })
|
|
270
268
|
const page = hygraphPageContent(staticClient, `about/${params?.url}`)
|
package/package.json
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
"name": "@graphcommerce/docs",
|
|
3
3
|
"homepage": "https://www.graphcommerce.org/docs",
|
|
4
4
|
"repository": "github:graphcommerce-org/graphcommerce/docs",
|
|
5
|
-
"version": "
|
|
5
|
+
"version": "9.0.0-canary.55",
|
|
6
6
|
"sideEffects": true,
|
|
7
7
|
"peerDependencies": {
|
|
8
|
-
"@graphcommerce/prettier-config-pwa": "^
|
|
8
|
+
"@graphcommerce/prettier-config-pwa": "^9.0.0-canary.55"
|
|
9
9
|
},
|
|
10
10
|
"prettier": "@graphcommerce/prettier-config-pwa"
|
|
11
11
|
}
|
package/roadmap.md
CHANGED
|
@@ -11,26 +11,16 @@ roadmap.
|
|
|
11
11
|
|
|
12
12
|
[Upcoming in the next release](https://github.com/graphcommerce-org/graphcommerce/releases?q=prerelease%3Atrue&expanded=true)
|
|
13
13
|
|
|
14
|
-
- [ ] Google Datalayer improvements to better handling gtag.js or GTM
|
|
15
14
|
- [ ] Product page gallery improvements: Grid of images, animated thumbnails,
|
|
16
15
|
Video support + disable zoom feature.
|
|
17
|
-
- [ ] Web Vitals: Reduce Total Blocking Time, to improve INP metic.
|
|
18
|
-
- [ ] Web Vitals: Defer rendering of elements further on the page, to improve
|
|
19
|
-
INP metic.
|
|
20
|
-
- [ ] Magento Open Source GraphQL API Coverage with detailed GraphQL analysis
|
|
21
|
-
per version.
|
|
22
16
|
- [ ] Create a generic CMS integration framework, removing the hard Hygraph
|
|
23
17
|
requirement
|
|
24
18
|
- [ ] Web Migration to next/image in favor of @graphcommerce/image
|
|
25
|
-
- [ ] Improved category navigation: Navigate to sibling categories + Category
|
|
26
|
-
tree navigation in sidebar.
|
|
27
|
-
- [ ] i18n configuration separation from URL structure.
|
|
28
19
|
- [ ] Improved cache invalidation logic for category and product pages by using
|
|
29
20
|
the Varnish PURGE functionality of Magento.
|
|
30
|
-
- [ ] Customer specific pricing support for category and product pages.
|
|
31
21
|
- [ ] Support for very large carts with 100+ items.
|
|
32
|
-
- [ ]
|
|
33
|
-
|
|
22
|
+
- [ ] Abstractions for integration with multiple catalog/search API's like
|
|
23
|
+
Algolia, Magento Live Search and various layered navigation modules.
|
|
34
24
|
|
|
35
25
|
## Considering / researching
|
|
36
26
|
|
|
@@ -44,13 +34,26 @@ roadmap.
|
|
|
44
34
|
- [ ] Store locator
|
|
45
35
|
- [ ] PageBuilder support
|
|
46
36
|
[depends on ↗](https://github.com/magento/magento2/issues/37768)
|
|
47
|
-
- [ ] Abstractions for integration with multiple catalog/search API's like
|
|
48
|
-
Algolia, Magento Live Search and various layered navigation modules.
|
|
49
37
|
|
|
50
38
|
## Released
|
|
51
39
|
|
|
52
40
|
[See all releases](https://github.com/graphcommerce-org/graphcommerce/releases?q=prerelease%3Afalse+&expanded=true)
|
|
53
41
|
|
|
42
|
+
- [x] Web Vitals: Reduce Total Blocking Time, to improve INP metic.
|
|
43
|
+
- [x] Web Vitals: Defer rendering of elements further on the page, to improve
|
|
44
|
+
INP metic.
|
|
45
|
+
- [x] Magento Open Source GraphQL API Coverage with detailed GraphQL analysis
|
|
46
|
+
per version.
|
|
47
|
+
- [x] Plugin system redesign so typescript correctly identifies plugins and can
|
|
48
|
+
type check all the integrations.
|
|
49
|
+
- [x] Google Datalayer improvements to better handling gtag.js or GTM
|
|
50
|
+
- [x] Improved category navigation: Navigate to sibling categories + Category
|
|
51
|
+
tree navigation in sidebar.
|
|
52
|
+
- [x] i18n configuration separation from URL structure.
|
|
53
|
+
- [x] Customer specific pricing support for category and product pages.
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
54
57
|
- [x] Product page gallery improvements: Thumbnails
|
|
55
58
|
- [x] Major improvements to Accessibility
|
|
56
59
|
[issue ↗](https://github.com/graphcommerce-org/graphcommerce/issues/1995)
|