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

Pass minifier callback to mjml-react render method #466

Merged
merged 4 commits into from
Apr 20, 2023

Conversation

Jaraujo6
Copy link
Contributor

Describe your changes

Currently, the sendMail api turns off minification by default and does not provide a mechanism by which users can supply their own minification. This pull request seeks to change that by adding an optional callback to the buildSendMail option arg, that if present, will be called using html created from the react-mjml render method, and returned from the mailing render method.

This approach decouples the minifier dependency from the larger mailing repository which means that users can use any library or implementation they please, as long as the callback accepts a string as an argument and returns a string, reducing the maintenance burden on the mailing support team.

Issue link

N/A

Checklist before requesting a review

  • [ x ] I have performed a self-review of my code
  • If it is a core feature, I have added thorough tests.

@changeset-bot
Copy link

changeset-bot bot commented Apr 20, 2023

🦋 Changeset detected

Latest commit: 5fa541f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
mailing-core Patch
web Patch
mailing Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Apr 20, 2023

@Jaraujo6 is attempting to deploy a commit to the sofn Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Collaborator

@psugihara psugihara left a comment

Choose a reason for hiding this comment

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

looks good, just tweaked the naming to be one step more general

edit: whoops didn't actually push commits, tweaking

@vercel
Copy link

vercel bot commented Apr 20, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
mailing-dynamic-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 20, 2023 10:16pm
web-emails ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 20, 2023 10:16pm
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
mailing-web ⬜️ Ignored (Inspect) Visit Preview Apr 20, 2023 10:16pm

@psugihara psugihara enabled auto-merge (squash) April 20, 2023 21:44
Copy link
Collaborator

@psugihara psugihara left a comment

Choose a reason for hiding this comment

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

thanks much @Jaraujo6 !

@psugihara psugihara merged commit 054d256 into sofn-xyz:main Apr 20, 2023
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

Successfully merging this pull request may close these issues.

2 participants