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

[WIP] Fixes a bunch of less compilation problems and resolves some sm… #23942

Closed
wants to merge 2 commits into from

Conversation

hostep
Copy link
Contributor

@hostep hostep commented Jul 29, 2019

…all intended layout changes which didn't work due to mistakes being made and not being properly tested I guess.

Description (*)

Description updated 31 July 2019

This is work in progress, all compilation issues are fixed in the Luma theme and blank theme now.
And I discovered some more compilation errors in Magento's Backend theme (while compiling styles-old.less, not sure if that's even actually used, but it's being compiled), errors:

extend ' .data-table tbody tr:nth-child(odd) td' has no matches
extend ' .grid-actions .export .label' has no matches
extend ' .grid-actions .export .action-' has no matches
extend ' .col-570' has no matches

I think I'm going to split up this PR into different PR's per theme, otherwise it's going to be a lot to review.
Also writing a full description is going to take me some time, so a little bit more patience :)

Here are some notes I kept while working on these fixes:

# luma theme

- app/design/frontend/Magento/luma/Magento_Checkout/web/css/source/module/checkout/fields/_file-uploader.less

  => .abs-action-reset mixin is defined in backend module, so shouldn't be used in the frontend
  => has something to do with a custom attribute in the customer address for file uploads (according to commit message in https://github.com/magento/magento2/commit/ffbf8e6da2f5 where this issue was introduced)

- app/design/frontend/Magento/luma/Magento_Sales/web/css/source/_module.less

  => is being used in wrong media query
  => will add print icon to print link

- app/design/frontend/Magento/luma/Magento_CatalogSearch/web/css/source/_module.less

  => is being used in wrong media query
  => will hide legend in advanced search form

- app/design/frontend/Magento/luma/Magento_AdvancedCheckout/web/css/source/_module.less

  => is being used in wrong media query
  => can't test, this is probably a module from Magento Commerce, if somebody with access to that can figure out what this does and if the fix is ok, that would be great!
  1) it should probably apply the mixin ['.lib-clearfix'](https://github.com/magento/magento2/blob/2.3.2/lib/web/css/source/lib/_utilities.less#L54-L64) to that '.block-addbysku .block-content' selector in this module, after this fix it should actually do that, before this fix it probably won't be applied
  2) it should probably apply the mixin ['@abs-blocks-2columns'](https://github.com/magento/magento2/blob/2.3.2/app/design/frontend/Magento/luma/web/css/source/_extends.less#L169-L184) to that '.block-addbysku .block-content .box' selector in this module, after this fix it should actually do that, before this fix it probably won't be applied

- app/design/frontend/Magento/luma/Magento_Checkout/web/css/source/module/checkout/_estimated-total.less

  => is being used in wrong media query
  => won't change anything in generated css, except for fixing this compile problem

- app/design/frontend/Magento/luma/Magento_GiftMessage/web/css/source/_module.less

  => .abs-clearfix mixin is defined in backend module, so shouldn't be used in the frontend

- app/design/frontend/Magento/luma/Magento_Downloadable/web/css/source/_module.less

  => mixin '.clearer' was [first changed to '.mixin-clearer'](https://github.com/magento/magento2/commit/7249291d4bf#diff-b592349d70d86676439978ee25756c40L63), and [then later to '.lib-clearer'](https://github.com/magento/magento2/commit/993697797e3#diff-b592349d70d86676439978ee25756c40L65)
  => removing all together, it looks like these are no longer necessary

- lib/web/css/source/components/_modals.less

  => .abs-modal-overlay is defined in backend module but was used in lib code to be used in .modals-overlay which is used both on frontend and backend
  => moved the inclusion of .abs-modal-overlay to backend theme only, on frontend it will no longer be included (no problem: it didn't work before anyways)




# blank theme

- app/design/frontend/Magento/blank/Magento_Review/web/css/source/_module.less

  => .abs-rating-summary is defined in luma theme but used in blank theme, this makes no sense
  => so either we should remove its usage from blank theme, or add its definition to blank theme (its function is to align the stars of already submitted ratings nicely, not sure what to do here?)

- app/design/frontend/Magento/blank/Magento_Multishipping/web/css/source/_module.less
- app/design/frontend/Magento/blank/Magento_MultipleWishlist/web/css/source/_module.less
- app/design/frontend/Magento/blank/Magento_GiftRegistry/web/css/source/_module.less

  => .abs-account-title is defined in luma theme but used in blank theme, this makes no sense
  => so either we should remove its usage from blank theme, or add its definition to blank theme (not sure what to do here?)
  => I can't test the Magento_MultipleWishlist or Magento_GiftRegistry modules because they are part of Magento Commerce

Will update the description of the PR with clearer explanation once fully finished.

Fixed Issues (if relevant)

  1. Less compilation extend 'mixin' has no matches #23619: Less compilation extend 'mixin' has no matches

Manual testing scenarios (*)

  1. ...

Questions or comments

Somebody with deep knowledge about blank & luma theme should best review. I think most of these changes are ok, but maybe it can still be reviewed by one of the original authors of these themes to be sure everything now works as intended.

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 Jul 29, 2019

Hi @hostep. 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.3-develop instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Assistant documentation

…all intended layout changes which didn't work due to mistakes being made and not being properly tested I guess.
@hostep hostep force-pushed the fix-for-issue-23619 branch from 63cfa14 to 82a0612 Compare July 30, 2019 20:04
@hostep
Copy link
Contributor Author

hostep commented Aug 3, 2019

Closing this PR as I created follow up PR's for each theme individually:

I also opened a follow up issue for the Magento/backend theme problems: #24004

@hostep hostep closed this Aug 3, 2019
@m2-assistant
Copy link

m2-assistant bot commented Aug 3, 2019

Hi @hostep, 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.

@hostep hostep deleted the fix-for-issue-23619 branch August 3, 2019 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants