From 21bda8599fc7473652f51d48ebc470e1b2377f6a Mon Sep 17 00:00:00 2001 From: Adarsh Manickam Date: Sun, 17 Nov 2019 18:22:22 +0530 Subject: [PATCH 01/10] Fixed incorrect syntax for custom KO checked binding --- guides/v2.2/ui_comp_guide/concepts/magento-bindings.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/guides/v2.2/ui_comp_guide/concepts/magento-bindings.md b/guides/v2.2/ui_comp_guide/concepts/magento-bindings.md index 845b73877a5..ccfa8d0729b 100644 --- a/guides/v2.2/ui_comp_guide/concepts/magento-bindings.md +++ b/guides/v2.2/ui_comp_guide/concepts/magento-bindings.md @@ -81,5 +81,5 @@ The table below shows examples of how the Knockout bindings map to their Magento |textInput |`` | `` | |value |`` | `` | |checked |`` | `` | -| |`` | `` | -|checkedValue |`` | `` | +| |`` | `` | +|checkedValue |`` | `` | From f1b649aa38d93e5365c85ce274e1a0e9bf95b72f Mon Sep 17 00:00:00 2001 From: Adarsh Manickam Date: Sun, 17 Nov 2019 18:37:55 +0530 Subject: [PATCH 02/10] Added missing example for i18n Magento binding syntax --- guides/v2.2/ui_comp_guide/concepts/knockout-bindings.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/guides/v2.2/ui_comp_guide/concepts/knockout-bindings.md b/guides/v2.2/ui_comp_guide/concepts/knockout-bindings.md index a19500754f5..6980e5beddf 100644 --- a/guides/v2.2/ui_comp_guide/concepts/knockout-bindings.md +++ b/guides/v2.2/ui_comp_guide/concepts/knockout-bindings.md @@ -225,7 +225,9 @@ The `i18n` binding is used to translate a string according to the currently enab **Usage example**: ```html -
+ + +
From 56ec4a3bead33b9c3df19557494f8bb15cf19d70 Mon Sep 17 00:00:00 2001 From: Nidheesh K K Date: Mon, 18 Nov 2019 13:45:39 +0530 Subject: [PATCH 03/10] Incorrect reference url fixed The reference url was pointing to Customer/Api instead of Catalog/Api --- guides/v2.2/architecture/archi_perspectives/service_layer.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/guides/v2.2/architecture/archi_perspectives/service_layer.md b/guides/v2.2/architecture/archi_perspectives/service_layer.md index a28a46247b7..704ef72191c 100644 --- a/guides/v2.2/architecture/archi_perspectives/service_layer.md +++ b/guides/v2.2/architecture/archi_perspectives/service_layer.md @@ -76,5 +76,5 @@ Related topics * [Architectural diagrams]({{page.baseurl}}/architecture/archi_perspectives/arch_diagrams.html) * [Architectural layers overview]({{page.baseurl}}/architecture/archi_perspectives/ALayers_intro.html) -[catalog-api]: {{ site.mage2bloburl }}/{{ page.guide_version }}/app/code/Magento/Customer/Api -[catalog-api-data]: {{ site.mage2bloburl }}/{{ page.guide_version }}/app/code/Magento/Customer/Api/Data +[catalog-api]: {{ site.mage2bloburl }}/{{ page.guide_version }}/app/code/Magento/Catalog/Api +[catalog-api-data]: {{ site.mage2bloburl }}/{{ page.guide_version }}/app/code/Magento/Catalog/Api/Data From 92cf577058c993719826906bdb4b4104c436ed90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Corr=C3=AAa=20Gomes?= Date: Mon, 18 Nov 2019 12:27:24 -0300 Subject: [PATCH 04/10] Fixing the LESS snippet syntax --- guides/v2.2/javascript-dev-guide/javascript/js-resources.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guides/v2.2/javascript-dev-guide/javascript/js-resources.md b/guides/v2.2/javascript-dev-guide/javascript/js-resources.md index 31fcbfc46b0..0b43a173ca6 100644 --- a/guides/v2.2/javascript-dev-guide/javascript/js-resources.md +++ b/guides/v2.2/javascript-dev-guide/javascript/js-resources.md @@ -146,7 +146,7 @@ To include a 3rd party library and use it within the entire website (using the [ 1. Copy `slick.less` and `slick-theme.less` to the `/web/css/source` folder. Also add both files to `/web/css/source/_extend.less`. - ```less + ```scss @import "slick.less"; @import "slick-theme.less"; ``` From a23c4bfe865951b252552a0dbe87ba4c658fb03e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Mour=C3=A3o?= Date: Tue, 19 Nov 2019 20:18:51 -0300 Subject: [PATCH 05/10] Adding question mark when nullable value is declared --- .../backward-compatible-development/index.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/guides/v2.3/contributor-guide/backward-compatible-development/index.md b/guides/v2.3/contributor-guide/backward-compatible-development/index.md index fc7263ad09d..c8e69937c78 100644 --- a/guides/v2.3/contributor-guide/backward-compatible-development/index.md +++ b/guides/v2.3/contributor-guide/backward-compatible-development/index.md @@ -128,6 +128,8 @@ Add a new optional parameter to the constructor at the end of the arguments list In the constructor body, if the new dependency is not provided (i.e. the value of the introduced argument is `null`), fetch the dependency using `Magento\Framework\App\ObjectManager::getInstance()`. +Prefix the type name with a question mark when declaring a parameter with a `null` default value. + {% collapsible Example Code %} ```php @@ -140,7 +142,7 @@ class ExistingClass \Old\Dependency\Interface $oldDependency, $oldRequiredConstructorParameter, $oldOptionalConstructorParameter = null, - \New\Dependency\Interface $newDependency = null + ?\New\Dependency\Interface $newDependency = null ) { ... $this->newDependency = $newDependency ?: \Magento\Framework\App\ObjectManager::getInstance()->get(\New\Dependency\Interface::class); From ab590c7e1d069a1f5813099b73344efc6ca3833e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Mour=C3=A3o?= Date: Tue, 19 Nov 2019 20:25:46 -0300 Subject: [PATCH 06/10] Adding nullable param question mark in v2.2 --- .../backward-compatible-development/index.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/guides/v2.2/contributor-guide/backward-compatible-development/index.md b/guides/v2.2/contributor-guide/backward-compatible-development/index.md index be52f4eef3c..7101b896071 100644 --- a/guides/v2.2/contributor-guide/backward-compatible-development/index.md +++ b/guides/v2.2/contributor-guide/backward-compatible-development/index.md @@ -122,6 +122,8 @@ Add a new optional parameter to the constructor at the end of the arguments list In the constructor body, if the new dependency is not provided (i.e. the value of the introduced argument is `null`), fetch the dependency using `Magento\Framework\App\ObjectManager::getInstance()`. +Prefix the type name with a question mark when declaring a parameter with a `null` default value. + {% collapsible Example Code %} ```php @@ -134,7 +136,7 @@ class ExistingClass \Old\Dependency\Interface $oldDependency, $oldRequiredConstructorParameter, $oldOptionalConstructorParameter = null, - \New\Dependency\Interface $newDependency = null + ?\New\Dependency\Interface $newDependency = null ) { ... $this->newDependency = $newDependency ?: \Magento\Framework\App\ObjectManager::getInstance()->get(\New\Dependency\Interface::class); From 0dbedbe54828d8ec3470e3221e96f886e01f6c5d Mon Sep 17 00:00:00 2001 From: Alex Taranovsky Date: Wed, 20 Nov 2019 16:31:08 +0200 Subject: [PATCH 07/10] magento/devdocs#5632: Incorrect link to JSCS site. https://devdocs.magento.com/guides/v2.2/coding-standards/code-standard-javascript.html https://devdocs.magento.com/guides/v2.3/coding-standards/code-standard-javascript.html --- guides/v2.2/coding-standards/code-standard-javascript.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/guides/v2.2/coding-standards/code-standard-javascript.md b/guides/v2.2/coding-standards/code-standard-javascript.md index 6bbe89c23ff..580692462c0 100644 --- a/guides/v2.2/coding-standards/code-standard-javascript.md +++ b/guides/v2.2/coding-standards/code-standard-javascript.md @@ -16,7 +16,7 @@ For the jQuery widget coding standard, see [jQuery widget coding standard][jquer ## Eslint and JSCS tools -Use [ESLint][eslint] and [JSCS][jscs] to ensure the quality of your JavaScript code. +Use [ESLint][eslint] and `JSCS` to ensure the quality of your JavaScript code. ESLint is a community-driven tool that detects errors and potential problems in JavaScript code. It can use custom rules to enforce specific coding standards. @@ -359,6 +359,5 @@ var foo = 'bar', [jquery-widgets]: http://api.jqueryui.com/category/widgets [jquery-widget-coding-standard]: {{ page.baseurl }}/coding-standards/code-standard-jquery-widgets.html [eslint]: http://eslint.org/ -[jscs]: http://jscs.info/ [eslint-rules]: {{ site.mage2bloburl }}/{{ page.guide_version }}/dev/tests/static/testsuite/Magento/Test/Js/_files/eslint/.eslintrc-magento [jscs-rules]: {{ site.mage2bloburl }}/{{ page.guide_version }}/dev/tests/static/testsuite/Magento/Test/Js/_files/jscs/.jscsrc From ef255a2069bfe0cf3665b1a1334f6780b75c6ddc Mon Sep 17 00:00:00 2001 From: Alex Taranovsky Date: Thu, 21 Nov 2019 00:44:36 +0200 Subject: [PATCH 08/10] magento/devdocs#: Add customerOrders query API errors - https://devdocs.magento.com/guides/v2.3/graphql/queries/customer-orders.html --- guides/v2.3/graphql/queries/customer-orders.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/guides/v2.3/graphql/queries/customer-orders.md b/guides/v2.3/graphql/queries/customer-orders.md index ac24e855e14..5a95212c4b4 100644 --- a/guides/v2.3/graphql/queries/customer-orders.md +++ b/guides/v2.3/graphql/queries/customer-orders.md @@ -79,3 +79,9 @@ Attribute | Data type | Description `id` | Int | The ID assigned to the customer's order `increment_id` | String | An ID that indicates the sequence of the order in the customer's order history `status` | String | The status of the order, such as `open`, `processing`, or `closed` + +## Errors + +Error | Description +--- | --- +`The current customer isn't authorized.` | The current customer is not currently logged in, or the customer's token does not exist in the `oauth_token` table. From 1200a12c865149a952573edc36e9b5d080e99a0c Mon Sep 17 00:00:00 2001 From: Alex Taranovsky Date: Thu, 21 Nov 2019 00:58:40 +0200 Subject: [PATCH 09/10] magento/devdocs#: Add customerDownloadableProducts query API errors - https://devdocs.magento.com/guides/v2.3/graphql/queries/customer-downloadable-products.html --- .../v2.3/graphql/queries/customer-downloadable-products.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/guides/v2.3/graphql/queries/customer-downloadable-products.md b/guides/v2.3/graphql/queries/customer-downloadable-products.md index d35868615ef..1a207b2c91c 100644 --- a/guides/v2.3/graphql/queries/customer-downloadable-products.md +++ b/guides/v2.3/graphql/queries/customer-downloadable-products.md @@ -75,3 +75,9 @@ Attribute | Type | Description `order_increment_id` | String | The purchase order ID `remaining_downloads` | String | Determines the number of times the customer can download the product `status` | String | Determines the stage in the order workflow when the download becomes available. Options are `Pending` and `Invoiced` + +## Errors + +Error | Description +--- | --- +`The current customer isn't authorized.` | The current customer is not currently logged in, or the customer's token does not exist in the `oauth_token` table. From 3d6746cbef51536c18bd8966e76f9aff1350a6bf Mon Sep 17 00:00:00 2001 From: DeoJr <50918982+DeoJr@users.noreply.github.com> Date: Thu, 21 Nov 2019 15:05:20 -0300 Subject: [PATCH 10/10] Update view-models.md I wasn't closing a tag page --- guides/v2.2/extension-dev-guide/view-models.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/guides/v2.2/extension-dev-guide/view-models.md b/guides/v2.2/extension-dev-guide/view-models.md index 5e35d830216..9c8bfd57949 100644 --- a/guides/v2.2/extension-dev-guide/view-models.md +++ b/guides/v2.2/extension-dev-guide/view-models.md @@ -21,13 +21,14 @@ The following example shows how to add functionality to a core template with cus ```xml - - - - Vendor\CustomModule\ViewModel\MyClass - - - + + + + Vendor\CustomModule\ViewModel\MyClass + + + + ``` You must implement the right interface in your `view_model` class (for example `ArgumentInterface`):