feat: add CSS inlining support for mj-style with inline attribute#537
feat: add CSS inlining support for mj-style with inline attribute#537jdrouet merged 11 commits intojdrouet:mainfrom
Conversation
0ad8d6d to
c824b71
Compare
jdrouet
left a comment
There was a problem hiding this comment.
Several questions:
- As this been generated by an AI?
- Did you run a benchmark?
Moving forward:
- Could you put this behind a feature flag?
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #537 +/- ##
==========================================
- Coverage 92.89% 92.84% -0.06%
==========================================
Files 227 206 -21
Lines 12203 11357 -846
==========================================
- Hits 11336 10544 -792
+ Misses 867 813 -54 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
c824b71 to
79ed015
Compare
Signed-off-by: Samuel Cormier-Iijima <samuel@cormier-iijima.com>
79ed015 to
92c392f
Compare
|
@sciyoshi for me to keep track of your changes before approving the workflows AND for my reviews to stay attached to your code, could you push new commits instead of push-forcing? |
|
Thanks @jdrouet, and my apologies, will do. Just attempting to fix the latest CI issues. As for your questions: the first pass was mostly generated with Sonnet 3.7 Thinking, but I had to make a number of manual changes to get it working. I have not run any benchmarking yet on the new code. It is possible to add a feature flag, but the behavior won't apply unless there's any inline styles in the input, so I wasn't sure if that was necessary. |
|
The only change from the original commit so far was to fix a clippy error and to add |
The means that |
Signed-off-by: Samuel Cormier-Iijima <samuel@cormier-iijima.com>
1c564f9 to
834de09
Compare
Signed-off-by: Samuel Cormier-Iijima <samuel@cormier-iijima.com>
Signed-off-by: Samuel Cormier-Iijima <samuel@cormier-iijima.com>
fe1fa60 to
fea71ac
Compare
|
Hey, |
604a7ab to
e1cef80
Compare
Signed-off-by: Samuel Cormier-Iijima <samuel@cormier-iijima.com>
e1cef80 to
085c1d0
Compare
|
@jdrouet sure, I added a |
|
We're really looking forward for this change let me know if I can help in any way! |
|
As performance was mentioned, I am wondering if it would be useful to have some CSS pre-compilation feature in |
|
👋 Hi, |
|
@sciyoshi could you resolve the conflicts so that we can trigger the tests? |
…sue-17 Signed-off-by: Samuel Cormier-Iijima <samuel@cormier-iijima.com> # Conflicts: # readme.md # readme.md~HEAD
|
Done - also bumped css-inline to 0.18.0. |
jdrouet
left a comment
There was a problem hiding this comment.
We are almost there, thanks for your changes!
Could you also sign your commits?
| mrml = { version = "5.1.0", path = "../mrml-core", features = [ | ||
| "http-loader-ureq", | ||
| "local-loader", | ||
| "css-inline", |
There was a problem hiding this comment.
My thought here is that it should be enabled by default for the Python lib, because otherwise there's no way to enable it for a consumer without rebuilding this package, and the performance impact if you are not using inlining should be negligible.
Signed-off-by: Samuel Cormier-Iijima <samuel@cormier-iijima.com>
25350b2 to
1e4dfd8
Compare
Signed-off-by: Samuel Cormier-Iijima <samuel@cormier-iijima.com>
Signed-off-by: Samuel Cormier-Iijima <samuel@cormier-iijima.com>
Signed-off-by: Samuel Cormier-Iijima <samuel@cormier-iijima.com>
Description
This PR implements CSS inlining support for MJML templates with the 'inline' attribute on mj-style elements.
Changes
How It Works
Fixes #17