2fa-notifier icon indicating copy to clipboard operation
2fa-notifier copied to clipboard

Improve behavior of when notifications are shown

Open conorgil opened this issue 7 years ago • 3 comments

Currently, a notification is shown once per domain per browser session. The list of which domains have already been shown is only stored in memory, so restarting the browser will lose that info and start from scratch.

We should ask users for feedback on when to show notifications and then (likely) implement a few different options that users can configure.

Current ideas:

  • [x] Show the notification once per domain (save this in storage so it persists between browser sessions)
  • [x] If the user does NOT interact with the notification before it closes, then wait X time period and show the notification again when the domain is next loaded. For example, wait X days and then show it again.
  • Show the notification and require the user to interact with it in order to dismiss it. Provide options:
    • click the notification goes to the docs
    • close button closes the notification and reminds them in X time
    • button "I already setup 2FA on this site". Never remind them on this domain again.
  • Provide option to turn off the notifications entirely

conorgil avatar May 07 '18 22:05 conorgil

I propose that we start with the simplest options to implement.

Ideally, I would like start with 3 (or 2) options for the user:

  • Remind me once a month (default)
  • Remind me once a year
  • Never show me any popup notifications

In addition to the proposed options above, I believe that our current behavior works for now:

  • Display notification once per set time period
  • Dismiss notification after X time (whatever the time is currently set to)
  • Interacting with notification will dismiss it

I suggest we put the "I already setup 2FA for this site" option on the back burner for now.

designedbinary avatar May 22 '18 17:05 designedbinary

I think implementing most of those options will be basically the same amount of work. I'm going to give this some thought and attention this week and see what I come up with. Keep an eye out for a PR

conorgil avatar May 22 '18 17:05 conorgil

I looked into implementing buttons in the notification the other day and it turns out that functionality is only supported in Chrome. I want to have a consistent code base between Chrome and Firefox to reduce complexity and make testing and maintainability easier.

See https://github.com/Lusito/webextension-polyfill-ts/issues/5 for details.

Current idea is to put a button in the browser action popup page to allow someone to indicate that they already have 2FA on this site.

But first, update the extension to only show the notification once per site per day. That should drastically cut down on the notification noise that currently exists.

conorgil avatar Jun 11 '18 01:06 conorgil