-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ReadMe] updated readMe file for LoginAsCustomer-Marketplace modules #31877
[ReadMe] updated readMe file for LoginAsCustomer-Marketplace modules #31877
Conversation
Hi @vlmed. Thank you for your contribution
❗ Automated tests can be triggered manually with an appropriate comment:
You can find more information about the builds here ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review. For more details, please, review the Magento Contributor Guide documentation. 🕙 You can find the schedule on the Magento Community Calendar page. 📞 The triage of Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket. 🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel ✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel |
d471eb4
to
32c32fd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vlmed a great contribution, as always! I had a couple of change requests, please review and address them.
Thanks for the hard work!
|
||
### Layouts | ||
|
||
This module introduces the following layouts in the `view/adminhtml/layout` directory: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove those that are not introduced by the module but are introduced by other modules and just used by this module.
Also, please be sure to distinguish between layouts and layout handles.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment is still not fully resolved - there's the layouts vs layout handles thing.
When handles are mentioned, it's about those xml files that define the entire page structure - something you can assign your new page and it will look properly, like app/code/Magento/Theme/view/base/page_layout/empty.xml
:
<?xml version="1.0"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_layout.xsd">
<container name="root">
<container name="after.body.start" as="after.body.start" before="-" label="Page Top"/>
<container name="page.wrapper" as="page_wrapper" htmlTag="div" htmlClass="page-wrapper">
<container name="global.notices" as="global_notices" before="-"/>
<container name="main.content" htmlTag="main" htmlId="maincontent" htmlClass="page-main">
<container name="columns.top" label="Before Main Columns"/>
<container name="columns" htmlTag="div" htmlClass="columns">
<container name="main" label="Main Content Container" htmlTag="div" htmlClass="column main"/>
</container>
</container>
<container name="page.bottom.container" as="page_bottom_container" label="Before Page Footer Container" after="main.content" htmlTag="div" htmlClass="page-bottom"/>
<container name="before.body.end" as="before_body_end" after="-" label="Page Bottom"/>
</container>
</container>
</layout>
And you can use them in other layouts or layout handles like this:
<page layout="admin-1column" xmlns:xsi="..." xsi:noNamespaceSchemaLocation="...">
<body>
...
Layouts are usually (not always - see app/code/Magento/Robots/view/frontend/page_layout/robots.xml
) defined in layouts.xml
files, like this:
<page_layouts xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/PageLayout/etc/layouts.xsd">
<layout id="1column">
<label translate="true">1 column</label>
</layout>
<layout id="2columns-left">
<label translate="true">2 columns with left bar</label>
</layout>
<layout id="2columns-right">
<label translate="true">2 columns with right bar</label>
</layout>
<layout id="3columns">
<label translate="true">3 columns</label>
</layout>
</page_layouts>
They reside in page_layout directories.
Layout handles, which live in layout directories, are similar, but they don't represent full page structure. They may rely on one, but their main function is add instructions that are specific to that handle. There are two types of those - handles that correspond to actions like catalog_product_view.xml
(sometimes with additional parameters) and handles that don't do that and contain layout instructions that are shared by multiple other layout handles, which can include them like this:
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/layout_generic.xsd">
<update handle="loginascustomer_confirmation_popup" />
</layout>
In this case, loginascustomer_confirmation_popup.xml
is not a standalone top-to-bottom layout file. It's a handle. It's referenced by a few other handles in the same directory.
|
||
For more information about a layout in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). | ||
|
||
### UI components |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this section is necessary as the module only extends but doesn't introduce any ui components.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
||
[The Magento dependency injection mechanism](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_LoginAsCustomerApi module. | ||
|
||
### Public APIs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add missing API entries.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bgorski I only added interfaces with the @api annotation. Should I add all the interfaces from the Api directory?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do. You asked a good question, though - thanks. The @api
annotation is only about backwards compatibility and determines when can the code be introduced or removed. You can check https://devdocs.magento.com/contributor-guide/backward-compatible-development/ for reference.
However, as for the Api directory, everything in there is an API, even if some of them are more "protected" than other ones.
This module introduces the following layouts in the `view/adminhtml/layout` and `view/frontend/layout` directories: | ||
- `view/adminhtml/layout`: | ||
- `loginascustomer_confirmation_popup` | ||
- `view/frontend/layout`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove APIs which the module only uses as a client
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I leave loginascustomer_confirmation_popup
because this layout is introduced by this module
|
||
For more information about a layout in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). | ||
|
||
### UI components |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this section is necessary here, the module doesn't introduce any ui components. Please remove.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't really look done :) The customer_form mentioned here is something that this module is a client of, it doesn't own it. This section is only about what's introduced and shouldn't contain those that the module just use.
|
||
For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). | ||
|
||
## Extensibility |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please skip this section as there's nothing to add besides just what the sample provides
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
||
For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). | ||
|
||
## Extensibility |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please skip this section as there's nothing to add besides just what the sample provides
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -1,3 +1,17 @@ | |||
# Magento_LoginAsCustomerQuote module | |||
|
|||
The Magento_LoginAsCustomerQuote module is responsible for communication between Magento_LoginAsCustomer and shopping cart state. | |||
|
|||
## Installation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please skip this section as there's nothing to add besides just what the sample provides
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
The Magento_LoginAsCustomerSales module is responsible for communication between Magento_LoginAsCustomer and order placement. | ||
This module is responsible for communication between Magento_LoginAsCustomer and order placement. | ||
|
||
## Installation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please skip this section as there's nothing to add besides just what the sample provides
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
||
For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). | ||
|
||
## Extensibility |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please skip this section as there's nothing to add besides just what the sample provides
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
32c32fd
to
4372776
Compare
|
||
### Layouts | ||
|
||
This module introduces the following layouts in the `view/adminhtml/layout` directory: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment is still not fully resolved - there's the layouts vs layout handles thing.
When handles are mentioned, it's about those xml files that define the entire page structure - something you can assign your new page and it will look properly, like app/code/Magento/Theme/view/base/page_layout/empty.xml
:
<?xml version="1.0"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_layout.xsd">
<container name="root">
<container name="after.body.start" as="after.body.start" before="-" label="Page Top"/>
<container name="page.wrapper" as="page_wrapper" htmlTag="div" htmlClass="page-wrapper">
<container name="global.notices" as="global_notices" before="-"/>
<container name="main.content" htmlTag="main" htmlId="maincontent" htmlClass="page-main">
<container name="columns.top" label="Before Main Columns"/>
<container name="columns" htmlTag="div" htmlClass="columns">
<container name="main" label="Main Content Container" htmlTag="div" htmlClass="column main"/>
</container>
</container>
<container name="page.bottom.container" as="page_bottom_container" label="Before Page Footer Container" after="main.content" htmlTag="div" htmlClass="page-bottom"/>
<container name="before.body.end" as="before_body_end" after="-" label="Page Bottom"/>
</container>
</container>
</layout>
And you can use them in other layouts or layout handles like this:
<page layout="admin-1column" xmlns:xsi="..." xsi:noNamespaceSchemaLocation="...">
<body>
...
Layouts are usually (not always - see app/code/Magento/Robots/view/frontend/page_layout/robots.xml
) defined in layouts.xml
files, like this:
<page_layouts xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/PageLayout/etc/layouts.xsd">
<layout id="1column">
<label translate="true">1 column</label>
</layout>
<layout id="2columns-left">
<label translate="true">2 columns with left bar</label>
</layout>
<layout id="2columns-right">
<label translate="true">2 columns with right bar</label>
</layout>
<layout id="3columns">
<label translate="true">3 columns</label>
</layout>
</page_layouts>
They reside in page_layout directories.
Layout handles, which live in layout directories, are similar, but they don't represent full page structure. They may rely on one, but their main function is add instructions that are specific to that handle. There are two types of those - handles that correspond to actions like catalog_product_view.xml
(sometimes with additional parameters) and handles that don't do that and contain layout instructions that are shared by multiple other layout handles, which can include them like this:
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/layout_generic.xsd">
<update handle="loginascustomer_confirmation_popup" />
</layout>
In this case, loginascustomer_confirmation_popup.xml
is not a standalone top-to-bottom layout file. It's a handle. It's referenced by a few other handles in the same directory.
|
||
[The Magento dependency injection mechanism](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_LoginAsCustomerApi module. | ||
|
||
### Public APIs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do. You asked a good question, though - thanks. The @api
annotation is only about backwards compatibility and determines when can the code be introduced or removed. You can check https://devdocs.magento.com/contributor-guide/backward-compatible-development/ for reference.
However, as for the Api directory, everything in there is an API, even if some of them are more "protected" than other ones.
|
||
For more information about a layout in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). | ||
|
||
### UI components |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't really look done :) The customer_form mentioned here is something that this module is a client of, it doesn't own it. This section is only about what's introduced and shouldn't contain those that the module just use.
|
||
### Layouts | ||
|
||
This module introduces the following layouts in the `view/frontend/layout` directory: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see my comment above about layout and layout handles
@bgorski Thank you for the review. I have implemented all your recommendations. Please, check |
It seems that, as per this comment the requested changes has been implemented, so moving this ticket to Pending Review. Thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Marking as approved. Thank you for the contribution @vlmed!
To whoever is going to test this - I haven't run automated tests on this PR because it touches readme files only, so no functional changes in the code are introduced, therefore tests are irrelevant.
Hi @bgorski, thank you for the review.
|
Hi @vlmed, thank you for your contribution! |
Description (*)
Update README.md file for modules:
Fixed Issues (if relevant)
Contribution checklist (*)