Problem/Motivation
I encountered an issue when sending emails without a header value. Even if the header is empty, the HTML wrapper for the header is still added. This causes unwanted extra spacing under the logo, particularly when padding is applied to the header wrapper. This affects the visual layout of emails.
Steps to reproduce
When heading of the email is empty
Then having extra empty space and classes
Proposed resolution
Add a validation to check whether the header has a value before rendering the related HTML. Only include the header wrapper if there is content to display.
{% if heading %}
<div class="postheader">
{{ heading }}
</div>
{% endif %}
Remaining tasks
- ✅ File an issue about this project
- ✅ Addition/Change/Update/Fix to this project
- ✅ Testing to ensure no regression
- ➖ Automated unit/functional testing coverage
- ➖ Developer Documentation support on feature change/addition
- ➖ User Guide Documentation support on feature change/addition
- ➖ UX/UI designer responsibilities
- ✅ Accessibility and Readability
- ✅ Code review from 1 Varbase core team member
- ✅ Full testing and approval
- ✅ Credit contributors
- ✅ Review with the product owner
- ✅ Update Release Notes and Update Helper on new feature change/addition
- ✅ Release varbase-10.1.0-beta1, varbase_email-10.1.0-beta1, varbase-10.0.8, varbase_email-10.0.10
- ✅ No Update
- ➖ Optional Update
- ➖ Forced Update
- ➖ Forced Update if Unchanged
User interface changes
API changes
Data model changes
Release notes snippet
Comments
Comment #2
odai atiehAttached a patch to add extra validation.
Comment #3
rajab natshahThanks, Odai, for reporting and patching.
An MR will be merged in no time
Comment #5
rajab natshahComment #8
rajab natshahComment #9
rajab natshahComment #10
rajab natshah✅ Released varbase_email-10.0.10
Comment #11
rajab natshahComment #12
rajab natshah✅ Released varbase_email-10.1.0-beta1
Comment #14
rajab natshahComment #15
rajab natshah✅ Released varbase-10.1.0-beta1
Comment #16
rajab natshah✅ Released varbase-10.0.8