@graphcommerce/docs 10.0.0-canary.67 → 10.0.0-canary.68
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 +2 -0
- package/framework/config.md +92 -154
- package/framework/icons.md +1 -1
- package/framework/theming.md +6 -6
- package/framework/typography.md +1 -1
- package/getting-started/graphcms-component.md +1 -1
- package/getting-started/readme.md +1 -1
- package/package.json +2 -2
- package/upgrading/graphcommerce-9-to-10.md +24 -0
- package/upgrading/readme.md +1 -0
package/CHANGELOG.md
CHANGED
package/framework/config.md
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
<!-- Automatically generated from Config.graphqls -->
|
|
2
|
-
|
|
3
2
|
### DatalayerConfig
|
|
4
3
|
|
|
5
4
|
GoogleDatalayerConfig to allow enabling certain aspects of the datalayer
|
|
@@ -10,29 +9,20 @@ Enable core web vitals tracking for GraphCommerce
|
|
|
10
9
|
|
|
11
10
|
# GraphCommerce configuration system
|
|
12
11
|
|
|
13
|
-
Global GraphCommerce configuration can be configured in your
|
|
14
|
-
|
|
15
|
-
validated on startup.
|
|
12
|
+
Global GraphCommerce configuration can be configured in your `graphcommerce.config.js` file
|
|
13
|
+
in the root of your project and are automatically validated on startup.
|
|
16
14
|
|
|
17
15
|
## Configuring with the configuration file.
|
|
18
16
|
|
|
19
|
-
The configuration file is a javascript file that exports a `GraphCommerceConfig`
|
|
20
|
-
object. See graphcommerce.config.js.example for an example.
|
|
17
|
+
The configuration file is a javascript file that exports a `GraphCommerceConfig` object. See graphcommerce.config.js.example for an example.
|
|
21
18
|
|
|
22
19
|
## Using configuration
|
|
23
20
|
|
|
24
|
-
Configuration can be accessed in your project
|
|
25
|
-
`import.meta.graphCommerce` object.
|
|
21
|
+
Configuration can be accessed in your project by importing the config from `@graphcommerce/next-config/config`.
|
|
26
22
|
|
|
27
23
|
```tsx
|
|
24
|
+
import { storefrontAll, storefrontConfig, storefrontConfigDefault, useStorefrontConfig } from '@graphcommerce/next-ui'
|
|
28
25
|
import { cartDisplayPricesInclTax } from '@graphcommerce/next-config/config'
|
|
29
|
-
import {
|
|
30
|
-
storefrontAll,
|
|
31
|
-
storefrontConfig,
|
|
32
|
-
storefrontConfigDefault,
|
|
33
|
-
useStorefrontConfig,
|
|
34
|
-
} from '@graphcommerce/next-ui'
|
|
35
|
-
|
|
36
26
|
// Accessing a global value
|
|
37
27
|
const globalConf = cartDisplayPricesInclTax
|
|
38
28
|
|
|
@@ -60,28 +50,25 @@ endpoint: '{graphCommerce.magentoEndpoint}'
|
|
|
60
50
|
|
|
61
51
|
## Environment variables to override configuration
|
|
62
52
|
|
|
63
|
-
Configuration values can be overwriten by environment variables, with the
|
|
64
|
-
following rules:
|
|
65
|
-
|
|
53
|
+
Configuration values can be overwriten by environment variables, with the following rules:
|
|
66
54
|
- Convert from camelCase to `SCREAMING_SNAKE_CASE`
|
|
67
55
|
- Prefix with `GC_`
|
|
68
56
|
- Arrays can be indexed with `_0`, `_1`, `_2`, etc.
|
|
69
57
|
- Objects can be accessed with `_<key>`.
|
|
70
58
|
|
|
71
59
|
Examples:
|
|
72
|
-
|
|
73
60
|
- `limitSsg` -> `GC_LIMIT_SSG="1"`
|
|
74
61
|
- `storefront[0].locale` -> `GC_STOREFRONT_0_LOCALE="en"`
|
|
75
62
|
- `debug.pluginStatus` -> `GC_DEBUG_PLUGIN_STATUS="1"`
|
|
76
63
|
|
|
64
|
+
|
|
77
65
|
## Exporting current configuration to environment variables
|
|
78
66
|
|
|
79
67
|
You can export configuration by running `yarn graphcommerce export-config`
|
|
80
68
|
|
|
81
69
|
## Extending the configuration in your project
|
|
82
70
|
|
|
83
|
-
Create a graphql/Config.graphqls file in your project and extend the
|
|
84
|
-
GraphCommerceConfig, GraphCommerceStorefrontConfig inputs to add configuration.
|
|
71
|
+
Create a graphql/Config.graphqls file in your project and extend the GraphCommerceConfig, GraphCommerceStorefrontConfig inputs to add configuration.
|
|
85
72
|
|
|
86
73
|
```graphql
|
|
87
74
|
extend input GraphCommerceConfig {
|
|
@@ -103,7 +90,6 @@ Below is a list of all possible configurations that can be set by GraphCommerce.
|
|
|
103
90
|
The canonical base URL is used for SEO purposes.
|
|
104
91
|
|
|
105
92
|
Examples:
|
|
106
|
-
|
|
107
93
|
- https://example.com
|
|
108
94
|
- https://example.com/en
|
|
109
95
|
- https://example.com/en-US
|
|
@@ -112,8 +98,7 @@ Examples:
|
|
|
112
98
|
|
|
113
99
|
The Hygraph endpoint.
|
|
114
100
|
|
|
115
|
-
> Read-only endpoint that allows low latency and high read-throughput content
|
|
116
|
-
> delivery.
|
|
101
|
+
> Read-only endpoint that allows low latency and high read-throughput content delivery.
|
|
117
102
|
|
|
118
103
|
Project settings -> API Access -> High Performance Read-only Content API
|
|
119
104
|
|
|
@@ -122,7 +107,6 @@ Project settings -> API Access -> High Performance Read-only Content API
|
|
|
122
107
|
GraphQL Magento endpoint.
|
|
123
108
|
|
|
124
109
|
Examples:
|
|
125
|
-
|
|
126
110
|
- https://magento2.test/graphql
|
|
127
111
|
|
|
128
112
|
#### magentoVersion: number (required)
|
|
@@ -141,8 +125,7 @@ Configuration for the SidebarGallery component
|
|
|
141
125
|
|
|
142
126
|
#### cartDisplayPricesInclTax: boolean
|
|
143
127
|
|
|
144
|
-
Due to a limitation of the GraphQL API it is not possible to determine if a cart
|
|
145
|
-
should be displayed including or excluding tax.
|
|
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.
|
|
146
129
|
|
|
147
130
|
When Magento's StoreConfig adds this value, this can be replaced.
|
|
148
131
|
|
|
@@ -152,30 +135,25 @@ Use compare functionality
|
|
|
152
135
|
|
|
153
136
|
#### compareVariant: CHECKBOX | ICON = `ICON`
|
|
154
137
|
|
|
155
|
-
By default the compare feature is denoted with a 'compare ICON' (2 arrows facing
|
|
156
|
-
|
|
157
|
-
also possible to present the compare feature as a CHECKBOX accompanied by the
|
|
158
|
-
'Compare' label
|
|
138
|
+
By default the compare feature is denoted with a 'compare ICON' (2 arrows facing one another).
|
|
139
|
+
This may be fine for experienced users, but for more clarity it's also possible to present the compare feature as a CHECKBOX accompanied by the 'Compare' label
|
|
159
140
|
|
|
160
141
|
#### configurableVariantForSimple: boolean = `false`
|
|
161
142
|
|
|
162
|
-
If a simple product is part of a Configurable product page, should the simple
|
|
163
|
-
|
|
143
|
+
If a simple product is part of a Configurable product page, should the simple product be
|
|
144
|
+
rendered as a configured option of the configurable product page?
|
|
164
145
|
|
|
165
146
|
How does this work:
|
|
166
147
|
|
|
167
|
-
When the `products(filters: { url_key: { eq: 'simple-product' } }) { ... }`
|
|
168
|
-
|
|
169
|
-
product the simple belongs to.
|
|
148
|
+
When the `products(filters: { url_key: { eq: 'simple-product' } }) { ... }` query is ran,
|
|
149
|
+
Magento also returns the Simple product and the Configurable product the simple belongs to.
|
|
170
150
|
|
|
171
|
-
If that is the case we render the configurable product page instead of the
|
|
172
|
-
|
|
173
|
-
pre-selected.
|
|
151
|
+
If that is the case we render the configurable product page instead of the simple product page but
|
|
152
|
+
the options to select the simple product are pre-selected.
|
|
174
153
|
|
|
175
154
|
#### configurableVariantValues: [MagentoConfigurableVariantValues](#MagentoConfigurableVariantValues) = `{ content: true, url: true }`
|
|
176
155
|
|
|
177
|
-
When a user selects a variant, it will switch the values on the configurable
|
|
178
|
-
page with the values of the configured variant.
|
|
156
|
+
When a user selects a variant, it will switch the values on the configurable page with the values of the configured variant.
|
|
179
157
|
|
|
180
158
|
Enabling options here will allow switching of those variants.
|
|
181
159
|
|
|
@@ -189,16 +167,13 @@ Configures the max width of the shell (header, footer, overlays, etc.)
|
|
|
189
167
|
|
|
190
168
|
#### crossSellsHideCartItems: boolean = `false`
|
|
191
169
|
|
|
192
|
-
Determines if cross sell items should be shown when the user already has the
|
|
193
|
-
product in their cart. This will result in a product will popping off the screen
|
|
194
|
-
when you add it to the cart.
|
|
170
|
+
Determines if cross sell items should be shown when the user already has the product in their cart. This will result in a product will popping off the screen when you add it to the cart.
|
|
195
171
|
|
|
196
172
|
Default: 'false'
|
|
197
173
|
|
|
198
174
|
#### crossSellsRedirectItems: boolean = `false`
|
|
199
175
|
|
|
200
|
-
Determines if, after adding a cross-sell item to the cart, the user should be
|
|
201
|
-
redirected to the cross-sell items of the product they just added.
|
|
176
|
+
Determines if, after adding a cross-sell item to the cart, the user should be redirected to the cross-sell items of the product they just added.
|
|
202
177
|
|
|
203
178
|
Default: 'false'
|
|
204
179
|
|
|
@@ -209,7 +184,6 @@ Enables the shipping notes field in the checkout
|
|
|
209
184
|
#### customerCompanyFieldsEnable: boolean
|
|
210
185
|
|
|
211
186
|
Enables company fields inside the checkout:
|
|
212
|
-
|
|
213
187
|
- Company name
|
|
214
188
|
- VAT ID
|
|
215
189
|
|
|
@@ -219,9 +193,7 @@ Enable customer account deletion through the account section
|
|
|
219
193
|
|
|
220
194
|
#### customerXMagentoCacheIdDisable: boolean
|
|
221
195
|
|
|
222
|
-
X-Magento-Cache-Id allows Varnish to cache requests that are made in the browser
|
|
223
|
-
while users are logged in. For example the products query can now be cached for
|
|
224
|
-
logged in users.
|
|
196
|
+
X-Magento-Cache-Id allows Varnish to cache requests that are made in the browser while users are logged in. For example the products query can now be cached for logged in users.
|
|
225
197
|
|
|
226
198
|
This can be disabled when Varnish is running out of available memory.
|
|
227
199
|
|
|
@@ -243,12 +215,11 @@ Enables some demo specific code that is probably not useful for a project:
|
|
|
243
215
|
|
|
244
216
|
#### enableGuestCheckoutLogin: boolean
|
|
245
217
|
|
|
246
|
-
Enable Guest Checkout Login:
|
|
247
|
-
|
|
248
|
-
the sign-up form is shown instead.
|
|
218
|
+
Enable Guest Checkout Login:
|
|
219
|
+
During customer login, GraphCommerce queries Magento to determine whether
|
|
220
|
+
the customer account already exists or not. If not, the sign-up form is shown instead.
|
|
249
221
|
|
|
250
|
-
For Magento versions, 2.4.7, 2.4.6-p1 and up, 2.4.5-p3 and up, 2.4.4-p4 and up,
|
|
251
|
-
the following setting must be set to Yes
|
|
222
|
+
For Magento versions, 2.4.7, 2.4.6-p1 and up, 2.4.5-p3 and up, 2.4.4-p4 and up, the following setting must be set to Yes
|
|
252
223
|
|
|
253
224
|
`Stores -> Configuration -> Sales -> Checkout -> Checkout Options -> Enable Guest Checkout Login`
|
|
254
225
|
|
|
@@ -266,42 +237,38 @@ To create an assetlinks.json file for the Android app.
|
|
|
266
237
|
|
|
267
238
|
#### googleRecaptchaKey: string
|
|
268
239
|
|
|
269
|
-
Google reCAPTCHA site key.
|
|
270
|
-
you are configuring different values for each locale.
|
|
240
|
+
Google reCAPTCHA site key.
|
|
241
|
+
When using reCAPTCHA, this value is required, even if you are configuring different values for each locale.
|
|
271
242
|
|
|
272
|
-
Get a site key and a secret key from
|
|
273
|
-
https://developers.google.com/recaptcha/docs/v3
|
|
243
|
+
Get a site key and a secret key from https://developers.google.com/recaptcha/docs/v3
|
|
274
244
|
|
|
275
|
-
The secret key should be added in the Magento admin panel (Stores >
|
|
276
|
-
Configuration > Security > Google ReCAPTCHA Storefront >
|
|
277
|
-
ReCAPTCHA can then be enabled/disabled for the different forms, separately
|
|
278
|
-
(Stores > Configuration > Security > Google ReCAPTCHA Storefront > Storefront)
|
|
245
|
+
The secret key should be added in the Magento admin panel (Stores > Configuration > Security > Google ReCAPTCHA Storefront > reCAPTCHA v3 Invisible)
|
|
246
|
+
ReCAPTCHA can then be enabled/disabled for the different forms, separately (Stores > Configuration > Security > Google ReCAPTCHA Storefront > Storefront)
|
|
279
247
|
|
|
280
248
|
#### googleTagmanagerId: string
|
|
281
249
|
|
|
282
250
|
The Google Tagmanager ID to be used on the site.
|
|
283
251
|
|
|
284
|
-
This value is required even if you are configuring different values for each
|
|
285
|
-
locale.
|
|
252
|
+
This value is required even if you are configuring different values for each locale.
|
|
286
253
|
|
|
287
254
|
#### graphqlMeshEditMode: boolean = `false`
|
|
288
255
|
|
|
289
|
-
The GraphQL Mesh will be loaded once and any modifications to resolvers will be
|
|
290
|
-
|
|
256
|
+
The GraphQL Mesh will be loaded once and any modifications to resolvers will be ignored. When developing
|
|
257
|
+
new resolvers this should be set to true.
|
|
291
258
|
|
|
292
259
|
#### hygraphManagementApi: string
|
|
293
260
|
|
|
294
261
|
Hygraph Management API. **Only used for migrations.**
|
|
295
262
|
|
|
296
|
-
Optional: If the hygraphEndpoint is configured with the 'High Performance
|
|
297
|
-
|
|
263
|
+
Optional: If the hygraphEndpoint is configured with the 'High Performance Content
|
|
264
|
+
API', this field is not required.
|
|
298
265
|
|
|
299
266
|
#### hygraphProjectId: string
|
|
300
267
|
|
|
301
268
|
Hygraph Project ID. **Only used for migrations.**
|
|
302
269
|
|
|
303
|
-
Optional: If the hygraphEndpoint is configured with the 'High Performance
|
|
304
|
-
|
|
270
|
+
Optional: If the hygraphEndpoint is configured with the 'High Performance Content
|
|
271
|
+
API', this field is not required.
|
|
305
272
|
|
|
306
273
|
#### hygraphWriteAccessToken: string
|
|
307
274
|
|
|
@@ -309,28 +276,25 @@ Hygraph Management SDK Authorization Token. **Only used for migrations.**
|
|
|
309
276
|
|
|
310
277
|
Project settings -> API Access -> Permanent Auth Tokens
|
|
311
278
|
|
|
312
|
-
1. Click
|
|
313
|
-
Access Token' and keep stage on 'Published'.
|
|
279
|
+
1. Click 'Add token' and give it a name, something like 'GraphCommerce Write Access Token' and keep stage on 'Published'.
|
|
314
280
|
2. Under 'Management API', click 'Yes, Initialize defaults'
|
|
315
|
-
3. Click 'Edit Permissions' and enable: 'Update' and 'Delete' permissions for
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
- Update existing
|
|
319
|
-
- Delete existing
|
|
320
|
-
- Update existing
|
|
321
|
-
- Delete existing
|
|
322
|
-
- Update existing
|
|
323
|
-
- Delete existing
|
|
324
|
-
- Update
|
|
325
|
-
- Delete
|
|
326
|
-
-
|
|
327
|
-
-
|
|
328
|
-
-
|
|
329
|
-
-
|
|
330
|
-
-
|
|
331
|
-
-
|
|
332
|
-
- Delete public content views
|
|
333
|
-
- Can see schema view
|
|
281
|
+
3. Click 'Edit Permissions' and enable: 'Update' and 'Delete' permissions for 'models', 'enumerations', 'fields', 'components' and 'sources'
|
|
282
|
+
- Update existing models
|
|
283
|
+
- Delete existing models
|
|
284
|
+
- Update existing fields
|
|
285
|
+
- Delete existing fields
|
|
286
|
+
- Update existing enumerations
|
|
287
|
+
- Delete existing enumerations
|
|
288
|
+
- Update existing components
|
|
289
|
+
- Delete existing components
|
|
290
|
+
- Update remote sources
|
|
291
|
+
- Delete remote sources
|
|
292
|
+
- Read existing environments
|
|
293
|
+
- Read public content views
|
|
294
|
+
- Create public content views
|
|
295
|
+
- Update public content views
|
|
296
|
+
- Delete public content views
|
|
297
|
+
- Can see schema view
|
|
334
298
|
|
|
335
299
|
```bash
|
|
336
300
|
GC_HYGRAPH_WRITE_ACCESS_TOKEN="AccessTokenFromHygraph"
|
|
@@ -341,14 +305,11 @@ yarn graphcommerce hygraph-migrate
|
|
|
341
305
|
|
|
342
306
|
Limit the static generation of SSG when building.
|
|
343
307
|
|
|
344
|
-
By default GraphCommerce will statically generate all product and category pages
|
|
345
|
-
during build. This can take quite a long time, to skip this step set this value
|
|
346
|
-
to true.
|
|
308
|
+
By default GraphCommerce will statically generate all product and category pages during build. This can take quite a long time, to skip this step set this value to true.
|
|
347
309
|
|
|
348
310
|
#### permissions: [GraphCommercePermissions](#GraphCommercePermissions)
|
|
349
311
|
|
|
350
|
-
Allows the option to require login or completely disable certain sections of the
|
|
351
|
-
site, can be overriden per storeview with the storefrontConfig
|
|
312
|
+
Allows the option to require login or completely disable certain sections of the site, can be overriden per storeview with the storefrontConfig
|
|
352
313
|
|
|
353
314
|
#### previewSecret: string
|
|
354
315
|
|
|
@@ -356,9 +317,9 @@ To enable next.js' preview mode, configure the secret you'd like to use.
|
|
|
356
317
|
|
|
357
318
|
#### productFiltersLayout: DEFAULT | SIDEBAR = `DEFAULT`
|
|
358
319
|
|
|
359
|
-
Layout how the filters are rendered.
|
|
360
|
-
|
|
361
|
-
and horizontal chips on mobile
|
|
320
|
+
Layout how the filters are rendered.
|
|
321
|
+
DEFAULT: Will be rendered as horzontal chips on desktop and mobile
|
|
322
|
+
SIDEBAR: Will be rendered as a sidebar on desktop and horizontal chips on mobile
|
|
362
323
|
|
|
363
324
|
#### productFiltersPro: boolean
|
|
364
325
|
|
|
@@ -368,14 +329,15 @@ Product filters with better UI for mobile and desktop.
|
|
|
368
329
|
|
|
369
330
|
Pagination variant for the product listings.
|
|
370
331
|
|
|
371
|
-
COMPACT means: "< Page X of Y >"
|
|
332
|
+
COMPACT means: "< Page X of Y >"
|
|
333
|
+
EXTENDED means: "< 1 2 ... 4 [5] 6 ... 10 11 >"
|
|
372
334
|
|
|
373
335
|
#### productRoute: string
|
|
374
336
|
|
|
375
|
-
By default we route products to /p/[url] but you can change this to
|
|
376
|
-
/product/[url] if you wish.
|
|
337
|
+
By default we route products to /p/[url] but you can change this to /product/[url] if you wish.
|
|
377
338
|
|
|
378
|
-
Default: '/p/'
|
|
339
|
+
Default: '/p/'
|
|
340
|
+
Example: '/product/'
|
|
379
341
|
|
|
380
342
|
#### recentlyViewedProducts: [RecentlyViewedProductsConfig](#RecentlyViewedProductsConfig)
|
|
381
343
|
|
|
@@ -383,8 +345,8 @@ Settings for recently viewed products
|
|
|
383
345
|
|
|
384
346
|
#### robotsAllow: boolean
|
|
385
347
|
|
|
386
|
-
Allow the site to be indexed by search engines.
|
|
387
|
-
will be set to disallow all.
|
|
348
|
+
Allow the site to be indexed by search engines.
|
|
349
|
+
If false, the robots.txt file will be set to disallow all.
|
|
388
350
|
|
|
389
351
|
#### sidebarGallery: [SidebarGalleryConfig](#SidebarGalleryConfig)
|
|
390
352
|
|
|
@@ -416,27 +378,22 @@ Enable debugging interface to debug sessions
|
|
|
416
378
|
|
|
417
379
|
#### webpackCircularDependencyPlugin: boolean
|
|
418
380
|
|
|
419
|
-
Cyclic dependencies can cause memory issues and other strange bugs.
|
|
420
|
-
will warn you when it detects a cyclic dependency.
|
|
381
|
+
Cyclic dependencies can cause memory issues and other strange bugs.
|
|
382
|
+
This plugin will warn you when it detects a cyclic dependency.
|
|
421
383
|
|
|
422
384
|
When running into memory issues, it can be useful to enable this plugin.
|
|
423
385
|
|
|
424
386
|
#### webpackDuplicatesPlugin: boolean
|
|
425
387
|
|
|
426
|
-
When updating packages it can happen that the same package is included with
|
|
427
|
-
different versions in the same project.
|
|
388
|
+
When updating packages it can happen that the same package is included with different versions in the same project.
|
|
428
389
|
|
|
429
390
|
Issues that this can cause are:
|
|
430
|
-
|
|
431
|
-
- The
|
|
432
|
-
bundle size.
|
|
433
|
-
- The Typescript types of the package are not compatible with each other,
|
|
434
|
-
causing Typescript errors.
|
|
391
|
+
- The same package is included multiple times in the bundle, increasing the bundle size.
|
|
392
|
+
- The Typescript types of the package are not compatible with each other, causing Typescript errors.
|
|
435
393
|
|
|
436
394
|
### GraphCommerceGooglePlaystoreConfig
|
|
437
395
|
|
|
438
|
-
See
|
|
439
|
-
https://developer.android.com/training/app-links/verify-android-applinks#web-assoc
|
|
396
|
+
See https://developer.android.com/training/app-links/verify-android-applinks#web-assoc
|
|
440
397
|
|
|
441
398
|
#### packageName: string (required)
|
|
442
399
|
|
|
@@ -456,18 +413,15 @@ Allows customers to change their billing address or locks it down.
|
|
|
456
413
|
|
|
457
414
|
#### cart: CUSTOMER_ONLY | DISABLED | ENABLED
|
|
458
415
|
|
|
459
|
-
Changes the availability of the add to cart buttons and the cart page to either
|
|
460
|
-
customer only or completely disables it.
|
|
416
|
+
Changes the availability of the add to cart buttons and the cart page to either customer only or completely disables it.
|
|
461
417
|
|
|
462
418
|
#### checkout: CUSTOMER_ONLY | DISABLED | ENABLED
|
|
463
419
|
|
|
464
|
-
Changes the availability of the checkout to either customer only or completely
|
|
465
|
-
disables it.
|
|
420
|
+
Changes the availability of the checkout to either customer only or completely disables it.
|
|
466
421
|
|
|
467
422
|
#### customerAccount: DISABLED | DISABLE_REGISTRATION | ENABLED
|
|
468
423
|
|
|
469
|
-
Enables / disabled the account section of the website. DISABLE_REGISTRATION will
|
|
470
|
-
only disable the registration page.
|
|
424
|
+
Enables / disabled the account section of the website. DISABLE_REGISTRATION will only disable the registration page.
|
|
471
425
|
|
|
472
426
|
#### website: ENABLED
|
|
473
427
|
|
|
@@ -479,12 +433,9 @@ All storefront configuration for the project
|
|
|
479
433
|
|
|
480
434
|
#### locale: string (required)
|
|
481
435
|
|
|
482
|
-
Must be a
|
|
483
|
-
[locale string](https://www.unicode.org/reports/tr35/tr35-59/tr35.html#Identifiers)
|
|
484
|
-
for automatic redirects to work.
|
|
436
|
+
Must be a [locale string](https://www.unicode.org/reports/tr35/tr35-59/tr35.html#Identifiers) for automatic redirects to work.
|
|
485
437
|
|
|
486
|
-
This value can be used as a sub-path identifier only, make sure linguiLocale is
|
|
487
|
-
configured for each URL.
|
|
438
|
+
This value can be used as a sub-path identifier only, make sure linguiLocale is configured for each URL.
|
|
488
439
|
|
|
489
440
|
#### magentoStoreCode: string (required)
|
|
490
441
|
|
|
@@ -493,7 +444,6 @@ Magento store code.
|
|
|
493
444
|
Stores => All Stores => [Store View] => Store View Code
|
|
494
445
|
|
|
495
446
|
Examples:
|
|
496
|
-
|
|
497
447
|
- default
|
|
498
448
|
- en-us
|
|
499
449
|
- b2b-us
|
|
@@ -503,27 +453,23 @@ Examples:
|
|
|
503
453
|
The canonical base URL is used for SEO purposes.
|
|
504
454
|
|
|
505
455
|
Examples:
|
|
506
|
-
|
|
507
456
|
- https://example.com
|
|
508
457
|
- https://example.com/en
|
|
509
458
|
- https://example.com/en-US
|
|
510
459
|
|
|
511
460
|
#### cartDisplayPricesInclTax: boolean
|
|
512
461
|
|
|
513
|
-
Due to a limitation of the GraphQL API it is not possible to determine if a cart
|
|
514
|
-
should be displayed including or excluding tax.
|
|
462
|
+
Due to a limitation of the GraphQL API it is not possible to determine if a cart should be displayed including or excluding tax.
|
|
515
463
|
|
|
516
464
|
#### customerCompanyFieldsEnable: boolean
|
|
517
465
|
|
|
518
466
|
Enables company fields inside the checkout:
|
|
519
|
-
|
|
520
467
|
- Company name
|
|
521
468
|
- VAT ID
|
|
522
469
|
|
|
523
470
|
#### defaultLocale: boolean
|
|
524
471
|
|
|
525
472
|
There can only be one entry with defaultLocale set to true.
|
|
526
|
-
|
|
527
473
|
- If there are more, the first one is used.
|
|
528
474
|
- If there is none, the first entry is used.
|
|
529
475
|
|
|
@@ -547,44 +493,37 @@ The Google Tagmanager ID to be used per locale.
|
|
|
547
493
|
|
|
548
494
|
#### hygraphLocales: string[]
|
|
549
495
|
|
|
550
|
-
Add a gcms-locales header to make sure queries return in a certain language, can
|
|
551
|
-
be an array to define fallbacks.
|
|
496
|
+
Add a gcms-locales header to make sure queries return in a certain language, can be an array to define fallbacks.
|
|
552
497
|
|
|
553
498
|
#### linguiLocale: string
|
|
554
499
|
|
|
555
|
-
Custom locale used to load the .po files. Must be a valid locale, also used for
|
|
556
|
-
Intl functions.
|
|
500
|
+
Custom locale used to load the .po files. Must be a valid locale, also used for Intl functions.
|
|
557
501
|
|
|
558
502
|
#### permissions: [GraphCommercePermissions](#GraphCommercePermissions)
|
|
559
503
|
|
|
560
|
-
Allows the option to require login or completely disable certain sections of the
|
|
561
|
-
site on a per store basis
|
|
504
|
+
Allows the option to require login or completely disable certain sections of the site on a per store basis
|
|
562
505
|
|
|
563
506
|
#### robotsAllow: boolean
|
|
564
507
|
|
|
565
|
-
Allow the site to be indexed by search engines.
|
|
566
|
-
will be set to disallow all.
|
|
508
|
+
Allow the site to be indexed by search engines.
|
|
509
|
+
If false, the robots.txt file will be set to disallow all.
|
|
567
510
|
|
|
568
511
|
### MagentoConfigurableVariantValues
|
|
569
512
|
|
|
570
|
-
Options to configure which values will be replaced when a variant is selected on
|
|
571
|
-
the product page.
|
|
513
|
+
Options to configure which values will be replaced when a variant is selected on the product page.
|
|
572
514
|
|
|
573
515
|
#### content: boolean
|
|
574
516
|
|
|
575
|
-
Use the name, description, short description and meta data from the configured
|
|
576
|
-
variant
|
|
517
|
+
Use the name, description, short description and meta data from the configured variant
|
|
577
518
|
|
|
578
519
|
#### gallery: boolean
|
|
579
520
|
|
|
580
|
-
This option enables the automatic update of product gallery images on the
|
|
581
|
-
|
|
582
|
-
the selected variant differ from the currently displayed images.
|
|
521
|
+
This option enables the automatic update of product gallery images on the product page when a variant is selected,
|
|
522
|
+
provided that the gallery images for the selected variant differ from the currently displayed images.
|
|
583
523
|
|
|
584
524
|
#### url: boolean
|
|
585
525
|
|
|
586
|
-
When a variant is selected the URL of the product will be changed in the address
|
|
587
|
-
bar.
|
|
526
|
+
When a variant is selected the URL of the product will be changed in the address bar.
|
|
588
527
|
|
|
589
528
|
This only happens when the actual variant is can be accessed by the URL.
|
|
590
529
|
|
|
@@ -602,9 +541,8 @@ Number of recently viewed products to be stored in localStorage
|
|
|
602
541
|
|
|
603
542
|
### SidebarGalleryConfig
|
|
604
543
|
|
|
605
|
-
SidebarGalleryConfig will contain all configuration values for the Sidebar
|
|
606
|
-
Gallery component.
|
|
544
|
+
SidebarGalleryConfig will contain all configuration values for the Sidebar Gallery component.
|
|
607
545
|
|
|
608
546
|
#### paginationVariant: DOTS | THUMBNAILS_BOTTOM
|
|
609
547
|
|
|
610
|
-
Variant used for the pagination
|
|
548
|
+
Variant used for the pagination
|
package/framework/icons.md
CHANGED
package/framework/theming.md
CHANGED
|
@@ -37,7 +37,7 @@ updated in real-time:
|
|
|
37
37
|
|
|
38
38
|
You can search through your codebase to discover which components will be
|
|
39
39
|
affected by your changes. For example, search for occurrences of
|
|
40
|
-
`theme.palette.primary.main`.
|
|
40
|
+
`theme.vars.palette.primary.main`.
|
|
41
41
|
|
|
42
42
|
### Best practices
|
|
43
43
|
|
|
@@ -84,7 +84,7 @@ property:
|
|
|
84
84
|
```tsx
|
|
85
85
|
sx={{
|
|
86
86
|
borderRadius: 2,
|
|
87
|
-
backgroundColor: (theme) => theme.palette.primary.main,
|
|
87
|
+
backgroundColor: (theme) => theme.vars.palette.primary.main,
|
|
88
88
|
}}
|
|
89
89
|
```
|
|
90
90
|
|
|
@@ -92,8 +92,8 @@ To use the theme object for multiple property's:
|
|
|
92
92
|
|
|
93
93
|
```tsx
|
|
94
94
|
sx={(theme) => ({
|
|
95
|
-
borderRadius: `1px solid ${theme.palette.divider}`,
|
|
96
|
-
backgroundColor: theme.palette.primary.main,
|
|
95
|
+
borderRadius: `1px solid ${theme.vars.palette.divider}`,
|
|
96
|
+
backgroundColor: theme.vars.palette.primary.main,
|
|
97
97
|
})}
|
|
98
98
|
```
|
|
99
99
|
|
|
@@ -110,10 +110,10 @@ const AnimatedButton = styled(Button, { name: 'animatedButton' })(
|
|
|
110
110
|
({ theme }) => ({
|
|
111
111
|
'@keyframes pulse': {
|
|
112
112
|
'0%': {
|
|
113
|
-
boxShadow: `0 0 0 0 ${theme.palette.primary.main}`,
|
|
113
|
+
boxShadow: `0 0 0 0 ${theme.vars.palette.primary.main}`,
|
|
114
114
|
},
|
|
115
115
|
'100%': {
|
|
116
|
-
boxShadow: `0 0 0 15px ${theme.palette.background.default}`,
|
|
116
|
+
boxShadow: `0 0 0 15px ${theme.vars.palette.background.default}`,
|
|
117
117
|
},
|
|
118
118
|
},
|
|
119
119
|
animation: 'pulse 1.5s infinite',
|
package/framework/typography.md
CHANGED
|
@@ -103,7 +103,7 @@ sx={{ '& .MuiBox-root': { background: 'blue' }}}
|
|
|
103
103
|
Pass the theme object to use global values
|
|
104
104
|
|
|
105
105
|
```tsx
|
|
106
|
-
sx={(theme)=>({ margin: theme.spacings.lg, color: theme.palette.text.secondary })}
|
|
106
|
+
sx={(theme)=>({ margin: theme.spacings.lg, color: theme.vars.palette.text.secondary })}
|
|
107
107
|
```
|
|
108
108
|
|
|
109
109
|
## Customization
|
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": "10.0.0-canary.
|
|
5
|
+
"version": "10.0.0-canary.68",
|
|
6
6
|
"sideEffects": true,
|
|
7
7
|
"peerDependencies": {
|
|
8
|
-
"@graphcommerce/prettier-config-pwa": "^10.0.0-canary.
|
|
8
|
+
"@graphcommerce/prettier-config-pwa": "^10.0.0-canary.68"
|
|
9
9
|
},
|
|
10
10
|
"prettier": "@graphcommerce/prettier-config-pwa"
|
|
11
11
|
}
|
|
@@ -3,6 +3,30 @@
|
|
|
3
3
|
Depending on the amounts of customisations you've made, there are some manual
|
|
4
4
|
steps.
|
|
5
5
|
|
|
6
|
+
## Theme: Replace theme.palette with theme.vars.palette
|
|
7
|
+
|
|
8
|
+
To support CSS variables properly, replace `theme.palette` with
|
|
9
|
+
`theme.vars.palette` in your theme customizations:
|
|
10
|
+
|
|
11
|
+
```diff
|
|
12
|
+
- color: theme.palette.primary.main,
|
|
13
|
+
+ color: theme.vars.palette.primary.main,
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Theme: Replace dark mode checks with theme.applyStyles
|
|
17
|
+
|
|
18
|
+
Replace conditional dark mode checks with `theme.applyStyles('dark', ...)`:
|
|
19
|
+
|
|
20
|
+
```diff
|
|
21
|
+
- background: theme.palette.mode === 'dark'
|
|
22
|
+
- ? lighten(theme.palette.background.default, 0.15)
|
|
23
|
+
- : theme.palette.background.default,
|
|
24
|
+
+ background: theme.vars.palette.background.default,
|
|
25
|
+
+ ...theme.applyStyles('dark', {
|
|
26
|
+
+ background: theme.lighten(theme.vars.palette.background.default, 0.15),
|
|
27
|
+
+ }),
|
|
28
|
+
```
|
|
29
|
+
|
|
6
30
|
## Trans and t import replacements
|
|
7
31
|
|
|
8
32
|
```tsx
|
package/upgrading/readme.md
CHANGED
|
@@ -106,6 +106,7 @@ After resolving the diff issues, manually process upgrade instructions:
|
|
|
106
106
|
|
|
107
107
|
- [Upgrading to GraphCommerce 5 to 6](../upgrading/graphcommerce-5-to-6.md)
|
|
108
108
|
- [Upgrading to GraphCommerce 6 to 7](../upgrading/graphcommerce-6-to-7.md)
|
|
109
|
+
- [Upgrading to GraphCommerce 9 to 10](../upgrading/graphcommerce-9-to-10.md)
|
|
109
110
|
|
|
110
111
|
Run and validate your local environment:
|
|
111
112
|
|