Users should have the ability to follow content without receiving email notifications.

Project Issue does this at the Notifications tab of your user profile. I think we can do something similar, and more simple to start out. Maybe a checkbox for each content type.

(A longer-term goal is to remove much of Project Issue's emailing code and rely on Message Follow. This form can be altered by Project Issue for advanced project-specific option as needed.)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

drumm created an issue. See original summary.

Chasen’s picture

Just to add some feedback in addition to being able to control whether email notifications are on or off, for those who want it on an option that lets them choose between receiving email notifications for each new comment; once per day summary notification; and once per week summary notification.

I envisage the summary notifications would be grouped, i.e. if you follow 3 threads and all 3 are set to summary once per day you get just one email for all 3.

Jaypan’s picture

1) There should be an option in the user profile to opt out of email notifications
2) If you unfollow a thread to stop emails, you no longer see the thread in your tracker. There should be the option to not receive emails, but still see the thread in your tracker.

Implementing #1 would solve #2.

Jaypan’s picture

Cross referencing this issue with the thread I put in the notifications section of the forum: https://www.drupal.org/node/2658618

drumm’s picture

Assigned: Unassigned » drumm
drumm’s picture

Screenshot

Here is the minimum UI for this. I expect more to be added as the "Issue notifications" tab is merged in, and any more-interesting content types get added in. (What does following a project mean? Same as following all the issues for it?)

Jaypan’s picture

That looks ok, but language-wise it's not so good. It should be:

Receive notifications of comments when following threads of the following content types:
- book page
- case study
- forum topic
- post

And what's a post?

tvn’s picture

I think we need to provide some more context on what happens in case user unchecks stuff. And let's not repeat the same sentence 4 times.

So something like:

All content you follow is added to your tracker ('Your posts' tab), where you can see notifications for new comments.

To receive email notifications for new comments select the content types below:
- Book page
- Case study
- Forum topic
- Post

The 'to receive email notifications..' line could use 'additionally' or similar word to make it clear that notifications in the tracker are always there, irrespective of any email notifications selected.

drumm’s picture

FileSize
60.85 KB

Here is an update with the help text. On production, this will have the question mark icon matching other help boxes.

Screenshot

(The help is Drupal.org-specific, this module doesn't update the tracker on its own, that's still flag_tracker module. So we are free to be specific about the site.)

I agree the checkboxes are kinda klunky and redundant. I went with those and the larger headings so more can be added to the form, like issue-specific things.

Jaypan - post is a relatively new content type, https://www.drupal.org/drupalorg/blog are posts. This uses the same content type titles as used on /node/add.

drumm’s picture

I went ahead and made the suggested simplification, with some copyediting:

Screenshot

This is what I initially thought of too, and I realized making room for future UI was too much pre-optimization.

On the dev site I'm working on, the UI is now functional for itself. The remaining part is checking this with a hook invoked by the message stack to actually have an effect.

hestenet’s picture

"I want to receive email notifications of comments on content I follow in each of these content types:"

^^ Copy suggestion? What you have is fine, just thought I'd take a stab at it. It's kind of an awkward mouthful either way .

  • drumm committed 40b91bf on
    Issue #2658224: Add a UI for controlling email notifications
    

  • drumm committed d554ea9 on
    Issue #2658224: Add a UI for controlling email notifications,...
drumm’s picture

Status: Active » Needs review

Receive email notifications for comments on content I follow, in these content types

Is where I've gotten with the copyediting so far.

Otherwise, this is functional and ready for deployment.

bradleyfields’s picture

What about the following?

Content you follow is added to Your Posts, where you can read new comments and updates.

You can also get email notifications about comments on content you follow. Choose which content type (or types) you'd like to be notified about.

Also, we may have a nomenclature challenge: "Post" as a content type vs. the broader "post" that describes actions.

tvn’s picture

FileSize
107.32 KB

Thanks for simplifying Neil.

I like Bradley's addition to provide more context. We need to remember however that text in the blue area is custom to Drupal.org, and text outside of it will be part of Message follow UI, so has to stay fairly generic. We also should not duplicate words in the two, or try to over explain. Here is the revision I suggest:

  • I kept 'see new comments' versus 'read' because users will have to click on the link and read the actual comment on the content page itself.
  • Added one more line of text in the blue area to provide better context.
  • Changed 'I follow' to 'you follow'. There are a couple of exceptions, but in most of the cases our UI around user profiles is written in 'you/your' format, versus "I this or that". I think we need to stick to one of the two approaches.
  • Removed 'in these content types' as I think the UI is self-explanatory enough without it. Ideally the labels would be plural, but this is probably good enough for now.
  • Changed button label to 'Save', to keep in line with the rest of the buttons we have everywhere in user profile form.

  • drumm committed 23f22bf on
    Issue #2658224: Add a UI for controlling email notifications,...

  • drumm committed 96238cc on
    Issue #2658224: Add a UI for controlling email notifications,...
drumm’s picture

Ideally the labels would be plural

I don't think Drupal stashes the plural version of content type names anywhere. I know our plurals of "Module" and "Theme" are done with custom code. We could add a word, like "Forum topic content" and "Post content"; I'm not sure if that helps.

All the other changes have been done (unless I missed any).

  • drumm committed 40b91bf on
    Issue #2658224: Add a UI for controlling email notifications
    
  • drumm committed d554ea9 on
    Issue #2658224: Add a UI for controlling email notifications,...
  • drumm committed 23f22bf on
    Issue #2658224: Add a UI for controlling email notifications,...
  • drumm committed 96238cc on
    Issue #2658224: Add a UI for controlling email notifications,...
drumm’s picture

Status: Needs review » Fixed
Issue tags: +needs drupal.org deployment
drumm’s picture

Issue tags: -needs drupal.org deployment

This has been deployed to Drupal.org.

Jaypan’s picture

I'm still getting email notifications even though I've unchecked each of the content types.

Jaypan’s picture

Status: Fixed » Needs work
drumm’s picture

I tested this again on dev and it looks okay. I'm pretty sure I forgot to restart the queue running processes, so they still have the old code in memory.

drumm’s picture

Status: Needs work » Fixed

Please update this issue if you receive any extra notifications after this comment was posted.

Jaypan’s picture

Looks to be fixed now. Thanks for taking care of this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

izmeez’s picture

I think this has caused a change in behaviour. As a regular user I noticed that when I started to follow a forum post I began receiving email notifications. On checking my profile I see the default is to receive email notifications for all. It was simple enough to change but I wonder if the defaults should be unchecked for email notifications?

Thanks.

Jaypan’s picture

No, it's better to notify by default, and let people turn it off. If it's off by default, most people will never know the functionality exists.