Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Brave News can suggest the current site to subscribe to #23778

Closed
1 task
petemill opened this issue Jun 29, 2022 · 6 comments · Fixed by brave/brave-core#14077
Closed
1 task

Brave News can suggest the current site to subscribe to #23778

petemill opened this issue Jun 29, 2022 · 6 comments · Fixed by brave/brave-core#14077

Comments

@petemill
Copy link
Member

petemill commented Jun 29, 2022

When the Brave News is opted-in and enabled, we can do the following:

For any given Tab, if we detect a corresponding Publisher to subscribe to, we can offer the user to add the subscription.

This could look like a Location Bar button with the brave news icon. When clicked it would show a list of the available feeds (which would usually only be 1).

Sources of Publisher items for a Tab:

  • sources.json via brave_news.mojom:GetPublishers() (see note below re: site_url)
  • meta tags in the html with feed destinations

Implementation:

  • Probably a TabHelper which performs the necessary Publisher look ups when the WebContents' Url is committed.
  • Maybe an addition to BraveNewsController for a performant lookup of an existing Publisher.
  • Addition to publisher_parsing to include the site_url (and possibly feed_url) fields in sources.json
  • Uses RssLinkReader to get the feed url from the html.
  • Uses SetPublisherPref to subscribe (or unsubscribe)

Design:
TBD

Rough design:

----------------------------------------
Subscribe to this site via Brave News

--------------
[Name of feed]    ( Subscribe )
--------------
[Name of alternate feed]    ( Subscribe )
-----------------------------------------
(Don't show this again)

Location bar button (older design might not be the correct icon):
although I don't think it should be inside the brave actions area, i.e. it can just be a regular PageActionIcon
image

Maybe it shows expanded on first seeing it for each browser session (ignore the tooltip):
image

Outstanding questions

  • Should the button (and bubble popup) show if the user is already to subscribed to at least 1 of the feeds for the current page? It would allow users to unsubscribe.
@mattmcalister
Copy link

Instead of 1-click unsubscribe for a feed the user is already subscribed to, I think we should offer the ability to customize from here. So, the button should be an activated color (do we have one?) and maybe the copy in the bubble popup should say "Customize Brave News" and which opens up Settings.

@fallaciousreasoning
Copy link

fallaciousreasoning commented Jul 19, 2022

I feel like it would be a bit weird if we let people subscribe from the dialog but not unsubscribe. Like, what if a user clicks subscribe to see what happens, but there's no obvious way to undo it?

This is what my rough prototype looks like. It's not uncommon for sites to have multiple feeds on a single page.
Screenshot from 2022-07-14 12-46-03

That said, I don't have strong feelings about it, and I'm happy to defer to you on this 😄

@mattmcalister
Copy link

If we're using a toggle ux then, yes, I'd agree. I thought it was just a "Add to Brave News" button or something like that in which case I would think you would want it to say "You follow [Feed Name] in Brave News. You can customize your feed selections any time in Settings." Maybe that doesn't work as well with multiple feeds. I don't feel strongly about it, either. It will become more obvious when we start testing, I'm sure.

@brave-builds brave-builds added this to the 1.44.x - Nightly milestone Aug 8, 2022
@stephendonner stephendonner added the QA/In-Progress Indicates that QA is currently in progress for that particular issue label Sep 2, 2022
@stephendonner
Copy link

stephendonner commented Sep 2, 2022

Verification PASSED using

Brave 1.44.73 Chromium: 105.0.5195.68 (Official Build) beta (x86_64)
Revision ad13e82529051bac6a0e65f455e6d7a1e5fd7938-refs/branch-heads/5195@{#903}
OS macOS Version 13.0 (Build 22A5331f)

Shared Steps:

  1. install 1.44.73
  2. launch Brave
  3. open brave://flags/
  4. set Enable Brave News Subscribe Button to Enabled
  5. click Relaunch

Subscribe - PASSED

via Manage Subscriptions icon - PASSED

  1. load planet.mozilla.org
  2. click on the Manage Subscriptions icon in the browser URL bar
  3. click on Subscribe
  4. confirm the button changes to Unsubscribe
  5. open a new-tab page
  6. click on Customize on the bottom right
  7. click on Brave News
  8. confirmed Planet Mozilla title and URL (as titletip) https://planet.mozilla.org/atom.xml
step 2 Loading... step 4 step 6 step 7 step 8
Screenshot 2022-09-02 at 5 29 56 PM Screenshot 2022-09-02 at 5 35 54 PM Screenshot 2022-09-02 at 5 30 02 PM Screenshot 2022-09-02 at 5 46 05 PM Screenshot 2022-09-02 at 5 46 11 PM Screenshot 2022-09-02 at 5 47 40 PM

via Customize -> Brave News dialog - PASSED

  1. open a new-tab page
  2. click on Customize
  3. click on Brave News
  4. enter https://planet.mozilla.org/atom.xml into Feed URL and click Add source
  5. load planet.mozilla.org
  6. click on the Manage Subscriptions icon
  7. confirm it says Planet Mozilla, and the button reads Unsubscribe
  8. open a new-tab page and click on Show Brave News
  9. scroll down and confirm Hello from the new developer advocate (or any feed) post in Brave News feed
step 4 step 6 + 7 step 8 step 9
Screenshot 2022-09-02 at 6 11 46 PM Screenshot 2022-09-02 at 6 05 32 PM Screenshot 2022-09-02 at 6 31 10 PM Screenshot 2022-09-02 at 6 08 53 PM

Unsubscribe - PASSED

via Manage Subscriptions icon - PASSED

(continuing on from Subscribe tests, above)

  1. load planet.mozilla.org
  2. click on the Manage Subscriptions icon
  3. click on Unsubscribe
  4. confirm the button changes to Subscribe
  5. on a new-tab page, click on Customize
  6. click Brave News
  7. confirm the Planet Mozilla entry is removed
step 3 step 4 step 7
Screenshot 2022-09-02 at 11 19 41 PM Screenshot 2022-09-02 at 11 20 01 PM Screenshot 2022-09-02 at 11 20 13 PM

via Customize -> Brave News dialog - PASSED

  1. load a new-tab page
  2. click on Customize
  3. click on Brave News
  4. click on the ... ellipsis to the right of Planet Mozilla
  5. click Remove
  6. click the X to dismiss the Customize Dashboard panel
  7. load planet.mozilla.org
  8. click on the Manage Subscriptions icon
  9. confirm you see Planet Mozilla and then a Subscribe button
step 5 step 6 step 9
Screenshot 2022-09-02 at 11 29 34 PM Screenshot 2022-09-02 at 11 29 56 PM Screenshot 2022-09-02 at 11 31 21 PM

Hide and don't show this again - PASSED

(run either of the Subscribe tests, first)

  1. load planet.mozilla.org
  2. click on the Manage Subscriptions icon
  3. click Hide and don't show this again
  4. confirm the icon disappears
  5. in a new-tab page, confirm Show Brave News button in the toolbar is Disabled / Off
  6. restart Brave
  7. load planet.mozilla.org
  8. confirm there's no Manage Subscriptions icon in the URL bar
step 3 step 4 step 5 step 8
Screenshot 2022-09-02 at 11 50 41 PM Screenshot 2022-09-02 at 11 50 49 PM Screenshot 2022-09-02 at 11 51 07 PM Screenshot 2022-09-02 at 11 51 21 PM

UI - PASSED

Show Brave News button in the toolbar - PASSED

  1. load planet.mozilla.org
  2. confirm the Manage Subscriptions icon appears, but don't click it
  3. open a new-tab page
  4. click on Customize
  5. click on Brave News
  6. confirm that Show Brave News button in the toolbar is Enabled / On
  7. toggle it to Disabled / Off
  8. return to the planet.mozilla.org tab
  9. confirm the Manage Subscriptions icon disappears
step 2 step 6 step 7 step 9
Screenshot 2022-09-02 at 11 57 50 PM Screenshot 2022-09-02 at 11 58 09 PM Screenshot 2022-09-02 at 11 58 19 PM Screenshot 2022-09-02 at 11 58 24 PM

Dark + Light modes - PASSED

Dark

unsubscribed subscribed
Screenshot 2022-09-02 at 5 50 39 PM Screenshot 2022-09-02 at 5 50 21 PM

Light

unsubscribed subscribed
Screenshot 2022-09-02 at 5 49 06 PM Screenshot 2022-09-02 at 5 49 17 PM

Tooltip

Manage Subscriptions

Screenshot 2022-09-02 at 10 09 03 PM

@stephendonner stephendonner added QA Pass-macOS and removed QA/In-Progress Indicates that QA is currently in progress for that particular issue labels Sep 3, 2022
@MadhaviSeelam
Copy link

MadhaviSeelam commented Sep 14, 2022

Verification PASSED using

Brave | 1.44.83 Chromium: 105.0.5195.102 (Official Build) beta (64-bit)
-- | --
Revision | 4c16f5ffcc2da70ee2600d5db77bed423ac03a5a-refs/branch-heads/5195_55@{#4}
OS | Windows 11 Version 21H2 (Build 22000.856)

Shared Steps:

  1. install 1.44.83
  2. launch Brave
  3. open brave://flags/
  4. set (#brave-news-subscribe-button) Enable Brave News Subscribe Button to Enabled
  5. click Relaunch
step 2

Subscribe - PASSED

via Manage Subscriptions icon - PASSED

  1. load theatlantic.com
  2. click on the Manage Subscriptions icon in the browser URL bar
  3. click on Subscribe
  4. confirm the button changes to Unsubscribe
  5. open a new-tab page
  6. click on Customize on the bottom right
  7. click on Brave News
  8. confirmed The Atlantic title and URL (as titletip) https://www.atlantic.com/feed/all
step 2 step 3 Loading... step 4 step 6 step 7 step 8
step 2 loading step 2 step 2 step 2 step 2 step 2

via Customize -> Brave News dialog - PASSED

  1. open a new-tab page
  2. click on Customize
  3. click on Brave News
  4. enter https://www.theguardian.com/us into Feed URL and click Add source
  5. confirmed publisher added to the customized dashboard in the Brave news section
  6. load theguardian.com
  7. click on the Manage Subscriptions icon
  8. confirm it says The Guardian, and the button reads Unsubscribe
  9. open a new-tab page and click on Show Brave News
  10. scroll down and confirm a post from The Guardian (Hong Kong residents queue..) in Brave News feed
step 2-3 step 4 step 5 step 6 + 7 step 8 step 9 step 10
step 2 step 2 step 2 step 2 step 2 step 2 step 2

Unsubscribe - PASSED

via Manage Subscriptions icon - PASSED

  1. continuing from Manage Subscriptions icon - Step 8
  2. load/return to theatlantic.com tab
  3. click on the Manage Subscriptions icon
  4. click on Unsubscribe
  5. confirm the button changes to Subscribe
  6. on a new-tab page, click on Customize
  7. click Brave News
  8. confirm the The Atlantic entry is removed
step 1 step 4 step 5 step 8
step 1 step 4 step 5 step 6

via Customize -> Brave News dialog - PASSED

  1. continuing from Subscribe tests - Customize -> Brave News dialog Step 5
  2. load a new-tab page
  3. click on Customize
  4. click on Brave News
  5. click on the ... ellipsis to the right of The Guardian
  6. click Remove
  7. click the X to dismiss the Customize Dashboard panel
  8. load theguardian.com
  9. click on the Manage Subscriptions icon
  10. confirm you see The Guardian and then a Subscribe button
step 5 step 6 step 10
step 1 step 1 step 1

Hide and don't show this again - PASSED

(run either of the Subscribe tests, first)

  1. load https://theguardian.com
  2. click on the Manage Subscriptions icon
  3. click Hide and don't show this again
  4. confirm the icon disappears
  5. in a new-tab page, confirm Show Brave News button in the toolbar is Disabled / Off
  6. restart Brave
  7. re-loaded https://theguardian.com
  8. confirm there's no Manage Subscriptions icon in the URL bar
step 3 step 4 step 5 step 8
step 1 step 1 step 1 step 1

UI - PASSED

Show Brave News button in the toolbar - PASSED

  1. new profile
  2. load https://theguardian.com
  3. confirm the Manage Subscriptions icon appears, but don't click it
  4. open a new-tab page
  5. click on Customize
  6. click on Brave News
  7. confirm that Show Brave News button in the toolbar is Enabled / On
  8. toggle it to Disabled / Off
  9. return to the https://theguardian.com tab
  10. confirm the Manage Subscriptions icon disappears
step 2 step 7 step 8 step 9
step 1 step 1 step 1 step 1

Manage Subscription tooltip - PASSED

dark light
step 1 step 1

Unsubscribe - PASSED

dark light
step 1 step 1

Subscribed - PASSED

dark light
step 1 step 1

New Browser Window - Subscribe/Unsubscribe functionality - PASSED

  1. New profile
  2. visit https://theguardian.com
  3. open brave://flags/
  4. set (#brave-news-subscribe-button) Enable Brave News Subscribe Button to Enabled
  5. click Relaunch
  6. go to hamburger menu>>click New Window
  7. visit https://theatlantic.com
  8. confirmed Manage subscription icon displayed as expected
  9. confirmed above subscribe and unsubscribe tests passed as expected
Ex1 Ex2 Ex3 Ex4 Ex5
step 1 step 1 step 1 step 1 step 1

Upgrade -Subscribe/Unsubscribe functionality- PASSED

  1. Installed 1.43.89
  2. launch Brave
  3. visit https://theguardian.com
  4. close the browser
  5. rename profile folder Brave Browser - Beta
  6. launch with 1.44.83
  7. open brave://flags/
  8. set (#brave-news-subscribe-button) Enable Brave News Subscribe Button to Enabled
  9. click Relaunch
  10. return https://theguardian.com tab
  11. confirmed Manage subscription icon displayed as expected
  12. confirmed above subscribe and unsubscribe tests passed as expected.
Step 1-2 step 6 step7-9 step10-11 step 12
step 1 step 1 step 1 step 1 step 1

Bugs Filed:

@MadhaviSeelam
Copy link

MadhaviSeelam commented Sep 19, 2022

Verification PASSED using

Brave 1.44.92 Chromium: 105.0.5195.136 (Official Build) beta (64-bit)
Revision 872774b783d0e674186a3adcd2f92e7aa22a219c-refs/branch-heads/5195_124@{#4}
OS Linux

Shared Steps:

  1. install 1.44.92
  2. launch Brave
  3. open brave://flags/
  4. set (#brave-news-subscribe-button) Enable Brave News Subscribe Button to Enabled
  5. click Relaunch
step2

Subscribe - PASSED

via Manage Subscriptions icon - PASSED

  1. load theatlantic.com
  2. click on the Manage Subscriptions icon in the browser URL bar
  3. click on Subscribe
  4. confirm the button changes to Unsubscribe
  5. open a new-tab page
  6. click on Customize on the bottom right
  7. click on Brave News
  8. confirmed The Atlantic title and URL (as titletip) https://www.atlantic.com/feed/all
step 2 step 3 Loading... step 4 step 6 step 7 step 8
step2 step2 Loading.. step3 step4 step6 step8

via Customize -> Brave News dialog - PASSED

  1. open a new-tab page
  2. click on Customize
  3. click on Brave News
  4. enter https://www.theguardian.com/us into Feed URL and click Add source
  5. confirmed publisher added to the customized dashboard in the Brave news section
  6. load theguardian.com
  7. click on the Manage Subscriptions icon
  8. confirm it says The Guardian, and the button reads Unsubscribe
  9. open a new-tab page and click on Show Brave News
  10. scroll down and confirm a post from The Guardian (Hong Kong residents queue..) in Brave News feed
step 2-3 step 4 step 5 step 6 - 7 step 8 step 10
step2 step2 step2 step2 step2 step2

Unsubscribe - PASSED

via Manage Subscriptions icon - PASSED

  1. continuing from Manage Subscriptions icon - Step 8
  2. load/return to theatlantic.com tab
  3. click on the Manage Subscriptions icon
  4. click on Unsubscribe
  5. confirm the button changes to Subscribe
  6. on a new-tab page, click on Customize
  7. click Brave News
  8. confirm the The Atlantic entry is removed
step 1 step 4 step 5 step 8
step2 step2 step2 step2

via Customize -> Brave News dialog - PASSED

  1. continuing from Subscribe tests - Customize -> Brave News dialog Step 5
  2. load a new-tab page
  3. click on Customize
  4. click on Brave News
  5. click on the ... ellipsis to the right of The Guardian
  6. click Remove
  7. click the X to dismiss the Customize Dashboard panel
  8. load theguardian.com
  9. click on the Manage Subscriptions icon
  10. confirm you see The Guardian and then a Subscribe button
step 5 step 6 step 10
step2 step2 step2

Hide and don't show this again - PASSED

(run either of the Subscribe tests, first)

  1. load https://theguardian.com
  2. click on the Manage Subscriptions icon
  3. click Hide and don't show this again
  4. confirm the icon disappears
  5. in a new-tab page, confirm Show Brave News button in the toolbar is Disabled / Off
  6. restart Brave
  7. re-loaded https://theguardian.com
  8. confirm there's no Manage Subscriptions icon in the URL bar
step 3 step 4 step 5 step 8
step2 step2 step2 step2

UI - PASSED

Manage Subscription tooltip

light dark
step2 step2

Show Brave News button in the toolbar - PASSED

  1. new profile
  2. load https://theguardian.com
  3. confirm the Manage Subscriptions icon appears, but don't click it
  4. open a new-tab page
  5. click on Customize
  6. click on Brave News
  7. confirm that Show Brave News button in the toolbar is Enabled / On
  8. toggle it to Disabled / Off
  9. return to the https://theguardian.com tab
  10. confirm the Manage Subscriptions icon disappears
step 3 step 7 step 8 step 9-10
step2 step2 step2 step2

Unsubscribe - PASSED

dark light
step2 step2

Subscribed - PASSED

light dark
step2 step2

New Browser Window - Subscribe/Unsubscribe functionality - PASSED

  1. New profile
  2. open brave://flags/
  3. set (#brave-news-subscribe-button) Enable Brave News Subscribe Button to Enabled
  4. click Relaunch
  5. go to hamburger menu>>click New Window
  6. visit https://theatlantic.com
  7. confirmed Manage subscription icon displayed as expected
  8. confirmed above subscribe and unsubscribe tests passed as expected.
Ex1 Ex2 Ex3 Ex4 Ex5
step2 step2 step2 step2 step2

Upgrade -Subscribe/Unsubscribe functionality- PASSED

  1. Installed 1.43.89
  2. launch Brave
  3. visit https://theguardian.com
  4. close the browser
  5. rename profile folder Brave Browser - Beta
  6. launch with 1.44.92
  7. open brave://flags/
  8. set (#brave-news-subscribe-button) Enable Brave News Subscribe Button to Enabled
  9. click Relaunch
  10. return https://theguardian.com tab
  11. confirmed Manage subscription icon displayed as expected
  12. confirmed above subscribe and unsubscribe tests passed as expected.
Step 1-2 step 3 step 6 step7-9 step 10 step11 step 12
step2 step2 step2 step2 step2 step2 step2

Bugs Encountered:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment