Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Issue-2916- Provide more info about file/classes in code snippets to adding-attributes.html #8218

Merged

Conversation

dineshvb
Copy link
Contributor

@dineshvb dineshvb commented Nov 12, 2020

Purpose of this pull request

This pull request (PR) fixes #2916

Affected DevDocs pages

  • guides/v2.3/extension-dev-guide/extension_attributes/adding-attributes.html
  • guides/v2.4/extension-dev-guide/extension_attributes/adding-attributes.html

Copy link
Contributor

@BarnyShergold BarnyShergold left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue indicates there are a lot more problems with the concerned page than are covered by this PR - will you be adding more? What's the plan?

@@ -186,6 +188,8 @@ For scalar attributes we can use next configuration:
</config>
```

Here, the scalar attributes indicate the simple form of attribute representation such as an Integer or a String. The class or interface for which the extension attributes must be added is specified inside the "for" attribute of the `<extension_attributes>` tag. In this case, it is the ProductInterface. The attribute is specified with an unique code and it's type.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(a unique is correct as unique starts with a consonant sound)

Suggested change
Here, the scalar attributes indicate the simple form of attribute representation such as an Integer or a String. The class or interface for which the extension attributes must be added is specified inside the "for" attribute of the `<extension_attributes>` tag. In this case, it is the ProductInterface. The attribute is specified with an unique code and it's type.
Here, the scalar attributes indicate the simple form of attribute representation such as an Integer or a String. The class or interface for which the extension attributes must be added is specified inside the "for" attribute of the `<extension_attributes>` tag. In this case, it is the ProductInterface. The attribute is specified with a unique code and its type.

@@ -206,6 +212,8 @@ For array extension attributes:
</config>
```

The array extension attributes are just an extension of the scalar attributes where a range of values can be represented as an attribute. `[]` symbol is used to indicate the type of the attribute as array.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The array extension attributes are just an extension of the scalar attributes where a range of values can be represented as an attribute. `[]` symbol is used to indicate the type of the attribute as array.
The array extension attributes are just an extension of the scalar attributes where a range of values can be represented as an attribute. The `[]` symbol is used to indicate the type of the attribute as an array.

@dineshvb
Copy link
Contributor Author

Hi @BarnyShergold , I went through the https://devdocs.magento.com/guides/v2.4/extension-dev-guide/extension_attributes/adding-attributes.html page and after I got an understanding of the issue specified, I made these changes. I don't know how to proceed hereafter. I would like to have some suggestions. Can you assist me with this?

@BarnyShergold
Copy link
Contributor

@shrielenee - Some additional information to the section on your issue has been added by @dineshvb - Textually the additions are fine, can you take a look and feedback as to if there is enough new information or what might else be needed to clarify the examples as indicated in you report?

Copy link
Contributor

@keharper keharper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some grammatical changes.

@@ -175,6 +175,8 @@ Now we need to bind our plugin to `ProductInterface`:

## Extension Attributes Configuration:

The file which holds these extension attributes must reside under the /etc folder of your module.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The file which holds these extension attributes must reside under the /etc folder of your module.
The file that holds these extension attributes must reside under the `/etc` folder of your module.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change line 180 to "For scalar attributes, we can use the following configuration:"

@@ -186,6 +188,8 @@ For scalar attributes we can use next configuration:
</config>
```

Here, the scalar attributes indicate the simple form of attribute representation such as an Integer or a String. The class or interface for which the extension attributes must be added is specified inside the "for" attribute of the `<extension_attributes>` tag. In this case, it is the ProductInterface. The attribute is specified with a unique code and its type.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Here, the scalar attributes indicate the simple form of attribute representation such as an Integer or a String. The class or interface for which the extension attributes must be added is specified inside the "for" attribute of the `<extension_attributes>` tag. In this case, it is the ProductInterface. The attribute is specified with a unique code and its type.
Here, the scalar attributes indicate the simple form of attribute representation, such as an integer or a string. Specify the class or interface of the extension attributes inside the "for" attribute of the `<extension_attributes>` tag. In this case, it is the ProductInterface. The attribute is specified with a unique code and its type.

@@ -206,6 +212,8 @@ For array extension attributes:
</config>
```

The array extension attributes are just an extension of the scalar attributes where a range of values can be represented as an attribute. The `[]` symbol is used to indicate the type of the attribute as an array.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The array extension attributes are just an extension of the scalar attributes where a range of values can be represented as an attribute. The `[]` symbol is used to indicate the type of the attribute as an array.
The array extension attributes are just an extension of the scalar attributes where a range of values can be represented as an attribute. The `[]` symbol indicates the attribute type is an array.

@dineshvb dineshvb force-pushed the issue-2916-info-about-adding-attributes.html branch from 3bb235a to 0a232d6 Compare November 18, 2020 07:24
@dineshvb dineshvb changed the base branch from 2.4.2-develop to master November 18, 2020 07:24
@dineshvb
Copy link
Contributor Author

@keharper @BarnyShergold @dobooth Changed the base to master

@shrielenee
Copy link
Contributor

Agree with all @keharper comments. Thanks y'all!

@dineshvb
Copy link
Contributor Author

@shrielenee As @BarnyShergold said, I would like feedback on my changes so that I could proceed further

@BarnyShergold
Copy link
Contributor

Looks good so far.

@dineshvb
Copy link
Contributor Author

@keharper @dobooth Is it good to merge ?

@keharper
Copy link
Contributor

running tests

@keharper keharper merged commit f8c9e15 into magento:master Nov 27, 2020
@ghost
Copy link

ghost commented Nov 27, 2020

Hi @dineshvb, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide more info about file/classes in code snippets to adding-attributes.html
5 participants