File tree Expand file tree Collapse file tree 8 files changed +35
-11
lines changed
view/frontend/templates/product
templates/account/dashboard
dev/tests/api-functional/testsuite/Magento/Integration/Model Expand file tree Collapse file tree 8 files changed +35
-11
lines changed Original file line number Diff line number Diff line change 8
8
<view xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" urn:magento:framework:Config/etc/view.xsd" >
9
9
<vars module =" Magento_Catalog" >
10
10
<var name =" product_image_white_borders" >1</var >
11
+ <!-- Variable to enable lazy loading for catalog product images without borders.
12
+ If you enable this setting your small size images without borders may be stretched in template.
13
+ So be sure you have correct image sizes. -->
14
+ <var name =" enable_lazy_loading_for_images_without_borders" >0</var >
11
15
</vars >
12
16
</view >
Original file line number Diff line number Diff line change 8
8
/** @var $block \Magento\Catalog\Block\Product\Image */
9
9
/** @var $escaper \Magento\Framework\Escaper */
10
10
?>
11
-
11
+ <!--deprecated template as image_with_borders is a primary one-->
12
12
<img class="photo image <?= $ escaper ->escapeHtmlAttr ($ block ->getClass ()) ?> "
13
13
<?php foreach ($ block ->getCustomAttributes () as $ name => $ value ): ?>
14
14
<?= $ escaper ->escapeHtmlAttr ($ name ) ?> ="<?= $ escaper ->escapeHtmlAttr ($ value ) ?> "
Original file line number Diff line number Diff line change 7
7
<?php
8
8
/** @var $block \Magento\Catalog\Block\Product\Image */
9
9
/** @var $escaper \Magento\Framework\Escaper */
10
+ /**
11
+ * Enable lazy loading for images with borders and if variable enable_lazy_loading_for_images_without_borders
12
+ * is enabled in view.xml. Otherwise small size images without borders may be distorted. So max-width is used for them
13
+ * to prevent stretching and lazy loading does not work.
14
+ */
15
+ $ borders = (bool )$ block ->getVar ('product_image_white_borders ' , 'Magento_Catalog ' );
16
+ $ enableLazyLoadingWithoutBorders = (bool )$ block ->getVar (
17
+ 'enable_lazy_loading_for_images_without_borders ' ,
18
+ 'Magento_Catalog '
19
+ );
10
20
?>
11
21
12
22
<span class="product-image-container"
19
29
<?php endforeach ; ?>
20
30
src="<?= $ escaper ->escapeUrl ($ block ->getImageUrl ()) ?> "
21
31
loading="lazy"
22
- width="<?= $ escaper ->escapeHtmlAttr ($ block ->getWidth ()) ?> "
23
- height="<?= $ escaper ->escapeHtmlAttr ($ block ->getHeight ()) ?> "
32
+ <?php if ($ borders || $ enableLazyLoadingWithoutBorders ): ?>
33
+ width="<?= $ escaper ->escapeHtmlAttr ($ block ->getWidth ()) ?> "
34
+ height="<?= $ escaper ->escapeHtmlAttr ($ block ->getHeight ()) ?> "
35
+ <?php else : ?>
36
+ max-width="<?= $ escaper ->escapeHtmlAttr ($ block ->getWidth ()) ?> "
37
+ max-height="<?= $ escaper ->escapeHtmlAttr ($ block ->getHeight ()) ?> "
38
+ <?php endif ; ?>
24
39
alt="<?= $ escaper ->escapeHtmlAttr ($ block ->getLabel ()) ?> "/></span>
25
40
</span>
Original file line number Diff line number Diff line change 14
14
</action >
15
15
</referenceBlock >
16
16
<referenceContainer name =" content" >
17
- <block class =" Magento\Customer\Block\Account\Dashboard\Info" name =" customer_account_dashboard_info" as =" info" template =" Magento_Customer::account/dashboard/info.phtml" cacheable =" false" />
17
+ <block class =" Magento\Customer\Block\Account\Dashboard\Info" name =" customer_account_dashboard_info" as =" info" template =" Magento_Customer::account/dashboard/info.phtml" cacheable =" false" >
18
+ <container name =" customer.account.dashboard.info.blocks" as =" additional_blocks" />
19
+ </block >
18
20
<block class =" Magento\Customer\Block\Account\Dashboard\Address" name =" customer_account_dashboard_address" as =" address" template =" Magento_Customer::account/dashboard/address.phtml" cacheable =" false" />
19
21
</referenceContainer >
20
22
</body >
Original file line number Diff line number Diff line change 29
29
</a>
30
30
</div>
31
31
</div>
32
- <?php if ($ block ->isNewsletterEnabled ()) : ?>
32
+ <?php if ($ block ->isNewsletterEnabled ()): ?>
33
33
<div class="box box-newsletter">
34
34
<strong class="box-title">
35
35
<span><?= $ block ->escapeHtml (__ ('Newsletters ' )) ?> </span>
36
36
</strong>
37
37
<div class="box-content">
38
38
<p>
39
- <?php if ($ block ->getIsSubscribed ()) : ?>
39
+ <?php if ($ block ->getIsSubscribed ()): ?>
40
40
<?= $ block ->escapeHtml (__ ('You are subscribed to "General Subscription". ' )) ?>
41
- <?php else : ?>
41
+ <?php else : ?>
42
42
<?= $ block ->escapeHtml (__ ('You aren \'t subscribed to our newsletter. ' )) ?>
43
43
<?php endif ; ?>
44
44
</p>
45
45
</div>
46
46
<div class="box-actions">
47
- <a class="action edit" href="<?= $ block ->escapeUrl ($ block ->getUrl ('newsletter/manage ' )) ?> "><span><?= $ block ->escapeHtml (__ ('Edit ' )) ?> </span></a>
47
+ <a class="action edit" href="<?= $ block ->escapeUrl ($ block ->getUrl ('newsletter/manage ' )) ?> ">
48
+ <span><?= $ block ->escapeHtml (__ ('Edit ' )) ?> </span></a>
48
49
</div>
49
50
</div>
50
51
<?php endif ; ?>
52
+ <?= $ block ->getChildHtml ('additional_blocks ' ); ?>
51
53
</div>
52
54
</div>
Original file line number Diff line number Diff line change 9
9
<system >
10
10
<section id =" dev" translate =" label" type =" text" sortOrder =" 920" showInDefault =" 1" showInWebsite =" 1" showInStore =" 1" >
11
11
<group id =" js" >
12
- <field id =" move_script_to_bottom" translate =" label" type =" select" sortOrder =" 25" showInDefault =" 1" showInWebsite =" 1 " showInStore =" 1 " canRestore =" 1" >
12
+ <field id =" move_script_to_bottom" translate =" label" type =" select" sortOrder =" 25" showInDefault =" 1" showInWebsite =" 0 " showInStore =" 0 " canRestore =" 1" >
13
13
<label >Move JS code to the bottom of the page</label >
14
14
<source_model >Magento\Config\Model\Config\Source\Yesno</source_model >
15
15
</field >
16
16
</group >
17
17
<group id =" css" >
18
- <field id =" use_css_critical_path" translate =" label comment" type =" select" sortOrder =" 30" showInDefault =" 1" showInWebsite =" 1 " showInStore =" 1 " canRestore =" 1" >
18
+ <field id =" use_css_critical_path" translate =" label comment" type =" select" sortOrder =" 30" showInDefault =" 1" showInWebsite =" 0 " showInStore =" 0 " canRestore =" 1" >
19
19
<label >Use CSS critical path</label >
20
20
<source_model >Magento\Config\Model\Config\Source\Yesno</source_model >
21
21
<comment >
Original file line number Diff line number Diff line change 12
12
13
13
<style type="text/css" data-type="criticalCss">
14
14
<?= /* @noEscape */ $ criticalCssViewModel ->getCriticalCssData () ?>
15
- </style>
15
+ </style>
Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ class AdminTokenServiceTest extends WebapiAbstract
49
49
*/
50
50
protected function setUp (): void
51
51
{
52
+ $ this ->markTestSkipped ('Skipped until MC-34201 is addressed ' );
52
53
$ this ->_markTestAsRestOnly ();
53
54
$ this ->tokenService = Bootstrap::getObjectManager ()->get (\Magento \Integration \Model \AdminTokenService::class);
54
55
$ this ->tokenModel = Bootstrap::getObjectManager ()->get (\Magento \Integration \Model \Oauth \Token::class);
You can’t perform that action at this time.
0 commit comments