Skip to content

Add missing block name to allow block customisation #10354

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

Merged
merged 1 commit into from
Jul 31, 2017

Conversation

ihor-sviziev
Copy link
Contributor

@ihor-sviziev ihor-sviziev commented Jul 27, 2017

Description

Add ability to customize order renderers

Related Issues (if relevant)

  1. Add missing block name to allow block customisation #10352: Add missing block name to allow block customisation

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 on Travis CI are green)

@ishakhsuvarov
Copy link
Contributor

@ihor-sviziev Did you automate this process in any way? Would be nice to fix all of these cases around the codebase.

@ihor-sviziev
Copy link
Contributor Author

No, I did them manually, for all sales XML files

@maghamed
Copy link
Contributor

Hey @ihor-sviziev
The problem that for now we have 386 unnamed blocks in CE edition
and 180 in EE one.

You can see that applying next Regexp, for example in your PHP Storm
<block(?=\s|>)(?!(?:[^>=]|=(['"])(?:(?!\1).)*\1)*?\sname=['"])[^>]*>

What we want to do is to:

  1. Give names for all the existing unnamed blocks, using basic pattern like
    parent.name + current_block.as
    if the new name does not represent child block correctly - it could be changed to more appropriate one.

  2. Ideally to make all these changes in an automated way (script) - to make it possible to apply changes on all Magento Editions at once.
    It could be done in a different way: Pattern Matching, XPath etc.
    The one which is more suitable for you

  3. Provide a static test which will check that there are no Unnamed Blocks in Magento code base anymore after the changes applied.

The problem that accepting partial fixes don't make us closer to the final goal. Because someone who will work on this task later still needs to provide an implementation for all the steps mentioned above.

That's a general procedure we do in the core for such tasks.

Do you have some more time and will to invest into this issue?

@ihor-sviziev
Copy link
Contributor Author

@maghamed do we have any example for similar case? I can try to do that

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.

5 participants