Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Add new "Auto-suggest" sites preference (payments tab) #6261

Closed
5 tasks done
mrose17 opened this issue Dec 16, 2016 · 3 comments
Closed
5 tasks done

Add new "Auto-suggest" sites preference (payments tab) #6261

mrose17 opened this issue Dec 16, 2016 · 3 comments

Comments

@mrose17
Copy link
Member

mrose17 commented Dec 16, 2016

Goals

  • Give users a toggle for auto-suggest sites

    • Only affects sites going forward (existing site settings are not changed)
    • When true, behavior matches current behavior
    • When false, it will exclude by default
  • If "auto suggest sites" is disabled, let's add a little BTC icon to the right of the address bar allowing users to click to say "include this publisher for payments"

Additional info

A "permanently hide" button introduced with #6101
(this is approved but not merged- you can cherry pick the commits into the exclude-by-default branch in the meantime)

Tasks

  • only show included sites (preferences). This is something we can test without adding any new code (not counting the code for the button). Users can already include/exclude
  • add a new option for auto suggest sites
  • add a new control in the URL bar control; only shown if auto suggest is false AND permanently hide is false
  • if brave payments is NOT enabled and the button is clicked, enable it 🙂
  • control should light up orange if publisher included, gray if not (and be clickable to toggle)

Default values for the two new settings

  • Only show included sites - default to false
  • Auto suggest sites - default to true

Screenshots (mockup)

image

same UI showing mockup for flipped switches:
image

New URL bar button provides a convenient "remote control" for toggling site contributions.

site contributions off: (exclude state)
image

site contributions on: (include state)
image

@mrose17 mrose17 added this to the 0.13.1 milestone Dec 16, 2016
@mrose17 mrose17 self-assigned this Dec 16, 2016
@bsclifton bsclifton changed the title Add advanced option "exclude-by-default" Add new "Auto-suggest" sites preference (payments tab) Dec 19, 2016
@luixxiul
Copy link
Contributor

I'd like to implement the button and the switches on the UI if it is ok

@mrose17 mrose17 removed their assignment Dec 20, 2016
@cezaraugusto
Copy link
Contributor

@luixxiul appreciate your help. We'll be using exclude-by-default branch for those changes, thanks.

@bsclifton
Copy link
Member

bsclifton commented Jan 13, 2017

Fixed with #6633 which was merged into branch 0.13.1-branch (which is 0.13.2).

Manual tests:

Case 1 (Publisher exists and is disabled)

  • Go to about:preferences -> Payments. Enable Payments and disable "auto-suggest sites" and "only show included sites" options;
  • Have at least two publishers on Payments. Ensure one of them is enabled;
  • Go to enabled publisher URL. Url bar should have an orange BitCoin button right after;
  • Clicking the button should turn it gray;
  • Back to Publishers panel, publisher should now be disabled;

Case 2 (Publisher exists and is enabled)

  • Same steps as the above;
  • Clicking the orange button should turn it gray;
  • Back to Publishers panel, publisher should now be enabled;

Case 3 (Publisher doesn't exist yet)

  • Go to a new publisher URL.
  • Spend enough time and visits to ensure Publisher can be on Payments list
  • On Publishers list, the newest publisher should be disabled;
  • Go back to newest publisher Url. Hit the BitCoin button. It should be orange;
  • Go to Publishers list again, publisher should be enabled;

Edge Case 1 (User has both "auto-suggest sites" and "only show included sites" options enabled)

  • Enable both "auto-suggest sites" and "only show incuded sites" options on Payments;
  • Go to a publisher url. BitCoin icon should not be visible;

Edge Case 2 (User has Payments disabled)

  • Disable "auto-suggest sites" and "only show included sites" options;
  • Disable Payments;
  • Go to a Publisher url, hit BitCoin icon;
  • Payments should be enabled

bsclifton pushed a commit that referenced this issue Jan 14, 2017
bsclifton pushed a commit that referenced this issue Jan 17, 2017
bsclifton pushed a commit that referenced this issue Jan 17, 2017
bsclifton pushed a commit that referenced this issue Jan 18, 2017
bsclifton pushed a commit that referenced this issue Jan 20, 2017
NejcZdovc pushed a commit to NejcZdovc/browser-laptop that referenced this issue Jan 23, 2017
bsclifton pushed a commit that referenced this issue Jan 23, 2017
bsclifton pushed a commit that referenced this issue Jan 24, 2017
bsclifton pushed a commit that referenced this issue Jan 25, 2017
bsclifton pushed a commit that referenced this issue Jan 25, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.