Skip to content

reference directive restored for _extends.less. extends replaced to mixins in _extend.less #35101

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

Conversation

serhii-chernenko
Copy link

@serhii-chernenko serhii-chernenko commented Feb 14, 2022

Description (*)

When I installed a clear M2, I saw that the reference directive removed for the import of _extends.less file. I've found this PR and I explained why removing reference is a bad idea:
#31793 (comment)

I've investigated later how to restore reference but repair the issue of Grunt in the PR.

And I've found a solution described here:
#31793 (comment)

@ihor-sviziev asked me to create a PR with the fix, so I made it.

Related Pull Requests

#31793

Manual testing scenarios (*)

  1. Create a new theme which extends Magento Blank theme.
  2. Compile styles via default deploying (setup:static-content:deploy) and via Grunt.
  3. Look at block titles of My Account (they should look the same after all build processes).
  4. Find matches of abs selectors in styles-m.css and styles-l.css files. Quantity of them and the size of styles-m.css should be less in comparison with the main branch (2.4-develop).

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)
  • 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:

  1. resolves [Issue] reference directive restored for _extends.less. extends replaced to mixins in _extend.less #36914: reference directive restored for _extends.less. extends replaced to mixins in _extend.less

@m2-assistant
Copy link

m2-assistant bot commented Feb 14, 2022

Hi @iNeViX. Thank you for your contribution
Here are 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
  13. Semantic Version Checker

You can find more information about the builds here

ℹ️ Run only required test builds during development. Run all test builds before sending your pull request for review.

For more details, 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, join the Community Contributions Triage session to discuss the appropriate ticket.

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

@ihor-sviziev
Copy link
Contributor

@magento run all tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@ihor-sviziev
Copy link
Contributor

@mrtuvn, could you please review?

@ihor-sviziev ihor-sviziev requested a review from mrtuvn February 14, 2022 20:58
@sdzhepa sdzhepa added the Priority: P3 May be fixed according to the position in the backlog. label Feb 17, 2022
@mrtuvn
Copy link
Contributor

mrtuvn commented Feb 20, 2022

Looking goods at my pov
Sorry current i totally lost of track with magento codebase. Since a while i don't work with magento anymore. But i will support you as much as possible
Class mixins, or abstract in reference import should not show at output files final css. I think current extend way seem outdated and not working properly if we use grunt compile. This task may take efforts to recheck with extend implements in codebase. If we want styles consistency same (php compile and lessjs compile/grunt)
From my opinion i think we need to check compare results file extends with both theme luma/blank too

@mrtuvn
Copy link
Contributor

mrtuvn commented Feb 20, 2022

Can you check static fails at reports ?

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@mrtuvn mrtuvn added the Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests label Mar 9, 2022
@mrtuvn
Copy link
Contributor

mrtuvn commented Mar 9, 2022

@magento run Static Tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@mrtuvn
Copy link
Contributor

mrtuvn commented Mar 9, 2022

Seem false positive results from Less sniffer checks. From my view is magento use php to check less/css code syntax ?
cc: @ihor-sviziev @sidolov

@mrtuvn
Copy link
Contributor

mrtuvn commented Jun 5, 2022

@magento run Static Tests

1 similar comment
@mrtuvn
Copy link
Contributor

mrtuvn commented Jun 5, 2022

@magento run Static Tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

1 similar comment
@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@mrtuvn
Copy link
Contributor

mrtuvn commented Jun 6, 2022

magento/magento-coding-standard#395
Found this one report may clear for reason fail static tests. I think we should take a look at current implement in static check sniffer
CC: @ihor-sviziev @sdzhepa @sivaschenko

Copy link
Contributor

@mrtuvn mrtuvn left a comment

Choose a reason for hiding this comment

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

looks good

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@engcom-Echo
Copy link
Contributor

@magento run WebAPI Tests,Integration Tests,Functional Tests EE,Functional Tests B2B

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@engcom-Echo
Copy link
Contributor

@iNeViX @mrtuvn @ihor-sviziev
Thanks for the collaboration & contribution!

✔️ QA Passed
reference directive restored for _extends.less. extends replaced to mixins in _extend.less

Manual Scenario Steps
For manual steps we have followed comment

For actual result we have followed comment

Before: ✖️

Theme luma (search/find available ".abs-")
styles-l.css 77
image

styles-m.css 419
image

After: ✔️
Theme luma (search/find available ".abs-")
styles-l.css 68
image

styles-m.css 254
image

As there are test failure so moving to Extended Testing

@engcom-Echo
Copy link
Contributor

@magento run all tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@engcom-Echo
Copy link
Contributor

@magento run Functional Tests B2B ,Functional Tests EE

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@engcom-Echo
Copy link
Contributor

@magento run Functional Tests B2B ,Functional Tests EE

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@engcom-Echo
Copy link
Contributor

Functional Tests EE and Functional Tests B2B failures are different on last two run.
Functional Tests EE
Run1
image

Run2
image

Functional Tests B2B
Run1
image

Run2
image

Hence moving to Merge In Progress

@engcom-Lima
Copy link
Contributor

@magento create issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Design/Frontend Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: accept Release Line: 2.4 Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it
Projects
Status: Recently Merged
Development

Successfully merging this pull request may close these issues.

[Issue] reference directive restored for _extends.less. extends replaced to mixins in _extend.less
9 participants