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

[Issue] Fix missing escape less calc #30542

Closed
4 tasks
m2-assistant bot opened this issue Oct 19, 2020 · 2 comments · Fixed by #30453
Closed
4 tasks

[Issue] Fix missing escape less calc #30542

m2-assistant bot opened this issue Oct 19, 2020 · 2 comments · Fixed by #30453
Assignees
Labels
Area: Design/Frontend Event: MageCONF CD 2020 Fixed in 2.4.x The issue has been fixed in 2.4-develop branch Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Priority: P4 No current plan to fix. Fixing can be deferred as a logical part of more important work. Progress: done Reported on 2.4.0 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Severity: S4 Affects aesthetics, professional look and feel, “quality” or “usability”.

Comments

@m2-assistant
Copy link

m2-assistant bot commented Oct 19, 2020

This issue is automatically created based on existing pull request: #30453: Fix missing escape less calc


Description (*)

Magento 2.4-develop

We've escaped the content in the calc, this way the calc in the css output file will be correctly. Previously magento will return wrong calc value

Less: width: calc(100% - 20px);
Before fix
.block-reorder .product-item-name { float: left; width: calc(80%); }

Less: width: calc(~'100% - 20px');
After fix
.block-reorder .product-item-name { float: left; width: calc(100% - 20px); }

If less code contain variable escape will a little bit difference
Instead write like this: width: calc(100% - @indent__l);
We should write like this
width: ~'calc(100% - @{indent__l})';
or width: calc(~'100% -' @{indent__l});

Related Pull Requests

Fixed Issues (if relevant)

  1. Fixes magento/magento2#<issue_number>

Manual testing scenarios (*)

Case 1.

  1. Go to order creation page in admin panel;
  2. Find class admin__payment-method-wrapper , admin__field-control (theme backend)
  3. Make sure the final calc shows the correct value in output CSS

Actual Result: ✖️ .admin__payment-method-wrapper {width: calc(47%);}

2020-10-19_11-30

Expected Result: ✔️ .admin__payment-method-wrapper {width: calc(50% - 3rem);}

2020-10-19_11-47

Case 2

  1. Go to Storefront (Recently Ordered block);
  2. Find class .block-reorder .product-item-name (theme luma)
  3. Make sure the final calc show correct value in output css

Actual Result: ✖️ .block-reorder .product-item-name {width: calc(80%);}

2020-10-19_12-18

Expected Result: ✔️ .block-reorder .product-item-name {width: calc(100% - 20px);}

2020-10-19_12-06

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 m2-assistant bot added Priority: P4 No current plan to fix. Fixing can be deferred as a logical part of more important work. Severity: S4 Affects aesthetics, professional look and feel, “quality” or “usability”. labels Oct 19, 2020
@m2-community-project m2-community-project bot added this to Pull Request In Progress in Low Priority Backlog Oct 19, 2020
@m2-community-project m2-community-project bot added Progress: PR Created Indicates that Pull Request has been created to fix issue and removed Progress: PR Created Indicates that Pull Request has been created to fix issue labels Oct 19, 2020
@engcom-Alfa engcom-Alfa added Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed labels Oct 19, 2020
@m2-community-project m2-community-project bot removed the Progress: PR Created Indicates that Pull Request has been created to fix issue label Oct 19, 2020
@magento-engcom-team
Copy link
Contributor

✅ Confirmed by @engcom-Alfa
Thank you for verifying the issue. Based on the provided information internal tickets MC-38524 were created

Issue Available: @engcom-Alfa, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

@magento-engcom-team magento-engcom-team added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Oct 19, 2020
@m2-community-project m2-community-project bot moved this from Pull Request In Progress to Ready for Development in Low Priority Backlog Oct 19, 2020
@magento-engcom-team
Copy link
Contributor

Hi @m2-assistant[bot]. Thank you for your report.
The issue has been fixed in #30453 by @mrtuvn in 2.4-develop branch
Related commit(s):

The fix will be available with the upcoming 2.4.2 release.

@magento-engcom-team magento-engcom-team added the Fixed in 2.4.x The issue has been fixed in 2.4-develop branch label Oct 24, 2020
@ghost ghost moved this from Ready for Development to Done in Low Priority Backlog Oct 24, 2020
@ghost ghost moved this from Done to Pull Request In Progress in Low Priority Backlog Oct 24, 2020
@ghost ghost moved this from Pull Request In Progress to Done in Low Priority Backlog Oct 24, 2020
@sdzhepa sdzhepa added the Reported on 2.4.x Indicates original Magento version for the Issue report. label Nov 11, 2020
@magento-engcom-team magento-engcom-team added Reported on 2.4.0 Indicates original Magento version for the Issue report. and removed Reported on 2.4.x Indicates original Magento version for the Issue report. labels Nov 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Design/Frontend Event: MageCONF CD 2020 Fixed in 2.4.x The issue has been fixed in 2.4-develop branch Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Priority: P4 No current plan to fix. Fixing can be deferred as a logical part of more important work. Progress: done Reported on 2.4.0 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Severity: S4 Affects aesthetics, professional look and feel, “quality” or “usability”.
Projects
Development

Successfully merging a pull request may close this issue.

4 participants