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

fix(renderer): ensure group blocks use conditional tags #1380

Merged
merged 1 commit into from
Dec 20, 2023

Conversation

miguelpeixe
Copy link
Member

All Submissions:

Changes proposed in this Pull Request:

1200550061930446-as-1205996773681761

Group blocks placed in the root of the body are processed outside the usual render_mjml_component() method so they didn't have the conditional tags properly applied.

This PR ensures the conditional tags are rendered for such blocks.

How to test the changes in this Pull Request:

  1. Make sure you have your ESP setup to Mailchimp
  2. While in the master branch, draft a new newsletter
  3. Add a group block with some content and set the conditional tags to any rule, like *|IF:FNAME|* and *|END:IF|*
  4. Add a paragraph block below that one and apply the same rule
  5. Save the draft and click to preview
  6. Confirm only the paragraph is contained in the conditional tags
  7. Check out this branch, save the draft and preview again
  8. Confirm both blocks are contained in the conditional tags

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully ran tests with your changes locally?
Copy link
Contributor

@leogermani leogermani left a comment

Choose a reason for hiding this comment

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

Works well!

@miguelpeixe miguelpeixe merged commit a1a9722 into master Dec 20, 2023
7 checks passed
matticbot pushed a commit that referenced this pull request Jan 11, 2024
# [2.9.0-alpha.1](v2.8.0...v2.9.0-alpha.1) (2024-01-11)

### Bug Fixes

* memberships & "other" ESP ([6e0402c](6e0402c))
* prevent the use of `add_contact` for data sync purposes ([#1386](#1386)) ([2d68c1f](2d68c1f))
* **renderer:** ensure group blocks use conditional tags ([#1380](#1380)) ([a1a9722](a1a9722))
* store and recover lists on membership reactivation ([#1377](#1377)) ([aa8a8f4](aa8a8f4))

### Features

* display warning if custom fields meta box is visible ([d595ed4](d595ed4))
* **tracking:** support UTM coming from the ESP ([#1388](#1388)) ([77d3a1e](77d3a1e))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 2.9.0-alpha.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

matticbot pushed a commit that referenced this pull request Jan 25, 2024
# [2.9.0](v2.8.3...v2.9.0) (2024-01-25)

### Bug Fixes

* add lodash as dependency for editor.js ([c01aebb](c01aebb))
* memberships & "other" ESP ([6e0402c](6e0402c))
* prevent the use of `add_contact` for data sync purposes ([#1386](#1386)) ([2d68c1f](2d68c1f))
* **renderer:** ensure group blocks use conditional tags ([#1380](#1380)) ([a1a9722](a1a9722))
* store and recover lists on membership reactivation ([#1377](#1377)) ([aa8a8f4](aa8a8f4))

### Features

* display warning if custom fields meta box is visible ([d595ed4](d595ed4))
* **tracking:** support UTM coming from the ESP ([#1388](#1388)) ([77d3a1e](77d3a1e))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 2.9.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment