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

Disabeling js merge,bundle,minify does not work in admin #11270

Closed
wants to merge 5 commits into from
Closed

Disabeling js merge,bundle,minify does not work in admin #11270

wants to merge 5 commits into from

Conversation

roma-glushko
Copy link
Member

@roma-glushko roma-glushko commented Oct 6, 2017

Description

When disabling the js, and css ,merge, minify and bundling for default scope and keeping them enabled for website and store view scope, the admin still loads minified and bundled js.

These changes does the following to fix the issue:

  • specify scope type in the Magento\Framework\View\Asset\ConfigInterface methods
  • specify the default store view for adminhtml area in Magento\Store\App\FrontController\Plugin\DefaultStore plugin

Fixed Issues

  1. Disabeling js merge,bundle,minify does not work in admin #10605: Disabeling js merge,bundle,minify does not work in admin

Manual testing scenarios

Steps to reproduce

  • Disable js merge, minify, bundling for default scope in system config
  • Enable the same in Website scope
  • Enable the same in store view scope

Expected result

  • Admin should load all the js files separately
  • Frontend should load bundled files

@magento-cicd2
Copy link
Contributor

magento-cicd2 commented Oct 6, 2017

CLA assistant check
All committers have signed the CLA.

@orlangur
Copy link
Contributor

orlangur commented Oct 8, 2017

Copy link

@vkublytskyi vkublytskyi left a comment

Choose a reason for hiding this comment

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

@roma-glushko Thank you for your effort. Please fix failed tests, remove duplication and align implementation with backward compatibility guide

/**
* @var RequireJsConfig
*/
protected $config;

Choose a reason for hiding this comment

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

private visibility is preferable for all new code.

{
/**
* @var RequireJsConfig
*/
private $config;
protected $config;

Choose a reason for hiding this comment

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

What is the reason to increase property visibility?

* @api
* @since 100.0.2
*/
class Config extends AbstractBlock

Choose a reason for hiding this comment

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

This class duplicates Magento\RequireJs\Block\Html\Head\Config except $scopeType. Such variation should be implemented over object configuration at instantiation (use block arguments) not by code duplication or inheritance.

* @return bool
*/
public function isMergeCssFiles();
public function isMergeCssFiles($scopeType = ScopeInterface::SCOPE_STORE, $scopeCode = null);

Choose a reason for hiding this comment

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

This is forbidden change because of backward compatibility policy.

You may:

  • introduce new interface with required arguments more
  • introduce new class that will implement created interface
  • inject new class to Magento\Framework\View\Asset\Config and delegate all calls to new class with suitable arguments
  • declare Magento\Framework\View\Asset\Config as @deprecated
  • inject new interface in addition to Magento\Framework\View\Asset\ConfigInterface where is needed (backward compatibility for modified constructor should be preserved)
  • do not remove Magento\Framework\View\Asset\ConfigInterface from any constructors, mark that argument/property as @deprecated instead

@magento-engcom-team magento-engcom-team changed the base branch from develop to 2.3-develop October 20, 2017 15:32
@okorshenko okorshenko modified the milestones: October 2017, November 2017 Nov 1, 2017
@ishakhsuvarov
Copy link
Contributor

Hi @roma-glushko
Would you still like to proceed with this PR?

@roma-glushko
Copy link
Member Author

Hi @ishakhsuvarov ,

Yes, I'm going to finish this PR. Unfortunately, I will be able to to this in a week.
Is it okay for you? Let me know, please.

Thank you!

@ishakhsuvarov
Copy link
Contributor

@roma-glushko Sure. Thank you for the quick update!

@okorshenko okorshenko modified the milestones: February 2018, March 2018 Mar 1, 2018
@okorshenko okorshenko added partners-contribution Pull Request is created by Magento Partner and removed partner contribution labels Apr 2, 2018
@okorshenko okorshenko modified the milestones: March 2018, April 2018 Apr 16, 2018
@magento-engcom-team
Copy link
Contributor

Hi @roma-glushko
Unfortunately we are closing this Pull Request now due to inactivity.
Please reopen and consider review comments if you wish to proceed.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix help wanted partners-contribution Pull Request is created by Magento Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants