Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I propose the following changes in order to accomodate small screen mail clients which have become so popular since we last designed project_issue mail.
- Improve scanning of Subjects by not prepending with [Project] [Component]. Instead, put that information in the Body or put it in a custom email header. If desired, drupal.org could also change its Reply-to address to noreply+[project-short-name] with no code change. Just trying to make it possible for folks to keep filter rules.
- Don't send the whole follow-up history in every email. Thats already implemented by acrollet's patch at #15380-25: Allow to configure content of issue notification e-mails
- Move to the bottom the standard body text which gives links for 'Issue status update for 'Issue status update for
' and 'Post a follow up' . Those are handy links, but obstruct the 'mini-preview' that these mail clients all do.
I'll work on this if I can get some consensus. I would think that these could be controlled by prefs to sites can choose behavior.
Comment | File | Size | Author |
---|---|---|---|
#11 | 0001-Mobile-phone-friendly-emails.-Can-be-turned-on-at-us.patch | 11.53 KB | moshe weitzman |
#9 | 0001-Mobile-phone-friendly-emails.-Can-be-turned-on-at-us.patch | 10.87 KB | moshe weitzman |
#7 | mobile.patch | 10.98 KB | moshe weitzman |
#4 | brief.patch | 11.12 KB | moshe weitzman |
Comments
Comment #1
sunHm. My Drupal work heavily (totally) depends on the current issue notification mails. And I have to disagree with the major points 1. + 2., so I'd kindly ask this to become an optional "Send issue notifications as digest" checkbox in the issue subscription settings or your user profile, or something.
Don't really want to get into details, because all of this really depends on how you are using and working with these mails (if you do at all), but anyway, here's my point of view:
1) Dropping the component might be acceptable, but the project is key to be able to work with these notifications, without having to setup giant incoming mail filter rules. I don't have any filter rules, just one giant drop box for all issue notifications, that's it.
2) I'm very very often reading cross-references or second to last replies in the notification mails, especially when follow-ups refer to comment #123 and because the mails luckily contain those counters as well. That's a huge speed factor for me, as I don't necessarily have to visit an issue. I can quickly read more insight, compare to existing, delete the mail and think about the issue + insights later on.
3) I don't really care for. If I'm clicking a link, then it's only the very first link to the issue. More than once I wished there were links to user profiles of comment authors. Don't think that I ever clicked on one of the jump links for each comment.
Comment #2
moshe weitzman CreditAttribution: moshe weitzman commentedYeah, I think users would have a choice of verbose mode (the current format) or a new terse format. We can default to verbose.
Comment #3
moshe weitzman CreditAttribution: moshe weitzman commenteddww gave this a provisional green light so i have started work here. so far, i had a smooth experience installing the drupalorg_testing profile. nice!
Comment #4
moshe weitzman CreditAttribution: moshe weitzman commentedNot too much code changed :)
I added a project_issue_users table in order to store the user's pref for mail length. A new project_issue_user manages the form and crud for this table. Users without a row in this table are assumed to want verbose emails (i.e. existing behavior is preserved).
Brief emails shorten the Subject, move the bookkeeping info to the bottom of the body (issue links and metadata list) and omit the follow-up history. Brief users can still filter on List-Id header if they wish (Gmail/Opera/Thunderbird at minimum have built-in support for this header).
The caching of email body output now takes into account the brief/verbose preference. I consolidated into a single $cache static variable.
Comment #5
sunShouldn't 'users' be singular?
We should also add foreign key info here.
Do we permanently need this info? At the very least, we can skip the query for anonymous users.
I think we can rename the title to "E-mail notification format" and replace both option labels with the corresponding part of the description; dropping the description entirely.
? :)
I think we should put $link and $body into separate 'body' array keys.
There are plenty of coding style issues in this patch - didn't comment on these, since they are pretty obvious.
Powered by Dreditor.
Comment #6
moshe weitzman CreditAttribution: moshe weitzman commentedusers is the name of the table in both d6 and d7 so i think plural is right.
not sure know what you mean by foreign key info. we already document that this is an FK to users.uid in the description of the column.
other items implemented as suggested. fixed code style as well. thx for the review.
FYI, i enabled the maillog module to help test this. Its easier (for me) than involving my mail client. I also have two users subscribed to 'All issues' in same project. One has brief pref and other verbose.
Comment #7
moshe weitzman CreditAttribution: moshe weitzman commentedgrr. here is attachment.
Comment #8
dwwSorry, been too long since this was rolled...
Comment #9
moshe weitzman CreditAttribution: moshe weitzman commentedRerolled
Comment #10
dwwExcellent, thanks! Looking pretty good. Haven't tested yet, but just from looking at the code, here's what I see so far:
A) This isn't going to fly:
A much better approach can be found, for example, in project_issue_project_maintainer_save():
B) Yeah, in project_issue.install, this description is close, but should start with "Foreign key:"
C) I don't entirely understand in project_issue_user() when loading why you set $user->project_issue_mail_length to NULL when not defined instead of the default. Can you explain? Seems like a bug, especially given this:
D) Whitespace bugs in _project_issue_mail()
E) I believe if you use /// here instead of just // then it's recognized by PHPDoc:
F) [style preference, not a bug]:
If it's really big and crazy complicated, splitting these can make sense, but for trivial queries like this, I don't think this buys us any readability (and is a tiny performance cost) instead of just doing this:
Also, since we use ' to enclose strings inside the queries, the standard is to always use " to quote the string for the query itself so you never accidentally break something...
I'll try to test now, more news if I find anything else. ;)
Thanks again!
-Derek
Comment #11
moshe weitzman CreditAttribution: moshe weitzman commentedFixed all issues from #10.
Comment #12
dwwUpon further thought, and looking at this more closely wearing my d.o UX hat, this isn't going to work in its current form. But it's a great start. I've already mostly fixed it. But, I'm going to finish this up over at #15380-33: Allow to configure content of issue notification e-mails, since that's really exactly what we're talking about here. See also #199178: Usability: Re-order contents of project issue emails for the other part of this.
@Moshe: I know this has been bothering you for at least 3 years, and you've been very patient and helpful on this. So, I'm hereby promising I'm going to finish this up (I'm not asking you to re-roll) tomorrow at the sprint and deploy it. I've already got good feedback from yoroy about the UX stuff. Fear not, this is going to happen! :)
Thanks,
-Derek
Comment #13
moshe weitzman CreditAttribution: moshe weitzman commentedApparently points 1 and 3 from the Summary are now better pursued at #199178: Usability: Re-order contents of project issue emails