Skip to content

Correct height for media gallery images #28048

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

Merged
merged 3 commits into from
May 1, 2020
Merged

Correct height for media gallery images #28048

merged 3 commits into from
May 1, 2020

Conversation

Nazar65
Copy link
Member

@Nazar65 Nazar65 commented Apr 29, 2020

Description (*)

Remove image height usage from Paragraph as this is not necessary.

Related Pull Requests

Fixed Issues (if relevant)

N/A

Manual testing scenarios (*)

  1. Verify Media gallery images displayed correctly in all sizes.
  2. Define any custom sizes in di.xml Magento/Cms/etc/di.xml
    <type name="Magento\Cms\Model\Wysiwyg\Images\Storage">
        <arguments>
            <argument name="resizeParameters" xsi:type="array">
                <item name="height" xsi:type="number">75</item>
                <item name="width" xsi:type="number">100</item>
            </argument>
   </type>

Verify All images displayed correctly

Questions or comments

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 Apr 29, 2020

Hi @Nazar65. 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

For more details, please, review the Magento Contributor Guide documentation.

Copy link
Member

@sivaschenko sivaschenko left a comment

Choose a reason for hiding this comment

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

Hi @Nazar65 , thanks for the pull request! Please see my comment

<div
data-row="file"
class="filecnt"
id="<?= $block->escapeHtmlAttr($block->getFileId($file)) ?>"
data-size="<?= $block->escapeHtmlAttr($file->getSize()) ?>"
data-mime-type="<?= $block->escapeHtmlAttr($file->getMimeType()) ?>"
>
<p class="nm" style="height:<?= $block->escapeHtmlAttr($_height) ?>px;">
<p class="nm" style="min-height: 72px;">
Copy link
Member

Choose a reason for hiding this comment

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

Can you please avoid the inline css

Copy link
Member Author

Choose a reason for hiding this comment

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

ok 👍

Copy link
Contributor

Choose a reason for hiding this comment

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

We can also use height attribute if there is no other option.

@ghost ghost assigned krzksz Apr 30, 2020
@magento-engcom-team
Copy link
Contributor

Hi @sivaschenko, thank you for the review.
ENGCOM-7501 has been created to process this Pull Request
✳️ @sivaschenko, 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

@sivaschenko sivaschenko added the Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests label Apr 30, 2020
@sivaschenko
Copy link
Member

The automated test coverage is not applicable as this is a style change

@engcom-Bravo
Copy link
Contributor

✔️ QA Passed

@engcom-Echo
Copy link
Contributor

Failed functional tests not related to the changes in this PR

@slavvka slavvka added this to the 2.4.0 milestone Apr 30, 2020
@slavvka slavvka merged commit ddf97f5 into magento:2.4-develop May 1, 2020
@m2-assistant
Copy link

m2-assistant bot commented May 1, 2020

Hi @Nazar65, 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
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

7 participants