We are generating push notification emails in gitlab CE omnibus 8.9 on ubuntu 14.04 lts. The emails that are generated are readable except for the diff area which is unreadable, due to a very large number of empty lines in between the real content lines:
Designs
Child items
...
Show closed items
Linked items
0
Link issues together to show that they're related or that one is blocking others.
Learn more.
This formatting problem reproduces on gmail, and in Outlook, I am willing to investigate this and do something to build a reproducible test case (perhaps push a repo that has this problem up to a public gitlab area).
Previous comment is wrong. Issue reproduces in Outlook but not in Google Mail.
This may be a non-compliance issue inside Outlook or even Office 365 (given how much of a mess microsoft's outlook desktop client's integration with office 365's exchange-server-like elements) itself.
If I forward the email after it's been received by Outlook to GMail, then the issue reproduces. However I can't say for sure that the html-email has not been tampered with by Outlook itself or Office 365's servers.
If someone could direct me to the general area the relevant code lives, I might be able to take a look at this. It's causing a significant headache in my office, which lives and breathes commit emails.
There appears to be extra crap at the end of each row that looks like this in the generated emails, three nonbreaking spaces each with their own paragraph tag and span, and each with its own single non breaking space content, per each <td></td>:
<p class=MsoNormal align=right style='text-align:right'><span style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family: "Times New Roman";color:#333333'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Courier New";mso-fareast-font-family: "Times New Roman";color:#333333'><o:p> </o:p></span></p> <p class=MsoNormal><span style='font-family:"Courier New";mso-fareast-font-family: "Times New Roman";color:#333333'><o:p> </o:p></span></p>
Thanks @hooksie, that's really helpful! I don't have access to a copy of Outlook, but I reproduced something similar with a clone of that repo by sending email to an Outlook.com address:
@iamphill Googling shows me a lot of horrible things Outlook might do with table cell height and line heights in general, but I don't know which of them apply here Any ideas?
Awesome stuff, I take it no-one objects if we don't do the extra work to support leading whitespace on Outlook.com? It's not a huge amount of work but it would make a template more complicated for relatively little gain. /cc @stanhu
I'm not an Outlook.com user, so I have no dog in that race. So no objection from me.
That said, if you're mean leading line whitespace, I would lightly caution against undervaluing that. For us Python devs, it might make a big difference in understanding the diff. (Or I might not understand what leading whitespace you are referring to.)
Interesting @stanhu, do you have the raw email for that issue still? From what @iamphill could tell, it's just that Outlook.com seems to ignore white-space: pre, but allow pre elements to do that. Gmail / Inbox seem to work for me, but HTML email is fiddly.
Thanks! That's not the problem with whitespace being collapsed that we see on Outlook.com, there's just no whitespace in the HTML (!), so I'm happy calling that a separate thing.
<tdstyle="background:#eaffea;border:none;color:#333;display:block;font-family:'Menlo','Liberation Mono','Consolas','DejaVu Sans Mono','Ubuntu Mono','Courier New','andale mono','lucida console',monospace;font-size:13px;line-height:1.5;margin:0;padding:0 0.5em;white-space:pre-wrap"bgcolor="#eaffea">+<span><spanstyle="color:teal">@merge_requests</span><spanstyle="font-weight:bold">=</span><spanstyle="color:teal">@issue</span><span>.</span><spanstyle="color:#900;font-weight:bold">referenced_merge_<wbr>requests</span><span>(</span><spanstyle="color:#333">current_user</span><span>)</span></span></td>
@smcgivern I think the best solution - if possible - is to change whitespaces into . If not, i think wrapping the line content in pre tag worked aswell.
OK, I'll add the pre tag. Changing to makes sense, I just think we'd want to not do that in the web UI, which would make the views more complicated (as they are shared between the web UI and the emails).