Problem/Motivation
Emails coming from Drupal.org are pretty noisy and not terribly easy to understand. My primary interaction with drupal emails is in issue queues, but I imagine other system emails could use some massaging as well.
Issue notification emails are sent as plain-text, which means that we cannot use HTML in them.
At the moment HTML is translated by core, so that:
- Links change from Google into something like this: Google [1] with then the corresponding 'footnote' at the bottom.
- Text styling does things like strong becomes *strong* and emphasis becomes /emphasis/.
- And other things.
This can make it hard to actually follow a link, because instead of it being right there, you have to scroll to the bottom and then pick it out of a potentially very long list.
However, it should be noted that some people prefer the footnotes. See #22 for an example.
Basically, we need to cater for both.
Proposed resolution A
Implement HTML email sending using something like Mimemail module so that we can at least have a mimimal HTML email sent for issue updates.
Use Mail system to limit these changes to just the project issue update emails, other emails can be discussed in follow ups.
Tweak the email that Project Issue module sends so that it's more/better/faster/etc.
Proposed resolution B
First, the current system is technically fine. I'd recommend adding the ability for users to opt-in to HTML emails.
Second, I think there are 4 action items that could make the emails considerably easier to read:
- Where possible, make links human-readable text. Links right now are a mix of full, absolute URLs in the body, and flagged like footnotes with the URLs at the bottom. Making the links appear inline like we'd expect in a 2021 webpage is probably a better experience.
- Put all issue metadata in the same place instead of sandwiching stuff in the middle. Right now, issue emails start with a link to the issue, a comment ID, a datestamp (which is in UTC even though I've selected my timezone), and the user that made the update. Then we get the content of the issue update. Then we get the current issue values. I'd recommend putting all issue metadata into a table format and putting it all after content of the issue update.
- When there's a change to an issue's metadata, display that change like a git diff For example, if an issue is changed from "needs work" to "needs review", display the old value with a pink background and with a strikethrough and the new value in bold with a light green background.
- Changes to files should be treated like metadata. Right now, file changes are treated like comments written by users in system emails, but are more appropriately displayed like metadata on drupal.org
Remaining tasks
- Agree an amount of 'compactification' for the emails.
- Agree the Mimemail approach.
- Come up with patches for Project issue for any clean-ups
- Work out a deployment plan for d.o
- Decide if HTML or plain-text should be the default.
- Communicate clearly how to change the default.
User interface changes
Adding a 'plaintext emails' thing to the user profile.
Possibly needs moving, certainly it's ugly. Maybe we could get a patch into Mimemail to make adding this to the view optional, and where it appears on the edit, configurable.
API changes
None.
Original report by @dww
In D6 and before, we had our own custom equivalent of drupal_html_to_text() that did the same kind of URL footnote stuff. I think the version in core was actually a cleaned up copy of project_issue's. :/
Previously, this was called on each hunk of a notification email, so you'd get any URL footnotes at the bottom of each comment in the email, instead of having all of them in a huge pile at the end of the email.
Now that #1560012: Port per-user issue notification email functionality to D7 is basically done, that function is gone, and we're just getting a single call to drupal_html_to_text() directly from the default mail system in D7. However, the UX is more sucky this way, and it's a lot harder to use the right links, especially on a long issue with a lot of comments.
We should investigate if it's possible and better to call drupal_html_to_text() ourselves on each chunk of the message so that we render the footnotes together with the comments that generated them. The downside is the footnote numbers will keep resetting, but that's not necessarily the end of the world.
Comment | File | Size | Author |
---|---|---|---|
#42 | new-patches-or-screenshots.png | 410.11 KB | hestenet |
#42 | metadata-changes.png | 311.34 KB | hestenet |
#42 | new-text-comment-2.png | 420.16 KB | hestenet |
#42 | new-text-comment.png | 436.34 KB | hestenet |
#42 | potential-solution.png | 192.32 KB | hestenet |
Comments
Comment #1
drummI don't see this as a launch blocker, retagging.
Personally, I'd like (simple) HTML emails with regular links, but that's a separate issue.
Comment #2
moshe weitzman CreditAttribution: moshe weitzman commentedI agree that the current list of links is overly verbose.
Further, I agree that a simple HTML email makes a lot of sense. What do others think about this? I promise that an HTML email would not contain images and tracking beacons and al that nonsense.
Comment #3
moshe weitzman CreditAttribution: moshe weitzman commentedThis HTML email template has 1500+ stars on Github. It is responsive - https://github.com/leemunroe/html-email-template
Comment #4
mgiffordLooks pretty good from:
https://github.com/leemunroe/html-email-template/blob/master/email.html
So if we wanted to implement this, what is the next step?
Certainly, we're all using more mobile devices these days. If we made Drupal & Drupal communications more mobile friendly that could only be a good thing, right?
Comment #5
moshe weitzman CreditAttribution: moshe weitzman commentedI think an HTML mockup of an email notification would be a good next step. It should include comments, attachments, etc. Presumably an HTML notification from Jira/Bugzilla/etc. would be a good starting point.
Comment #6
mgiffordHow many people are getting regular emails from Drupal.org?
Thoughts on how to implement it?
https://drupal.org/node/900794
Any thoughts on the smtp module:
https://drupal.org/project/smtp
I'm trying to see if I can get some sample text tow work with.
Comment #7
moshe weitzman CreditAttribution: moshe weitzman commentedI don't see much point in using SMTP module. Lets just send one (much improved) HTML email to everyone. It isn't like we have lots of different email newsletters to send.
Comment #8
mgiffordSo how does this look?
Crazy to go back to tables. Lowest common denominator I assume.
Comment #9
moshe weitzman CreditAttribution: moshe weitzman commentedThanks for moving this ahead.
I've attached a notification from Jira. Key enhancements include a user picture and a red/green diff when issue values change. This is done for persistent text values as well, like Issue Summary.
Specifically about the HTML mockup you presented; I would personally like it if all the values in the table are hyperlinked to Searches in the current project. So, this issue would hyperlink component 'Mail' to https://drupal.org/project/issues/project_issue?component=Mail. Also, the date looks too prominent there, IMO.
For mockup purposes, it makes sense to use a comment (like this one) that also changes a couple Fields.
Comment #10
LewisNymanI had a play around with the visual hierarchy, trying de-emphasise the less important information.
It would be interesting to see how many people click on the update issue link but, like with the profile pictures, it's better to leave the new features and content to a separate issue.
Comment #11
mgiffordWe should be able to do A/B testing based on user ID to evaluate new designs and look at how changes like this affect behavior.
I don't know if the #7 should stand out on it's own. It's not useful without context.
Comment #12
LewisNymanAgreed. I don't like the #7 either. I was just looking to bring the styling closer to the comment styling on the site.
We should be tracking clicks right now :) I have no idea how important all these links are.
Comment #13
mgifford"We should be tracking clicks right now" - Yes, but how?
Neither of these is going to work:
https://drupal.org/project/pop_links
https://drupal.org/project/click
Would be nice to track uid, message id & link.
Not sure there is an easy way to do that.
Comment #14
Shyamala CreditAttribution: Shyamala commentedAdding Tags
Comment #15
LewisNymanOh right, I was thinking the old fashioned way with Google Analytics, example here.
Something like:
http://www.drupal.org/node/[nid]?utm_campaign=issue-notification&utm_medium=email&utm_source=[uid]
Comment #16
drummLet's limit the scope of this issue to removing calls to
drupal_html_to_text()
and making sure the basic HTML is an improvement over text in many mail clients.Further improvements can be followups.
Comment #17
tvn CreditAttribution: tvn commentedAdding meta, tagging.
Comment #18
Steven Jones CreditAttribution: Steven Jones commentedSo I don't think we've talked about how to actually send these HTML emails.
On sites where we've wanted to deliver this sort of thing for our clients, we've used a combination of:
We've not really used the whole 'hey you can send emails with your site's theme thing' because we haven't really wanted our emails to look too much like our site, and we need to do tables in emails etc.
But anyway, this is all certainly possible, but kinda hinges on what d.o maintainers are happy about installing I guess, certainly we're going to need quite a few modules to get going with.
Comment #19
sunFWIW, a strong -1 to HTML email notifications. — They're substantially larger in size (many more KB, negatively affecting your mobile traffic volume), HTML text is harder to read, the wrapping HTML template adds unnecessary noise + spacing, and a HTML representation very often hides away originally intended text formatting (which is lost on d.o, too, but the email notification currently shows the originally intended formatting/meaning). Lastly, a proper MIME text/html email design dictates that an alternative text/plain presentation is contained in each mail, further increasing their size - not every email client is capable of rendering HTML, and omitting text/plain can trigger spam filters (as that has become a detection rule, since many spam mails only include a text/html body).
In turn, "more compact" makes a questionable claim about the visual presentation (most often not true) and ignores the data/traffic size compactness altogether.
+1 to the original problem statement in the issue summary though; running
dhtt()
separately for each contained content fragment would improve the text email notifications.Comment #20
drummI don't think we should do heavyweight HTML emails. Instead of footnotes for links, use
<a href="">
. Use appropriate headings and/or<strong>
to make sections of the email easy to pick out.Personally, I have no desire to have any CSS. That would be hard to get right and QA, and isn't necessary.
Comment #21
LewisNymanA broad generalisation
Another broad generalisation and commonly untrue. Is all typographical design worse than default browser styling?
Sure, but what is the market share of these clients (with a tech savvy audience) in 2014? isn't this the same argument as supporting IE5?
Another generalisation, why not raise all of these as objectives of the HTML implementation instead of reasons not to do it at all? It's certainly possible to avoid all of these problems with a correct implementation.
Comment #22
sun@drumm: Sounds like the only reason for investigating HTML mails is to get rid of links as footnotes? (Whereas I and probably many others like the footnotes, because they massively aid in speed-reading.)
@LewisNyman:
All of the examples shown here (mockups, JIRA, etc) are running into the exact same trap. — Just because you have rich formatting available doesn't mean you should use it.
The art of communication is to transfer information as quickly, intelligently, and as concisely as possible.
Having to scroll down to see the actual comment? Ugh.
Three lines of wrapped text just to communicate the context/issue-title? Ugh.
Reducing available display width just to insert a fancy background/border? Ugh.
…
Notifications are about communication, not about looking fancy. Some people need to read + process more than a hundred of these emails on every single day.
In any case, let's please make this an opt-in and retain pure text/plain mails for everyone who cares about traffic and speed.
Comment #23
Steven Jones CreditAttribution: Steven Jones commented@sun How do footnotes enable you to read faster? Do you skip over the [1] when reading in a way that you wouldn't if the text was a different colour/underlined.
For sake of comparison with something very minimal in terms of HTML. I put the issue summary and comment #22 through Redmine and then took some screenshots of the original email from d.o and the Redmine one in gmail. Now I know that not everyone uses gmail, and we should totally test anything in as many mail clients as possible, but this is mainly just to give an example of 'minimal' html emails, also I'm fully aware that there are other flaws/limitations with this.
Current Drupal.org
Redmine replica
(If there's scaling on the embedded images here, you might want to open separately to see and compare)
Comments
On my phone they look broadly the same, except that the text wrapping is weird on the plain-text one. I guess because the plain text one can't distinguish between an intentional and a forced line-break. I think the readability of the HTML one wins here?
Plain text
HTML
Comment #24
Steven Jones CreditAttribution: Steven Jones commentedSo I converted my dev site to use HTML email notifications, a quick list of what I did was:
I get emails that look like this:
Or this (more complex comments):
or this:
Comment #25
Steven Jones CreditAttribution: Steven Jones commentedNote that in those examples above the visual changes are actually quite minimal, and essentially they boil down to two major things:
Mimemail allows a user to say that they still want to receive emails in plain text, which seems to revert the mails to the current behavior.
Now, the emails need a little work for sure, just to tidy them up, we are sending the file attachment images for one, which probably isn't required.
If anyone else wants to have a play with this testing site: https://steven-drupal.redesign.devdrupal.org/ message me via my contact form, and I'll reset your password on the site so you can input an email address for testing.
Comment #26
drummSee #2128907: Remove fileicons from file upload views for removing those file icons from HTML for web browsers.
Comment #27
moshe weitzman CreditAttribution: moshe weitzman commentedYeah, really close for a first try. I'd like to see the first three links turned into hyperlinks which will take up less vertical space.
Comment #28
Steven Jones CreditAttribution: Steven Jones commented@moshe weitzman Yeah, I totally agree. However...
Those links at the top of the email are deliberately not links at the moment (I think) because then they don't get replaced out with footnotes, but rather provide an easy way to get to the link and the edit form for the issue, without having to go to the footnotes and finding the one you want.
So while we can replace them with something more compact for HTML people, it will affect people who stick to plain-text emails, because they'll get footnotes for those links.
So...I guess we need to decide if plaintext people should get some nice links at the top of their emails, or if they should be forced into using footnotes, or if we have a hybrid, where maybe just the main link to the issue is printed as a URL, so that plaintext emails viewers still make it a link, but HTML emails are more compact elsewhere.
Comment #29
Steven Jones CreditAttribution: Steven Jones commentedSo, a first pass of the 'hybrid' looks like this:
Rich text
Plain text
Comment #30
Steven Jones CreditAttribution: Steven Jones commentedAdded an issue summary.
Comment #31
Steven Jones CreditAttribution: Steven Jones commentedCould we ditch the direct link in the header to the issue edit page? Do people use that a lot? Do we have any stats available on d.o that would allow us to see?
Comment #32
drummLet's remove it because editing an issue is done directly on issue pages now. And there is a prominent "Update this issue" link usually above the fold.
Google Analytics does say 0.05% of sessions were referred by email site-wide. I'm not sure how readily this can be dug into, since our paths are node/*. Since there is no personally-identifying information in Google Analytics, I'm okay with handing out access, I need your email associated with a Google account.
Comment #33
Steven Jones CreditAttribution: Steven Jones commentedAfter a quick poke around in GA, it looks like people have arrived directly to a node/nnn/edit page about 160 times in the past month, and of those 8 were from emails.
So, with the usual caveats about Javascript based tracking etc. this doesn't look like the most used feature of these emails does it?
Comment #34
LewisNymanRemove it, then wait to see if anyone complains ;-)
Comment #35
moshe weitzman CreditAttribution: moshe weitzman commentedThe plain text email in #29 manages to show the first link AND duplicate it again as a footnote. This is somewhat sloppy IMO. I'd be OK with expecting plain text recipients to use footnote links.
Comment #36
Steven Jones CreditAttribution: Steven Jones commented@moshe weitzman well, actually I think that isn't really a link, but my email software (gmail) decides that it looks like a link and makes it one for me.
Comment #37
jiv_e CreditAttribution: jiv_e at LilDrop Consulting commentedIs the 'Remaining tasks' list up to date? Should we have a 'Done tasks' list also?
Have we done anything yet? Should we concentrate on one task at the time and maybe change this to a META issue?
Comment #38
Steven Jones CreditAttribution: Steven Jones at ComputerMinds commented@jiv_e yeah I think that list is still broadly accurate. I don't think any of the tasks have been done, so I don't think we need a done tasks section yet, and when we do we can probably just use
strikethroughto indicate that.Do you have any thoughts about the format of the emails that I was working on in #29?
(Aside: I looked at the email that I got from d.o notifying me of your comment in #37 and frankly, it was terrible, I had to scan it multiple times to see where your comment began. We can, and should, do better!)
Comment #40
drummUpdating the issue has been on the same page as viewing this issue for some time. I went ahead and removed that link to simplify the email a tiny bit.
I plan to deploy this next time we need to update project_issue module on Drupal.org.
Comment #41
hestenetMerging issue summary and proposed resolution status with suggestions from @andy-blum who posted in them in #3200239: Make system emails more legible with HTML emails
Comment #42
hestenet