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 notification permission issue fix #16740

Merged
merged 1 commit into from
Jan 21, 2023

Conversation

sujitacharya2005
Copy link
Contributor

@sujitacharya2005 sujitacharya2005 commented Jan 19, 2023

Resolves brave/brave-browser#27851
Resolves brave/brave-browser#27852
Resolves brave/brave-browser#27853

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
  • Squashed any review feedback or "fixup" commits before merge, so that history is a record of what happened in the repo, not your PR
  • 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 wiki
    • npm run lint, npm run presubmit wiki, 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:

In this PR there are 3 changes

  1. If "Brave Ads" notification channel is off then also redirect to setting page.
  2. Get weekly privacy UI , show notification request UI if "General" notification channel is off
  3. Dot was missing in description in one modal

One more changes in this PR.
if notification permission is not there still allow to create reward wallet.
STR

  1. NO notification permission
  2. Rewards setup
  3. country select
  4. click continue
  5. redirect to setting page
  6. don't give permission
  7. Still it will create wallet

Below two video for Get weekly privacy UI
https://user-images.githubusercontent.com/32419898/213454850-070afeb3-b3aa-4fd9-8ae8-ddb229aca3fc.mp4
https://user-images.githubusercontent.com/32419898/213454871-45f0989a-0bf4-4e62-9b3b-bdfd7e15716d.mp4

Rewards Panel

screen-20230120-220639.mp4

Dot at the end
Screenshot_20230120-135111

@sujitacharya2005 sujitacharya2005 added CI/skip-linux CI/skip-macos-x64 Do not run CI builds for macOS x64 CI/skip-ios Do not run CI builds for iOS labels Jan 19, 2023
Copy link
Contributor

@samartnik samartnik left a comment

Choose a reason for hiding this comment

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

lgtm

@sujitacharya2005 sujitacharya2005 force-pushed the 27851_27852_27853_brave_notification_fix branch 2 times, most recently from 2309f11 to 5738fb8 Compare January 20, 2023 09:35
Copy link
Contributor

@tapanmodh tapanmodh left a comment

Choose a reason for hiding this comment

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

lgtm

@sujitacharya2005 sujitacharya2005 force-pushed the 27851_27852_27853_brave_notification_fix branch from 5738fb8 to 47cfda3 Compare January 20, 2023 16:54
Copy link
Contributor

@deeppandya deeppandya left a comment

Choose a reason for hiding this comment

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

LGTM

@sujitacharya2005 sujitacharya2005 force-pushed the 27851_27852_27853_brave_notification_fix branch from 47cfda3 to 37e3159 Compare January 21, 2023 04:57
@sujitacharya2005 sujitacharya2005 merged commit 9efd35d into master Jan 21, 2023
@sujitacharya2005 sujitacharya2005 deleted the 27851_27852_27853_brave_notification_fix branch January 21, 2023 05:38
@github-actions github-actions bot added this to the 1.49.x - Nightly milestone Jan 21, 2023
@kjozwiak
Copy link
Member

kjozwiak commented Feb 2, 2023

Verification PASSED on Pixel 6 running Android 13 using the following build(s):

Brave | 1.49.82 Chromium: 110.0.5481.52 (Official Build) canary (32-bit)
--- | ---
Revision | 979113183ded4544a2c443aceb1629c430907e52-refs/branch-heads/5481@{#636}
OS | Android 13; Build/TQ1A.230105.002

Test Case #1 - brave/brave-browser#27853

Went through the STR/Cases outlined via brave/brave-browser#27853 (comment) and ensured that there was a . at the end of the statement/string as per the following:

Example Example
Screenshot_20230202-011924 Screenshot_20230202-011943

Test Case #2 - brave/brave-browser#27851

As per @deeppandya, we don't block users from opting into Brave Rewards when they have notifications disabled. We display the warning but a user can dismiss the modal by pressing X and continue with onboarding. So the following verifies that the user received a warning when disabling either All Brave - notifications or All "Brave Ads" notification channels from Notifications settings.

Test Case #1 - not enabling notifications via initial onboarding

  • installed 1.49.82 Chromium: 110.0.5481.52
  • tap on Continue under the Brave notifications make it easier onboarding
  • tap on Dont allow under the `All Brave - Nightly to send you notifications?" modal
  • tap on the rewards panel and select a country via the Select your country panel
  • tapping on Continue should display the Enable notifications from Brave to earn Brave Rewards modal
    • ensured that tapping X dismisses the modal and you can still run/setup rewards via the panel
    • ensured that tapping on Open Settings opens Notifications under Settings
screen-20230202-013647.mp4

Test Case #2 - disabling All Brave - notifications via Settings -> Notifications

  • installed 1.49.82 Chromium: 110.0.5481.52
  • tap on Continue under the Brave notifications make it easier onboarding
  • tap on Allow under the `All Brave - Nightly to send you notifications?" modal
  • disable All Brave - notifications via Hamburger Menu -> Settings -> Notifications
  • tap on the rewards panel via NTP and select a country via the Select your country panel
  • tapping on Continue should display the Enable notifications from Brave to earn Brave Rewards modal
    • ensured that tapping X dismisses the modal and you can still run/setup rewards via the panel
    • ensured that tapping on Open Settings opens Notifications under Settings
screen-20230202-014548.mp4

Test Case #3 - disabling All "Brave Ads" notification via Settings -> Notifications

  • installed 1.49.82 Chromium: 110.0.5481.52
  • tap on Continue under the Brave notifications make it easier onboarding
  • tap on Allow under the `All Brave - Nightly to send you notifications?" modal
  • disable All "Brave Ads" notification via Hamburger Menu -> Settings -> Notifications
  • tap on the rewards panel via NTP and select a country via the Select your country panel
  • tapping on Continue should display the Enable notifications from Brave to earn Brave Rewards modal
    • ensured that tapping X dismisses the modal and you can still run/setup rewards via the panel
    • ensured that tapping on Open Settings opens Notifications under Settings
screen-20230202-014823.mp4

Test Case #3 - brave/brave-browser#27852

Went through the STR/Cases outlined via brave/brave-browser#27852 (comment) and ensured that the Privacy Report warning re: notifications being disabled when toggling both All Brave - notifications and All "General" notifications as per the following:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/skip-ios Do not run CI builds for iOS CI/skip-macos-x64 Do not run CI builds for macOS x64
Projects
None yet
5 participants