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

extra column when you type html comment in <mj-group> #1621

Closed
xunuo opened this issue Jun 18, 2019 · 9 comments
Closed

extra column when you type html comment in <mj-group> #1621

xunuo opened this issue Jun 18, 2019 · 9 comments

Comments

@xunuo
Copy link

xunuo commented Jun 18, 2019

Describe the bug
extra column when you type html comment in <mj-group>

To Reproduce
Steps to reproduce the behavior:

<mj-group>
  <!-- foreach($n){ -->
  <mj-column>
    ....
  </mj-column>
  <!-- } -->
  <mj-column>
    ....
  </mj-column>
</mj-group>

will build 4 columns, and for each width will be 16%

Expected behavior
only 2 column

MJML environment (please complete the following information):

  • OS: MacOS
  • MJML Version 4.2.0
@iRyusa
Copy link
Member

iRyusa commented Jun 18, 2019

Hi,

I think this is fixed in 4.3.X https://mjml.io/try-it-live/r1vAwVU1r ?

You should use mj-raw for that instead of using html comment like that:

<mj-group>
<mj-raw>foreach($n){ </mj-raw>
  <mj-column>
    ....
  </mj-column>
<mj-raw>}</mj-raw>
  <mj-column>
    ....
  </mj-column>
</mj-group>

@xunuo
Copy link
Author

xunuo commented Jun 18, 2019

Hi,

I think this is fixed in 4.3.X https://mjml.io/try-it-live/r1vAwVU1r ?

You should use mj-raw for that instead of using html comment like that:

<mj-group>
<mj-raw>foreach($n){ </mj-raw>
  <mj-column>
    ....
  </mj-column>
<mj-raw>}</mj-raw>
  <mj-column>
    ....
  </mj-column>
</mj-group>

thanks for answer, but it's not working...

image

@iRyusa
Copy link
Member

iRyusa commented Jun 18, 2019

Oh you're right ! cc @kmcb777 maybe we can add this to 4.4, i think you just need to blacklist raw children ?

A temporary fix would be to define the width to 50% directly on both column inside mj-group !

@kmcb777
Copy link
Collaborator

kmcb777 commented Jun 20, 2019

@xunuo Hi, thanks for reporting this, there was indeed a problem 👍
It will be fixed in the next release

Raw elements were correctly ignored in mj-section but not in mj-group

iRyusa added a commit that referenced this issue Jun 24, 2019
fix #1621 fix ignore raw elements in column width calc in mj-group
@xunuo
Copy link
Author

xunuo commented Jun 26, 2019

@xunuo Hi, thanks for reporting this, there was indeed a problem 👍
It will be fixed in the next release

Raw elements were correctly ignored in mj-section but not in mj-group

Thanks!!! look forward it!

@xunuo
Copy link
Author

xunuo commented Jun 27, 2019

@kmcb777 hello, could we use the new version now, we have a project need it :)

@xunuo
Copy link
Author

xunuo commented Jun 27, 2019

how to use the newest version :)

@iRyusa
Copy link
Member

iRyusa commented Jun 27, 2019

This has not been released yet, it should be available soon. As a temporary fix just fix the column width to 50% manually in the group

@kmcb777
Copy link
Collaborator

kmcb777 commented Jul 2, 2019

Hi @xunuo , new version has been released, you can check if this problem is fixed. Still in beta so you need to install with the tag mjml@next

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants