Opened on 03/20/2015 at 05:38:21 PM

Closed on 05/27/2015 at 11:52:09 AM

Last modified on 07/24/2015 at 04:27:38 AM

#2192 closed change (fixed)

Add notification opt-out mechanism

Reported by: greiner Assignee: greiner
Priority: P2 Milestone: Adblock-Plus-2.6.10-for-Firefox
Module: Core Keywords:
Cc: trev Blocked By:
Blocking: #2191, #2193, #2195, #2237 Platform: Unknown
Ready: yes Confidential: no
Tester: Ross Verified working: no
Review URL(s):

http://codereview.adblockplus.org/5270660880269312/

Description (last modified by trev)

Background

We want to provide a way to opt-out of notifications.

What to change

  • Add a preference "notifications_showui" as a boolean value with a default value of false.
  • Add a preference "notifications_ignoredcategories" as an array containing the categories of notifications that the user opted-out of.
  • Expose a function in lib/Notification.js for toggling (i.e. adding/removing) categories in the list.
  • Set Prefs.notifications_showui to true when a category is added to the list.
  • Ignore all notifications in Notification.getNextToShow() (except those of type "critical") if Prefs.notifications_ignoredcategories contains "*". Additionally, ignore a notification if its category is listed in Prefs.notifications_ignoredcategories.

Attachments (0)

Change History (13)

comment:1 Changed on 03/20/2015 at 07:02:11 PM by greiner

  • Blocked By 2195 added

comment:2 Changed on 03/20/2015 at 07:03:27 PM by greiner

  • Blocking 2193 added

comment:3 Changed on 03/20/2015 at 07:07:32 PM by greiner

  • Blocked By 2195 removed
  • Blocking 2195 added

comment:4 Changed on 03/25/2015 at 06:21:21 PM by greiner

  • Description modified (diff)
  • Verified working unset

comment:5 Changed on 03/27/2015 at 04:19:57 PM by greiner

  • Owner set to greiner

comment:6 Changed on 03/30/2015 at 04:42:22 PM by greiner

  • Blocking 2237 added

comment:7 follow-up: Changed on 04/01/2015 at 04:54:05 PM by trev

  • Cc trev added

I don't understand the purpose of the notifications_showcheckbox preference. According to #2193 it is meant to toggle the notifications UI under Options. Shouldn't that UI generally be visible whenever notifications_ignorecategories is non-empty?

comment:8 in reply to: ↑ 7 Changed on 04/01/2015 at 05:56:52 PM by greiner

Replying to trev:

I don't understand the purpose of the notifications_showcheckbox preference. According to #2193 it is meant to toggle the notifications UI under Options. Shouldn't that UI generally be visible whenever notifications_ignorecategories is non-empty?

Not necessarily because that would mean that the option will disappear as soon as you click on it to opt-in again with no way to revert your action (except waiting for the next notification to show up).

Besides that, the assumption is that a user who found the menu item expects it to be there again in the future, no matter how often he/she used it or not. If that's not the case I'd consider it to be a bad user experience. We can, of course, involve Sven here, if you want.

comment:9 Changed on 04/10/2015 at 09:54:49 PM by trev

  • Description modified (diff)
  • Ready set

Fair enough. I changed the preference names, and renamed the catch-all category into "*".

comment:10 Changed on 04/13/2015 at 04:10:53 PM by greiner

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:11 Changed on 05/27/2015 at 11:52:09 AM by greiner

  • Milestone set to Adblock-Plus-for-Firefox-next
  • Resolution set to fixed
  • Status changed from reviewing to closed

comment:12 Changed on 07/23/2015 at 07:42:02 AM by Ross

  • Tester set to Ross

I've been testing this (+ related tickets) and it appears to be working correctly as described in Chrome and Opera so far. Will be checking Safari and Firefox today.

comment:13 Changed on 07/24/2015 at 04:27:38 AM by Ross

Add a preference "notifications_showui" as a boolean value with a default value of false.

Done.

Add a preference "notifications_ignoredcategories" as an array containing the categories of notifications that the user opted-out of.

Done.

Expose a function in lib/Notification.js for toggling (i.e. adding/removing) categories in the list.

Done

Set Prefs.notifications_showui to true when a category is added to the list.

Done / Working.

Ignore all notifications in Notification.getNextToShow() (except those of type "critical") if Prefs.notifications_ignoredcategories contains "*".

Done / Working.

Additionally, ignore a notification if its category is listed in Prefs.notifications_ignoredcategories.

I'm not sure how this is supposed to work as if you add a category = foo to a notification it is not included in the response to /notification.json. Preperation for a category key later?

ABP 2.6.9.3966 / Firefox 39.0 / Windows 7 x64

Add Comment

Modify Ticket

Change Properties
Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from greiner.
 
Note: See TracTickets for help on using tickets.