Skip to content

Module & Theme less optimization for cross browser compatibility. #30728

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

Closed

Conversation

pratiksangani
Copy link
Contributor

@pratiksangani pratiksangani commented Oct 30, 2020

Description (*)

Updated core modules & theme less design with Magento default Flex layout less mixins. Reference taken from <Magento2>/lib/web/css/source/lib/_utilities.less:409 Flex layout mixins and my Magento 2 theme development experience. Using these provided mixins, the design will work on cross-browser platform properly. I've also removed some redundant code from some direct less styles, as they were already been covered by less mixins.

Related Pull Requests

N/A

Fixed Issues (if relevant)

N/A

Manual testing scenarios (*)

N/A

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)

Resolved issues:

  1. resolves [Issue] Module & Theme less optimization for cross browser compatibility. #30729: Module & Theme less optimization for cross browser compatibility.

@m2-assistant
Copy link

m2-assistant bot commented Oct 30, 2020

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

❗ Automated tests can be triggered manually with an appropriate comment:

  • @magento run all tests - run or re-run all required tests against the PR changes
  • @magento run <test-build(s)> - run or re-run specific test build(s)
    For example: @magento run Unit Tests

<test-build(s)> is a comma-separated list of build names. Allowed build names are:

  1. Database Compare
  2. Functional Tests CE
  3. Functional Tests EE,
  4. Functional Tests B2B
  5. Integration Tests
  6. Magento Health Index
  7. Sample Data Tests CE
  8. Sample Data Tests EE
  9. Sample Data Tests B2B
  10. Static Tests
  11. Unit Tests
  12. WebAPI Tests

You can find more information about the builds here

ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review.

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

⚠️ According to the Magento Contribution requirements, all Pull Requests must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

🕙 You can find the schedule on the Magento Community Calendar page.

📞 The triage of Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket.

🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

@pratiksangani
Copy link
Contributor Author

@magento create issue

@pratiksangani
Copy link
Contributor Author

@magento run all tests

@pratiksangani
Copy link
Contributor Author

@ihor-sviziev Will you please proceed this PR?

@ihor-sviziev ihor-sviziev self-assigned this Oct 31, 2020
@ihor-sviziev ihor-sviziev added Award: bug fix Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround. Severity: S4 Affects aesthetics, professional look and feel, “quality” or “usability”. Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests and removed Severity: S4 Affects aesthetics, professional look and feel, “quality” or “usability”. labels Oct 31, 2020
@ihor-sviziev
Copy link
Contributor

@magento run all tests

Copy link
Contributor

@ihor-sviziev ihor-sviziev left a comment

Choose a reason for hiding this comment

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

Hi @pratiksangani,
Could you fix failing static tests?

align-items: flex-start;
display: flex;
.lib-vendor-box-align(flex-start);
.lib-vendor-prefix-display(flex);
float: left;
Copy link
Contributor

Choose a reason for hiding this comment

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

default param .lib-vendor-prefix-display() is flex so you don't need to more specific except you want to try inline flex such as .lib-vendor-prefix-display(inline-flex)

@@ -438,8 +438,6 @@ button {
&._parent {
.lib-vendor-prefix-display(flex);
.lib-vendor-prefix-flex-direction(row);
display: flex;
flex-direction: row;

Copy link
Contributor

@mrtuvn mrtuvn Nov 2, 2020

Choose a reason for hiding this comment

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

we don't have to specific flex in here when call .lib-vendor-prefix

Copy link
Contributor

Choose a reason for hiding this comment

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

And the rest changes fine with me

@ghost ghost assigned mrtuvn Nov 2, 2020
@magento-engcom-team
Copy link
Contributor

Hi @ihor-sviziev, thank you for the review.
ENGCOM-8416 has been created to process this Pull Request

@sidolov sidolov added the Priority: P3 May be fixed according to the position in the backlog. label Nov 4, 2020
@m2-community-project m2-community-project bot added Progress: review Severity: S4 Affects aesthetics, professional look and feel, “quality” or “usability”. and removed Progress: needs update labels Nov 4, 2020
@digiltd
Copy link

digiltd commented Nov 10, 2020

Is there still a need to prefix all the flex stuff these days?

Granted there will be some cases where IE11 or Safari installed before 2015 needs to be supported, though if you are building for those browsers, flexbox prefixes are the least of your concerns :)

https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Backwards_Compatibility_of_Flexbox#Status_in_browsers

@ihor-sviziev
Copy link
Contributor

@digiltd good point!
@pratiksangani could you explain which compatibility you would like to fix? Seems like we safely could remove these vendor prefixes

@digiltd
Copy link

digiltd commented Nov 11, 2020

@ihor-sviziev I think appearance still warrants a prefix, though only -webkit- and -moz- as Edge and IE use the -webkit- prefix

https://caniuse.com/css-appearance

Copy link
Contributor

@ihor-sviziev ihor-sviziev left a comment

Choose a reason for hiding this comment

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

Hi @pratiksangani,
Could you revert all changes and leave the only changes for appearance?

@ihor-sviziev
Copy link
Contributor

@pratiksangani I am closing this PR now due to inactivity.
Please reopen and update if you wish to continue.
Thank you for the collaboration!

@m2-assistant
Copy link

m2-assistant bot commented Dec 7, 2020

Hi @pratiksangani, 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
Labels
Area: Design/Frontend Area: Frontend Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests Award: bug fix Component: LoginAsCustomerAdminUi Component: MediaGalleryUi Priority: P3 May be fixed according to the position in the backlog. Release Line: 2.4 Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround. Severity: S4 Affects aesthetics, professional look and feel, “quality” or “usability”.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Issue] Module & Theme less optimization for cross browser compatibility.
6 participants