@graphcommerce/docs 8.0.0 → 8.0.1-canary.1

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,5 +1,19 @@
1
1
  # Change Log
2
2
 
3
+ ## 8.0.1-canary.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#2186](https://github.com/graphcommerce-org/graphcommerce/pull/2186) [`09eb25c`](https://github.com/graphcommerce-org/graphcommerce/commit/09eb25c9892bf4cf57519024e31c2ae4cf2f7a0b) - Update Magento known issues
8
+ ([@hnsr](https://github.com/hnsr))
9
+
10
+ ## 8.0.1-canary.0
11
+
12
+ ### Patch Changes
13
+
14
+ - [#2187](https://github.com/graphcommerce-org/graphcommerce/pull/2187) [`6c4cee8`](https://github.com/graphcommerce-org/graphcommerce/commit/6c4cee8469ee4934281bda53ac96aeb5af2f9479) - Make sure the config page can be properly rendered in the docs
15
+ ([@paales](https://github.com/paales))
16
+
3
17
  ## 8.0.0
4
18
 
5
19
  ### Minor Changes
@@ -115,12 +115,12 @@ When Magento's StoreConfig adds this value, this can be replaced.
115
115
 
116
116
  Use compare functionality
117
117
 
118
- #### compareVariant: 'CHECKBOX' | 'ICON' = 'ICON'
118
+ #### compareVariant: CHECKBOX | ICON = `ICON`
119
119
 
120
120
  By default the compare feature is denoted with a 'compare ICON' (2 arrows facing one another).
121
121
  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
122
122
 
123
- #### configurableVariantForSimple: boolean = false
123
+ #### configurableVariantForSimple: boolean = `false`
124
124
 
125
125
  If a simple product is part of a Configurable product page, should the simple product be
126
126
  rendered as a configured option of the configurable product page?
@@ -133,19 +133,19 @@ Magento also returns the Simple product and the Configurable product the simple
133
133
  If that is the case we render the configurable product page instead of the simple product page but
134
134
  the options to select the simple product are pre-selected.
135
135
 
136
- #### configurableVariantValues: [MagentoConfigurableVariantValues](#MagentoConfigurableVariantValues) = { content: true, url: true }
136
+ #### configurableVariantValues: [MagentoConfigurableVariantValues](#MagentoConfigurableVariantValues) = `{ content: true, url: true }`
137
137
 
138
138
  When a user selects a variant, it will switch the values on the configurable page with the values of the configured variant.
139
139
 
140
140
  Enabling options here will allow switching of those variants.
141
141
 
142
- #### crossSellsHideCartItems: boolean = false
142
+ #### crossSellsHideCartItems: boolean = `false`
143
143
 
144
144
  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.
145
145
 
146
146
  Default: 'false'
147
147
 
148
- #### crossSellsRedirectItems: boolean = false
148
+ #### crossSellsRedirectItems: boolean = `false`
149
149
 
150
150
  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.
151
151
 
@@ -163,7 +163,7 @@ This value should match Magento 2's configuration value for
163
163
 
164
164
  Debug configuration for GraphCommerce
165
165
 
166
- #### demoMode: boolean = true
166
+ #### demoMode: boolean = `true`
167
167
 
168
168
  Enables some demo specific code that is probably not useful for a project:
169
169
 
@@ -263,7 +263,7 @@ By default GraphCommerce will statically generate all product and category pages
263
263
 
264
264
  To enable next.js' preview mode, configure the secret you'd like to use.
265
265
 
266
- #### productFiltersLayout: 'DEFAULT' | 'SIDEBAR' = 'DEFAULT'
266
+ #### productFiltersLayout: DEFAULT | SIDEBAR = `DEFAULT`
267
267
 
268
268
  Layout how the filters are rendered.
269
269
  DEFAULT: Will be rendered as horzontal chips on desktop and mobile
@@ -427,6 +427,6 @@ Number of recently viewed products to be stored in localStorage
427
427
 
428
428
  SidebarGalleryConfig will contain all configuration values for the Sidebar Gallery component.
429
429
 
430
- #### paginationVariant: 'DOTS' | 'THUMBNAILS_BOTTOM'
430
+ #### paginationVariant: DOTS | THUMBNAILS_BOTTOM
431
431
 
432
432
  Variant used for the pagination
package/hygraph/cli.md CHANGED
@@ -58,9 +58,9 @@ The following steps are needed to utilize this tool:
58
58
  1. Copy the project ID from the URL when logged in
59
59
  `https://app.hygraph.com/PROJECT_ID_IS_HERE/master`
60
60
  2. Add the project ID to your env file:
61
- `GC_HYGRAPH_PROJECT_ID=”{YOUR_PROJECT_ID}”`
61
+ `GC_HYGRAPH_PROJECT_ID="{YOUR_PROJECT_ID}"`
62
62
  4. Add your hygraphManagementApi to your env file like this:
63
- `GC_HYGRAPH_MANAGEMENT_API="{YOUR_MANAGEMENT_API}"`
63
+ 1. Copy the Management API URL and add to your env file: `GC_HYGRAPH_MANAGEMENT_API="{YOUR_MANAGEMENT_API}"`
64
64
  5. Run `yarn graphcommerce hygraph-migrate`
65
65
  6. Select the migration you want to run and press enter.
66
66
  7. The migrations should now be applied, check your Hygraph Schema if changes
@@ -6,11 +6,9 @@ row to each page. These rules hinge on shared attributes among the pages, with a
6
6
  category being a typical example of such an attribute. To enable the Dynamic Row
7
7
  UI Extension, follow the installation instructions as below.
8
8
 
9
- > Installation
10
- >
11
- > [Click here to install the Dynamic Row UI Extension](https://app.hygraph.com/apps/dynamic-row-property-picker/new)
9
+ > Installation: [Click here to install the Dynamic Row UI Extension](https://app.hygraph.com/apps/dynamic-row-property-picker/new)
12
10
 
13
- <img width="1792" alt="image" src="https://github.com/graphcommerce-org/graphcommerce/assets/49681263/3226eedb-e58c-4d3f-9516-14ff6ed56f24">
11
+ <img width="1792" alt="image" src="https://github.com/graphcommerce-org/graphcommerce/assets/49681263/3226eedb-e58c-4d3f-9516-14ff6ed56f24"/>
14
12
 
15
13
  ## Enabling the Application
16
14
 
@@ -18,7 +16,7 @@ Once you click the link and authorize the application, you'll be taken to the
18
16
  app's configuration page. On this page, you can switch the application on or off
19
17
  as needed.
20
18
 
21
- <img width="1792" alt="image" src="https://github.com/graphcommerce-org/graphcommerce/assets/49681263/ec9b55f6-14f6-466e-8a31-0b893ffe1297">
19
+ <img width="1792" alt="image" src="https://github.com/graphcommerce-org/graphcommerce/assets/49681263/ec9b55f6-14f6-466e-8a31-0b893ffe1297"/>
22
20
 
23
21
  ## Enabling the field
24
22
 
@@ -37,7 +35,7 @@ Replace the existing fields with the new `Property picker` field in the right si
37
35
  (it should be under `Slug` and above `Rich text`). While adding the
38
36
  `Property picker` field make sure that you make it `required`.
39
37
 
40
- <img width="1792" alt="image" src="https://github.com/graphcommerce-org/graphcommerce/assets/49681263/9206f86d-477c-4eaf-bec6-1648874bee5e">
38
+ <img width="1792" alt="image" src="https://github.com/graphcommerce-org/graphcommerce/assets/49681263/9206f86d-477c-4eaf-bec6-1648874bee5e"/>
41
39
 
42
40
  ## Start building with your new Dynamic Rows UI!
43
41
 
@@ -10,7 +10,7 @@ An overview of bugs and limitations you may run into with Magento's GraphQL API:
10
10
 
11
11
  Affected Magento versions:
12
12
 
13
- - `2.4.7`: only `2.4.7-beta1`
13
+ - `2.4.7`: fixed after 2.4.7-beta1
14
14
  - `2.4.6`: all versions
15
15
 
16
16
  This is caused by a regression which results in some GraphQL errors no longer
@@ -24,6 +24,72 @@ As a workaround, you can apply
24
24
  See also
25
25
  https://github.com/magento/magento2/commit/49cbe774020d3dfa6ee2b8702376a947801c9971
26
26
 
27
+ ## After adding a product to cart with custom options, options are not saved and/or retrieving the cart results in an error
28
+
29
+ Affected Magento versions:
30
+
31
+ - `2.4.7`: unknown, see below
32
+ - `2.4.6`: all versions
33
+
34
+ When adding a product to cart, custom options are not processed and saved
35
+ correctly, and can result in an error on the `Cart.items.errors.message` field
36
+ when subsequently retrieving the cart, if the product had required custom
37
+ options.
38
+
39
+ The observed error happens because no value is given for the non-nullable
40
+ `message` field, however the original error occurs due a required custom option
41
+ not being present on the cart item, as the custom options we not saved correctly
42
+ during the previous `addProductsToCart` call.
43
+
44
+ Note that although the relevant PR for this fix was merged, the fix seems to
45
+ have gotten reverted and is not present in 2.4-develop at the time of writing,
46
+ and may not be included in the final release of 2.4.7.
47
+
48
+ As a workaround, you can apply
49
+ [fix-custom-option-processing.patch](./patches/fix-custom-option-processing.patch).
50
+
51
+ See also:
52
+
53
+ - Original PR: https://github.com/magento/magento2/issues/37599
54
+ - PR regarding revert of fix: https://github.com/magento/magento2/issues/37928
55
+
56
+ ## Adding products to cart with pre-existing items that are out of stock always results in an error
57
+
58
+ Affected Magento versions:
59
+
60
+ - `2.4.7`: fixed after 2.4.7-beta2
61
+ - `2.4.6`: all versions
62
+
63
+ This is due to an inconsistency between errors that are reported through the
64
+ `AddProductsToCartOutput.user_errors` field and those on the cart items, which
65
+ make it impossible to differentiate between errors cause by the product that was
66
+ being added, and those from pre-existing cart items.
67
+
68
+ As a workaround you can apply
69
+ [fix-cart-user-error-reporting.patch](./patches/fix-cart-user-error-reporting.patch).
70
+
71
+ See also:
72
+
73
+ - Issue: https://github.com/magento/magento2/issues/37908
74
+ - PR with fix: https://github.com/magento/magento2/pull/38014/files
75
+
76
+ ## Bundle selection products are not shown due to their visibility setting
77
+
78
+ Affected Magento versions:
79
+
80
+ - `2.4.6`: all versions
81
+
82
+ The `BundleItemOption.product` GraphQL field is returned as `null` if the
83
+ product visibility is set to not be visible in the catalog (which you may not
84
+ want).
85
+
86
+ As a workaround you can apply the following patches:
87
+
88
+ - [fix-bundle-selection-visibility-catalog.patch](./patches/fix-bundle-selection-visibility-catalog.patch)
89
+ - [fix-bundle-selection-visibility-related.patch](./patches/fix-bundle-selection-visibility-related.patch)
90
+
91
+ See also https://github.com/magento/magento2/issues/37774
92
+
27
93
  ## Next steps
28
94
 
29
95
  - [Overview](./readme)
@@ -0,0 +1,17 @@
1
+ Fix bundle product children not showing up on some products, see https://github.com/magento/magento2/issues/37774
2
+
3
+ @package magento/module-catalog-graph-ql
4
+
5
+ diff --git a/Model/Resolver/Products/DataProvider/Product.php b/Model/Resolver/Products/DataProvider/Product.php
6
+ index 30be41072242b..3e955ae303453 100644
7
+ --- a/Model/Resolver/Products/DataProvider/Product.php
8
+ +++ b/Model/Resolver/Products/DataProvider/Product.php
9
+ @@ -89,7 +89,7 @@ public function getList(
10
+
11
+ $this->collectionPreProcessor->process($collection, $searchCriteria, $attributes, $context);
12
+
13
+ - if ($isChildSearch) {
14
+ + if (!$isChildSearch) {
15
+ $visibilityIds = $isSearch
16
+ ? $this->visibility->getVisibleInSearchIds()
17
+ : $this->visibility->getVisibleInCatalogIds();
@@ -0,0 +1,19 @@
1
+ Fix bundle product children not showing up on some products, see https://github.com/magento/magento2/issues/37774
2
+
3
+ @package magento/module-related-product-graph-ql
4
+
5
+ diff --git a/Model/Resolver/Batch/AbstractLikedProducts.php b/Model/Resolver/Batch/AbstractLikedProducts.php
6
+ index fac7b23d408e3..f35af6f4885d2 100644
7
+ --- a/Model/Resolver/Batch/AbstractLikedProducts.php
8
+ +++ b/Model/Resolver/Batch/AbstractLikedProducts.php
9
+ @@ -94,9 +94,7 @@ private function findRelations(array $products, array $loadAttributes, int $link
10
+ $this->searchCriteriaBuilder->addFilter('entity_id', $relatedIds, 'in');
11
+ $relatedSearchResult = $this->productDataProvider->getList(
12
+ $this->searchCriteriaBuilder->create(),
13
+ - $loadAttributes,
14
+ - false,
15
+ - true
16
+ + $loadAttributes
17
+ );
18
+ //Filling related products map.
19
+ /** @var \Magento\Catalog\Api\Data\ProductInterface[] $relatedProducts */
@@ -0,0 +1,21 @@
1
+ Fix add to cart `user_error` field containing inconsistent errors. See https://github.com/magento/magento2/pull/38014
2
+
3
+ @package magento/module-quote
4
+
5
+ --- a/Model/Cart/AddProductsToCart.php
6
+ +++ b/Model/Cart/AddProductsToCart.php (date 1696845624268)
7
+ @@ -80,14 +80,6 @@
8
+ $cartId = $this->maskedQuoteIdToQuoteId->execute($maskedCartId);
9
+ $cart = $this->cartRepository->get($cartId);
10
+ $allErrors = [];
11
+ - if ($cart->getData('has_error')) {
12
+ - $errors = $cart->getErrors();
13
+ -
14
+ - /** @var MessageInterface $error */
15
+ - foreach ($errors as $error) {
16
+ - $allErrors[] = $this->error->create($error->getText());
17
+ - }
18
+ - }
19
+
20
+ $failedCartItems = $this->addItemsToCart($cart, $cartItems);
21
+ $saveCart = empty($failedCartItems);
@@ -0,0 +1,15 @@
1
+ Fix custom options not saving on addProductsToCart. See https://github.com/magento/magento2/issues/37599
2
+
3
+ @package magento/module-quote
4
+
5
+ --- a/Model/Quote.php
6
+ +++ b/Model/Quote.php
7
+ @@ -1647,6 +1647,8 @@ public function addProduct(
8
+ );
9
+ }
10
+
11
+ + $productId = $product->getId();
12
+ + $product = clone $this->productRepository->getById($productId, false, $this->getStore()->getId());
13
+ $cartCandidates = $product->getTypeInstance()->prepareForCartAdvanced($request, $product, $processMode);
14
+
15
+ /**
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": "8.0.0",
5
+ "version": "8.0.1-canary.1",
6
6
  "sideEffects": true,
7
7
  "peerDependencies": {
8
- "@graphcommerce/prettier-config-pwa": "^8.0.0"
8
+ "@graphcommerce/prettier-config-pwa": "^8.0.1-canary.1"
9
9
  },
10
10
  "prettier": "@graphcommerce/prettier-config-pwa"
11
11
  }
@@ -1,4 +1,4 @@
1
- # Upgrading from GraphCommerce 6 to 7
1
+ # Upgrading from GraphCommerce 7 to 8
2
2
 
3
3
  Depending on the amounts of customisations you've made, there are some manual
4
4
  steps. Please follow the regular [upgrade steps first](./readme.md).