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

Hide idle detection UI elements in Settings. #10299

Merged
merged 2 commits into from
Sep 29, 2021

Conversation

mkarolin
Copy link
Collaborator

Fixes brave/brave-browser#18409

I think I got all the places where it shows up.

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:

@mkarolin mkarolin self-assigned this Sep 28, 2021
Copy link
Contributor

@jumde jumde left a comment

Choose a reason for hiding this comment

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

lgtm

@mkarolin mkarolin merged commit 1ac3b8a into master Sep 29, 2021
@mkarolin mkarolin deleted the maxk-hide-idle-detection-ui branch September 29, 2021 13:49
@mkarolin mkarolin added this to the 1.32.x - Nightly milestone Sep 29, 2021
brave-builds pushed a commit that referenced this pull request Sep 29, 2021
@stephendonner
Copy link
Contributor

Verified PASSED using

Brave 1.32.34 Chromium: 94.0.4606.61 (Official Build) nightly (x86_64)
Revision 418b78f5838ed0b1c69bb4e51ea0252171854915-refs/branch-heads/4606@{#1204}
OS macOS Version 11.6 (Build 20G165)

Steps:

  1. Start Brave and navigate to any site (e.g. cnn.com)
  2. Navigate to brave://settings "Privacy and security" "Site and Shields Settings"
  3. Under "Permissions" section, click on "Additional permissions"
  4. Verify that "Your device use" item is not present
  5. Scroll back to the top of the page and click on "View permissions and data stored across sites"
  6. Pick the site you visited in step 1 and click to expand
  7. Click on the site
  8. Verify that "Your device use" item is not present
  9. Navigate to brave://settings/content/idleDetection
  10. Verify that the page is empty.
example example example
Screen Shot 2021-09-30 at 11 30 52 AM Screen Shot 2021-09-30 at 11 32 10 AM Screen Shot 2021-09-30 at 11 32 28 AM

Verify that the UI is not hidden when the feature is enabled:

  1. Start Brave from the command line with --enable-features=IdleDetection
  2. Repeat steps above, expect the reverse in the Verify steps.
example example example
Screen Shot 2021-09-30 at 11 32 49 AM Screen Shot 2021-09-30 at 11 33 09 AM Screen Shot 2021-09-30 at 11 34 03 AM

@kjozwiak
Copy link
Member

kjozwiak commented Oct 6, 2021

Verification PASSED on Samsung S10+ running Android 11 using the following build:

Nightly 1.32.44 Chromium: 94.0.4606.71

Case #1 - IdleDetection disabled

  • checked https://idle-detection.glitch.me and ensured that the Idle Detection API is disabled
  • verified that there's no UI associated with Idle Detection visible under Settings -> Site Settings
  • verified that there's no UI associated with Idle Detection visible under Settings -> Site Settings -> All Sites
Example Example Example Example
Screenshot_20211005-200656_Brave - Nightly Screenshot_20211005-200707_Brave - Nightly Screenshot_20211005-200711_Brave - Nightly Screenshot_20211005-200729_Brave - Nightly

Case #2 - IdleDetection enabled

  • launched Brave using --enable-features=IdleDetection
  • ensured that visiting https://idle-detection.glitch.me allows you to enable the Idle Detection API
  • ensured that enabling the Idle Detection API displays a permission modal
  • ensured that Your device use appears under All Sites under Site Settings for https://idle-detection.glitch.me
  • ensured disabling Idle Detection by removing --enable-features=IdleDetection removes the UI from All Sites
Example Example
Screenshot_20211005-170102_Brave - Nightly Screenshot_20211005-170157_Brave - Nightly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hide UI elements related to IdleDetection
5 participants