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

Fixed ability to set field config from layout xml #11302

Conversation

vovayatsyuk
Copy link
Member

@vovayatsyuk vovayatsyuk commented Oct 9, 2017

Description

Config array is hardcoded to read three settings only. The patch allows reading all settings from config.

Example:

<item name="postcode" xsi:type="array">
    <item name="config" xsi:type="array">
        <item name="label" xsi:type="string">Another Label</item>
        <item name="placeholder" xsi:type="string">Field Placeholder</item>
    </item>
</item>

Manual testing scenarios

  1. Open Magento/Checkout/view/frontend/layout/checkout_index_index.xml and find postcode settings

  2. Change its settings as follows:

    <item name="postcode" xsi:type="array">
        <!-- post-code field has custom UI component -->
        <item name="component" xsi:type="string">Magento_Ui/js/form/element/post-code</item>
        <item name="validation" xsi:type="array">
            <item name="required-entry" xsi:type="string">true</item>
        </item>
        <item name="config" xsi:type="array">
            <item name="label" xsi:type="string">test label</item>
            <item name="placeholder" xsi:type="string">test placeholder</item>
        </item>
    </item>
  3. Navigate to checkout and you'll see that settings are not working.

  4. Apply the patch and settings will start working.

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 on Travis CI are green)

Example:

```
<item name="postcode" xsi:type="array">
    <item name="config" xsi:type="array">
        <item name="label" xsi:type="string">Another Label</item>
        <item name="placeholder" xsi:type="string">Field Placeholder</item>
    </item>
    ...
</item>
```
@dmanners dmanners self-assigned this Oct 9, 2017
@dmanners
Copy link
Contributor

dmanners commented Oct 9, 2017

Hi @vovayatsyuk thank you for this PR, could you please double check the failures in the travis build. https://travis-ci.org/magento/magento2/builds/285469149

@vovayatsyuk
Copy link
Member Author

Sorry, done.

Copy link
Contributor

@dmanners dmanners left a comment

Choose a reason for hiding this comment

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

Look's good to me. I will process this through the internal system.

@dmanners dmanners added this to the October 2017 milestone Oct 9, 2017
@magento-team magento-team merged commit 6269718 into magento:develop Oct 19, 2017
vovayatsyuk pushed a commit to vovayatsyuk/magento2 that referenced this pull request Oct 23, 2017
magento-team pushed a commit that referenced this pull request Oct 26, 2017
… [backport 2.2] #11643

 - Merge Pull Request #11643 from vovayatsyuk/magento2:2.2-fix-checkout-field-config-reader-from-layout-xml
 - Merged commits:
   1. 29ce8be
magento-team pushed a commit that referenced this pull request Oct 26, 2017
magento-team pushed a commit that referenced this pull request Oct 26, 2017
[EngCom] Public Pull Requests - 2.2-develop
 - MAGETWO-82724 Allow coupon code with special charater to be applied to order in checkout #11710
 - MAGETWO-82675 Add a health check to the NGINX configuration sample #11690
 - MAGETWO-82562 Coupon codes not showing in invoice #11635
 - MAGETWO-82535 Fixed ability to set field config from layout xml #11302 [backport 2.2] #11643
 - MAGETWO-81146 Fixing #10275 keyboard submit of adminhtml suggest form. #11250
 - MAGETWO-82761 [Backport 2.2-develop] Dashboard Fix Y Axis for range #11751
 - MAGETWO-82748 Fix Notice: freePackageValue is undefined #11720
 - MAGETWO-82747 [TASK] Updated user.ini according to Magento DevDocs #11734
 - MAGETWO-82537 MAGETWO-81311: Check the length of the array before attempting to sli… #11637
 - MAGETWO-81970 Add missing translations in Magento_UI #11440
 - MAGETWO-81904 FIX #11022 in 2.2-develop: Filter Groups of search criteria parameter have not been included for further processing #11421
 - MAGETWO-82179 Fix Filter Customer Report Review 2.2-develop [Backport] #11522
magento-engcom-team added a commit that referenced this pull request Aug 1, 2018
… xml #11302 #17211

 - Merge Pull Request #17211 from mageprince/magento2:2.1-develop-PR-port-11643
 - Merged commits:
   1. da9afe6
magento-engcom-team pushed a commit that referenced this pull request Aug 1, 2018
Accepted Public Pull Requests:
 - #17240: [Backport] Resolved : Mobile device style groups incorrect order (by @tiagosampaio)
 - #17223: [Backport] Fix for #14593 (second try #16431) (by @gelanivishal)
 - #17211: [Backport] Fixed ability to set field config from layout xml #11302 (by @mageprince)
 - #17212: [Backport] Magento sets ISO invalid language code (by @mageprince)
 - #17213: [Backport 2.1] Fix "pattern" UI Component validation (by @mageprince)


Fixed GitHub Issues:
 - #14476: Mobile device style groups incorrect order in _responsive.less (reported by @damiandawber) has been fixed in #17240 by @tiagosampaio in 2.1-develop branch
   Related commits:
     1. b957e32

 - #14593: Press Esc Key on modal generate a jquery UI error (reported by @apomili) has been fixed in #17223 by @gelanivishal in 2.1-develop branch
   Related commits:
     1. b50caeb
     2. 540cdb5
     3. d937ca7

 - #11540: Magento sets iso invalid language code in html header (reported by @SirElectro) has been fixed in #17212 by @mageprince in 2.1-develop branch
   Related commits:
     1. 6702cdc

 - #9919: Pattern Validation via UI Component Fails to Interpret String as RegEx Pattern (reported by @bap14) has been fixed in #17213 by @mageprince in 2.1-develop branch
   Related commits:
     1. 64bad6b
     2. 50f4051
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants