magento2-page-builder
magento2-page-builder copied to clipboard
Community - Width & Height attribute - Pagebuilder image #767
Width and Height attribute added for Pagebuilder image element
https://github.com/magento/magento2-page-builder/issues/767
Description (*)
Story
Bug
Task
Fixed Issues (if relevant)
- magento/magento2-page-builder#<issue_number>: Issue title
Builds
Related Pull Requests
https://github.com/magento-commerce/magento2-infrastructure/pull/1880
Manual testing scenarios (*)
- ...
- ...
Questions or comments
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)
- [ ] README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
- [ ] All automated tests passed successfully (all builds are green)
Resolved issues:
- [x] resolves magento/magento2-page-builder#867: Width & Height attribute - Pagebuilder image #767
Hello @aj-prajapati
Thanks for making this code. We do use it. Although we did add code for loading attribute as wel. We think it's a good to at it to you merge request.
This is the code we made:
pagebuilder_image_form.xml
<field name="image_attribute_loading" formElement="select" sortOrder="12"> <settings> <dataType>text</dataType> <label translate="true">Image Attribute Loading</label> <dataScope>image_attribute_loading</dataScope> <notice translate="true">Place the value lazy on images that are below the fold on desktop for better page speed performance.</notice> </settings> <formElements> <select> <settings> <options> <option name="eager" xsi:type="array"> <item name="value" xsi:type="string">eager</item> <item name="label" xsi:type="string">eager</item> </option> <option name="lazy" xsi:type="array"> <item name="value" xsi:type="string">lazy</item> <item name="label" xsi:type="string">lazy</item> </option> </options> <caption translate="true">Select the correct loading method for the image.</caption> </settings> </select> </formElements> </field>
<field name="mobile_image_attribute_loading" formElement="select" sortOrder="15"> <settings> <dataType>text</dataType> <label translate="true">Mobile Image Attribute Loading</label> <dataScope>mobile_image_attribute_loading</dataScope> <notice translate="true">Place the value lazy on images that are below the fold on mobile for better page speed performance.</notice> </settings> <formElements> <select> <settings> <options> <option name="eager" xsi:type="array"> <item name="value" xsi:type="string">eager</item> <item name="label" xsi:type="string">eager</item> </option> <option name="lazy" xsi:type="array"> <item name="value" xsi:type="string">lazy</item> <item name="label" xsi:type="string">lazy</item> </option> </options> <caption translate="true">Select the correct loading method for the image.</caption> </settings> </select> </formElements> </field>
image.xml
<attribute name="image_attribute_loading" source="loading"/> <attribute name="mobile_image_attribute_loading" source="loading"/>
ImageData.xml
<!-- Image Loading --> <entity name="PageBuilderImageLoadingProperty" type="pagebuilder_Loading_property"> <data key="name">Loading</data> <data key="section">general</data> <data key="fieldName">image_attribute_loading</data> <data key="value">eager</data> </entity>
<!-- Mobile Image Loading --> <entity name="PageBuilderImageLoadingProperty" type="pagebuilder_Loading_property"> <data key="name">Loading</data> <data key="section">general</data> <data key="fieldName">mobile_image_attribute_loading</data> <data key="value">eager</data> </entity>
@magento run all tests
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.
@magento run all tests
We are picking this PR for further development
@magento create issue
Hello @engcom-Hotel,
Great that this issue is picked up for further development :) I do question will the lazy loading attribute option be added as wel? Like my comment suggest in this ticket earlier.
Thank you in advance.
@magento run Static Tests
@magento run Static Tests
@magento run Static Tests
@magento run Static Tests
@magento run Static Tests
@magento run Static Tests
@magento run Database Compare, Functional Tests B2B, Functional Tests CE, Functional Tests EE, Integration Tests, Magento Health Index, Performance Acceptance Tests, Semantic Version Checker, Unit Tests, WebAPI Tests
@magento run Static Tests, WebAPI Tests, Integration Tests
@magento run WebAPI Tests, Database Compare, Functional Tests B2B, Functional Tests CE, Functional Tests EE, Integration Tests, Magento Health Index, Performance Acceptance Tests, Semantic Version Checker, Unit Tests
@magento run WebAPI Tests, Functional Tests B2B, Functional Tests EE, Magento Health Index, Semantic Version Checker
@magento run Static Tests
@magento run Static Tests
@magento run Static Tests
@magento run Database Compare, Functional Tests B2B, Functional Tests CE, Functional Tests EE, Integration Tests, Magento Health Index, Performance Acceptance Tests, Semantic Version Checker, Unit Tests, WebAPI Tests
@magento run Static Tests
@magento run Static Tests
@magento run Static Tests
@magento run Database Compare, Functional Tests B2B, Functional Tests CE, Functional Tests EE, Integration Tests, Magento Health Index, Performance Acceptance Tests, Semantic Version Checker, Unit Tests, WebAPI Tests
It seems the bot moved it to Changes Requested, moving back to Pending Review
@magento run all tests
@magento give me test instance
Hi @engcom-Bravo. Thank you for your request. I'm working on Magento instance for you.
Hi @engcom-Bravo, here is your Magento Instance: https://d1a442a3dd69c2b3868e7229c0e5eebc.instances-prod.magento-community.engineering Admin access: https://d1a442a3dd69c2b3868e7229c0e5eebc.instances-prod.magento-community.engineering/admin_9df8 Login: 06e6d262 Password: 2875e3350d04