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(layouts): settings defaults from layout (mailchimp) #1587

Merged
merged 1 commit into from
Aug 1, 2024

Conversation

adekbadek
Copy link
Member

All Submissions:

Changes proposed in this Pull Request:

Fixes an issue with setting the default sender & audience data when Mailchimp is set as the ESP.

How to test the changes in this Pull Request:

  1. On trunk or release
  2. Set Mailchimp as the ESP
  3. Create a new newsletter, set sender data and choose an audience, save that as a new layout
  4. Create a new newsletters, use the newly created layout
  5. Observe two error notices in the editor and that the sender and audience are not filled
  6. Switch to this branch, create a new newsletter from that same layout again, observe the sender and audience are filled, and no error notices are displayed

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

codecov bot commented Jul 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 17.74%. Comparing base (b245716) to head (dedab16).
Report is 19 commits behind head on release.

Additional details and impacted files
@@            Coverage Diff             @@
##             release    #1587   +/-   ##
==========================================
  Coverage      17.74%   17.74%           
  Complexity      2316     2316           
==========================================
  Files             43       43           
  Lines           8758     8758           
==========================================
  Hits            1554     1554           
  Misses          7204     7204           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@miguelpeixe miguelpeixe left a comment

Choose a reason for hiding this comment

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

If I understand correctly, the sender and list data from the layout required fetchListsAndSegments() before being set, correct?

Fixes the issue!

@adekbadek
Copy link
Member Author

If I understand correctly, the sender and list data from the layout required fetchListsAndSegments() before being set, correct?

That's correct. Fetching lists and segments sets up the campaign in MC, as a side effect. And it also makes sense logically to set the audience (list and segments) from layout after fetching the related data.

@adekbadek adekbadek merged commit 766578a into release Aug 1, 2024
11 checks passed
@adekbadek adekbadek deleted the hotfix/layout-defaults-init branch August 1, 2024 07:03
@matticbot
Copy link
Contributor

🎉 This PR is included in version 2.21.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@matticbot
Copy link
Contributor

🎉 This PR is included in version 3.0.0-alpha.2 🎉

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants