magento2 icon indicating copy to clipboard operation
magento2 copied to clipboard

Decoupling of layout definitions

Open EliasZ opened this issue 12 years ago • 4 comments

With the whole new spirit of loosely coupling the Magento 2 code base, maybe a good look can be taken at the layout definitions and its dependencies. For example, opening Magento/Backend/view/adminhtml/layout/default.xml reveals the following definitions which can be moved:

<link src="Magento_Rule::rules.js"/> <!--Magento_Rule can take care of this--> 

The following can be moved to Magento_RequireJS:

    <link src="requirejs/require.js"/>
    <link src="mage/requirejs/resolver.js"/>
</head>
[...]
<block name="require.js" class="Magento\Backend\Block\Page\RequireJs" template="Magento_Backend::page/js/require_js.phtml" />
[...]
<referenceContainer name="after.body.start">
    <block class="Magento\RequireJs\Block\Html\Head\Config" name="requirejs-config"/>

More in after.body.start:

<block class="Magento\Translation\Block\Js" name="translate" template="Magento_Translation::translate.phtml"/> <!--Magento_Translation can take care of this-->

And so forth.

EliasZ avatar Oct 20 '14 13:10 EliasZ

Thank you for reporting this issue! We will have to look at this and get back to you once we have an answer.

verklov avatar Nov 08 '14 22:11 verklov

Good catch.. Thank you, for the valid suggestion. We are going to resolve this within one of the following sprints.

vkorotun avatar Nov 10 '14 12:11 vkorotun

Internal ticket: MAGETWO-30486

vpelipenko avatar Jan 29 '15 12:01 vpelipenko

Thank you for your submission.

We recently made some changes to the way we process GitHub submissions to more quickly identify and respond to core code issues.

Feature Requests and Improvements should now be submitted to the new Magento 2 Feature Requests and Improvements forum (see details here).

We are closing this GitHub ticket and have moved your request to the new forum.

piotrekkaminski avatar Aug 30 '16 20:08 piotrekkaminski