-
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
Add responsive email format to the babylon-notifier #662
Add responsive email format to the babylon-notifier #662
Conversation
<mj-section padding-top="21px" padding-bottom="12px" padding-left="12px" padding-right="12px"> | ||
<mj-column> | ||
<mj-text font-family="Red Hat Text" font-weight="regular" align="center" font-size="16px" color="#000" line-height="1.2"> | ||
Status: Service Ready |
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.
should this be better placed under the content block? or a variable? If I understand correctly all the emails will contain the Service Ready even though they might belong to a provision failed alert
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.
Good catch, I've fixed it with 75d1a3b
<mj-section padding-top="12px" padding-bottom="12px" padding-left="12px" padding-right="12px" background-color="#f0f0f0"> | ||
<mj-column> | ||
<mj-text font-family="Red Hat Text" color="#4a5557" font-size="16px" line-height="1.5" padding-bottom="12px"> | ||
{% block content %}{% endblock %} |
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.
suggestion: Lift the content to be inside the mj-section
And then in every .mjml template use the mj-column / mj-text accordingly. As it is now the templates will not have lots of flexibility as they are encapsulated under those elements and they use plain html syntax without having the benefits of mjml syntax
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.
Good suggestion. I wanted to implement it this way initially but for some reason I've change my mind and left child
templates with pure HTML/JINJA2 without any MJML tags.
New commit should fix it - 164ccd9
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.
LGTM, great work
merged in #2187 |
MJML is a framework to generate responsive emails (more details at https://mjml.io/)
There are two major changes needed to introduce MJML framework to the
babylon-notifier
:operator.py
scriptI did the "success" path testing (provisioning start -> environment ready -> environment deleted). Deployment was done with
odo
tool.