-
Notifications
You must be signed in to change notification settings - Fork 22
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
feat: minify and notify clipable email body #764
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Email rendering seems okay (except the new WP 5.9 "Row" block seems to not render correctly—perhaps we should disable this block for the newsletter editor?). The length warning is also great and works well upon save.
Issue: I'm seeing this JS console error about the minify
option for MJML:
"minify" option is deprecated in mjml-core and only available in mjml cli.
Inspecting the meta value, it does appear to be minified, but I wonder if the above indicates support for this feature might go away at some point?
Co-authored-by: Derrick Koo <[email protected]>
Nice catch! I just pushed #772 for this.
I didn't notice that warning, but unfortunately yes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could use the minify option until the next stable major release is out and until then figure out if we'll use a different library for the task. We can also not minify at all and just use the notice. WDYT?
This sounds good to me, as long as continuing to use the minify
option doesn't end up causing an error on the MJML side. I'm assuming after the option is removed from the library behavior will revert back to what's happening on the current master
HEAD, right? Basically the meta value will be saved as unminified HTML again?
Reading the PR, it just changes the warning message from "is deprecated" to "has been removed" and doesn't apply the |
That matches my understanding, too—thanks! |
# [1.43.0-alpha.1](v1.42.1...v1.43.0-alpha.1) (2022-03-31) ### Bug Fixes * disable row group block variation ([#772](#772)) ([82224ff](82224ff)) * move subject back to the sidebar ([#773](#773)) ([46aad75](46aad75)) ### Features * allow theme customization ([#766](#766)) ([ebf3cca](ebf3cca)) * minify and notify clipable email body ([#764](#764)) ([2c1c6a3](2c1c6a3))
🎉 This PR is included in version 1.43.0-alpha.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
# [1.43.0](v1.42.1...v1.43.0) (2022-04-05) ### Bug Fixes * disable row group block variation ([#772](#772)) ([82224ff](82224ff)) * move subject back to the sidebar ([#773](#773)) ([46aad75](46aad75)) ### Features * allow theme customization ([#766](#766)) ([ebf3cca](ebf3cca)) * minify and notify clipable email body ([#764](#764)) ([2c1c6a3](2c1c6a3))
🎉 This PR is included in version 1.43.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
All Submissions:
Changes proposed in this Pull Request:
Email content larger than 102kb gets clipped by Gmail. This PR implements a notice to let the user know their content may get clipped if we detect a resulting body larger than 100,000 bytes. This approximation is assuming that the ESP will add extra tags for tracking, footer, etc.
It also implements the minifying options to MJML to reduce the chance of clipping. My local tests produced a reduction of 25% of an email with ~100k bytes.
How to test the changes in this Pull Request:
npm run build
Other information: