question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Brave News can suggest the current site to subscribe to

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6

github_iconTop GitHub Comments

3reactions
fallaciousreasoningcommented, 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 😄

1reaction
stephendonnercommented, Sep 3, 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
Read more comments on GitHub >

github_iconTop Results From Across the Web

Brave News
Brave News creates a customizable, up-to-date news feed, curated from a list of sources you've selected. Hundreds of top publishers and RSS feeds,...
Read more >
Typo in `brave://flags` for `Enable Brave New Subscribe Button`
Expected result: Should read Enable Brave News Subscribe Button ... Brave News can suggest the current site to subscribe to #23778.
Read more >
Latest News on Brave Browser - Cointelegraph
The Brave browser could become an alternative for the current system of providing free content, which is based on collecting personal information in...
Read more >
Brave Browser's Next Trick: Privacy-Preserving News ...
The privacy-focused Brave browser is seeking to walk the line when it comes to preserving users' privacy while also offering up news ......
Read more >
Brave Browser Review 2022 [Better Than Chrome?]
Through Brave's decentralized and privacy-focused advertising platform, user data remains completely private, while websites and advertisers are ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found