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: require opt-in #8830

Merged
merged 3 commits into from
May 18, 2021
Merged

Brave News: require opt-in #8830

merged 3 commits into from
May 18, 2021

Conversation

petemill
Copy link
Member

@petemill petemill commented May 17, 2021

Extension changes

  • Automatically download the feed if the user previously enabled Brave News but has not opt-in to new UI
  • Do not download feed or publishers JSON for any user if there is no opt-in (sanity check mostly)

UI changes

  • New opt-in button for new and existing users
  • Make sure we don't ask for feed when scroll down, only when scroll down and opt-in
  • Rename all strings - Brave Today -> Brave News

Submitter Checklist:

  • I confirm that no security/privacy review is needed, or that I have requested one
  • There is a ticket for my issue
  • Used Github auto-closing keywords in the PR description above
  • Wrote a good PR/commit description
  • Added appropriate labels (QA/Yes or QA/No; release-notes/include or release-notes/exclude; OS/...) to the associated issue
  • Checked the PR locally: npm run test -- brave_browser_tests, npm run test -- brave_unit_tests, npm run lint, npm run gn_check, npm run tslint
  • Ran git rebase master (if needed)

Reviewer Checklist:

  • A security review is not needed, or a link to one is included in the PR description
  • New files have MPL-2.0 license header
  • Adequate test coverage exists to prevent regressions
  • Major classes, functions and non-trivial code blocks are well-commented
  • Changes in component dependencies are properly reflected in gn
  • Code follows the style guide
  • Test plan is specified in PR before merging

After-merge Checklist:

Test Plan:

@petemill petemill self-assigned this May 17, 2021
@petemill petemill requested review from simonhong and bsclifton May 17, 2021 21:54
@petemill
Copy link
Member Author

Linux CI failed only because of unrelated test:

2 tests crashed:

[2021-05-17T22:46:53.345Z]     BraveAdsBrowserTest/BraveAdsUpgradeBrowserTest.UpgradePath/PreferencesForVersion062WithRewardsEnabled_ForSupportedLocale_ForNewlySupportedLocale_RewardsShouldBeEnabled_AdsShouldBeDisabled (../../brave/components/brave_ads/browser/ads_service_browsertest.cc:1044)

[2021-05-17T22:46:53.345Z]     BraveAdsBrowserTest/BraveAdsUpgradeBrowserTest.UpgradePath/PreferencesForVersion070WithRewardsAndAdsEnabled_ForSupportedLocale_ForUnsupportedLocale_RewardsShouldBeEnabled_AdsShouldBeEnabled (../../brave/components/brave_ads/browser/ads_service_browsertest.cc:1044)

@petemill petemill requested a review from a team as a code owner May 18, 2021 04:42
@petemill petemill removed the request for review from a team May 18, 2021 04:47
@petemill petemill force-pushed the news-optin branch 3 times, most recently from c1d93e3 to d5c21d5 Compare May 18, 2021 05:58

type Props = {
show: boolean
onCustomizeBraveToday: () => any
}

const CustomizeButton = styled('button')<Props>`
const Hideable = styled('div')<Props>`
Copy link
Member

@simonhong simonhong May 18, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: How about fixing brave/brave-browser#15221 together because you touches Customize button herre. After it's hidden, still we can click. Of course, I'm fine as a separate task.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea. I hadn't noticed that PR.

Copy link
Member

@simonhong simonhong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works perfect! 👍

petemill and others added 3 commits May 18, 2021 09:46
When button is not visible it won't have any even listeners and won't preven tother buttons to be clicked.

# Conflicts:
#	components/brave_new_tab_ui/components/default/braveToday/options/customize.tsx
@petemill
Copy link
Member Author

Fixed a bug that CI didn't catch which meant that the Customize button text did not get a color applied.

@petemill petemill added the CI/skip Do not run CI builds (except noplatform) label May 18, 2021
@bsclifton bsclifton merged commit c4ce1be into master May 18, 2021
@bsclifton bsclifton deleted the news-optin branch May 18, 2021 16:55
@bsclifton bsclifton added this to the 1.26.x - Nightly milestone May 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/skip Do not run CI builds (except noplatform)
Projects
None yet
4 participants