Skip to content
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

Conversation

vlmed
Copy link
Contributor

@vlmed vlmed commented Jan 28, 2021

Description (*)

Update README.md file for modules:

  • Magento_LoginAsCustomer
  • Magento_LoginAsCustomerAdminUi
  • Magento_LoginAsCustomerApi
  • Magento_LoginAsCustomerAssistance
  • Magento_LoginAsCustomerFrontendUi
  • Magento_LoginAsCustomerGraphQl
  • Magento_LoginAsCustomerLog
  • Magento_LoginAsCustomerPageCache
  • Magento_LoginAsCustomerQuote
  • Magento_LoginAsCustomerSales
  • Magento_Marketplace

Fixed Issues (if relevant)

  1. Fixes magento/devdocs README content for modules - work in M2 Code devdocs#4451: README content for modules - work in M2 Code

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)

@m2-assistant
Copy link

m2-assistant bot commented Jan 28, 2021

Hi @vlmed. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.4-develop instance - deploy vanilla Magento instance

❗ Automated tests can be triggered manually with an appropriate comment:

  • @magento run all tests - run or re-run all required tests against the PR changes
  • @magento run <test-build(s)> - run or re-run specific test build(s)
    For example: @magento run Unit Tests

<test-build(s)> is a comma-separated list of build names. Allowed build names are:

  1. Database Compare
  2. Functional Tests CE
  3. Functional Tests EE,
  4. Functional Tests B2B
  5. Integration Tests
  6. Magento Health Index
  7. Sample Data Tests CE
  8. Sample Data Tests EE
  9. Sample Data Tests B2B
  10. Static Tests
  11. Unit Tests
  12. WebAPI Tests
  13. Semantic Version Checker

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.

⚠️ According to the Magento Contribution requirements, all Pull Requests must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

🕙 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

@magento-engcom-team magento-engcom-team added Component: multiple Release Line: 2.4 Partner: Atwix Pull Request is created by partner Atwix partners-contribution Pull Request is created by Magento Partner labels Jan 28, 2021
@gabrieldagama gabrieldagama added the Priority: P2 A defect with this priority could have functionality issues which are not to expectations. label Jan 28, 2021
@vlmed vlmed force-pushed the update_readme_login-as-customer-marketplace branch from d471eb4 to 32c32fd Compare February 3, 2021 16:49
@bgorski bgorski self-requested a review August 25, 2021 23:15
@bgorski bgorski self-assigned this Aug 25, 2021
Copy link
Contributor

@bgorski bgorski left a 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:
Copy link
Contributor

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.

Copy link
Contributor

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
Copy link
Contributor

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.

Copy link
Contributor Author

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
Copy link
Contributor

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.

Copy link
Contributor Author

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?

Copy link
Contributor

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`:
Copy link
Contributor

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

Copy link
Contributor Author

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
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Copy link
Contributor

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
Copy link
Contributor

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

Copy link
Contributor Author

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
Copy link
Contributor

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

Copy link
Contributor Author

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
Copy link
Contributor

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

Copy link
Contributor Author

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
Copy link
Contributor

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

Copy link
Contributor Author

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
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@vlmed vlmed force-pushed the update_readme_login-as-customer-marketplace branch from 32c32fd to 4372776 Compare August 31, 2021 13:34

### Layouts

This module introduces the following layouts in the `view/adminhtml/layout` directory:
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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:
Copy link
Contributor

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

@vlmed
Copy link
Contributor Author

vlmed commented Sep 13, 2021

@bgorski Thank you for the review. I have implemented all your recommendations. Please, check

@engcom-Charlie
Copy link
Contributor

It seems that, as per this comment the requested changes has been implemented, so moving this ticket to Pending Review.

Thank you!

Copy link
Contributor

@bgorski bgorski left a 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.

@magento-engcom-team
Copy link
Contributor

Hi @bgorski, thank you for the review.
ENGCOM-9253 has been created to process this Pull Request
✳️ @bgorski, could you please add one of the following labels to the Pull Request?

Label Description
Auto-Tests: Covered All changes in Pull Request is covered by auto-tests
Auto-Tests: Not Covered Changes in Pull Request requires coverage by auto-tests
Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests

@bgorski bgorski added the Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests label Oct 13, 2021
@magento-engcom-team magento-engcom-team merged commit 965370e into magento:2.4-develop Oct 24, 2021
@m2-assistant
Copy link

m2-assistant bot commented Oct 24, 2021

Hi @vlmed, 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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests Component: multiple Partner: Atwix Pull Request is created by partner Atwix partners-contribution Pull Request is created by Magento Partner Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: accept Release Line: 2.4
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants