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

Added Shields settings section #14893

Merged
merged 1 commit into from
Oct 14, 2022
Merged

Added Shields settings section #14893

merged 1 commit into from
Oct 14, 2022

Conversation

spylogsster
Copy link
Contributor

@spylogsster spylogsster commented Aug 30, 2022

Resolves brave/brave-browser#12782

  • Added Shield settings to brave://settings/content:
    • Shield status (up / down or enabled / disabled), navigates to /shields settings subpage
    • Removed Upgrade connections to HTTPS option
    • Upgrade connections to HTTPS (true / false), navigates to /shields settings subpage (removed)
  • Replaced brave.https_everywhere_default by profile.default_content_setting_values.httpUpgradableResouces (removed)
  • Each subpage allows to include/exclude domains same way as for other settings
shields2.mp4

Updated screenshots

image

image

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, 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:

  • Enable/Disable shields on different domains, make sure all domains are visible on brave://settings/content/shields
  • Try to add/remove domains using Add buttons for each sections and check if shields meets this configuration

@spylogsster spylogsster self-assigned this Aug 30, 2022
@spylogsster spylogsster force-pushed the brave-12782 branch 18 times, most recently from 32aca6a to d4d9dee Compare September 1, 2022 11:35
@spylogsster spylogsster marked this pull request as ready for review September 1, 2022 11:45
@spylogsster spylogsster requested review from a team as code owners September 1, 2022 11:45
@spylogsster spylogsster changed the title wip: Added Shields settings section Added Shields settings section Sep 1, 2022
@spylogsster spylogsster force-pushed the brave-12782 branch 5 times, most recently from a268e4a to d83595c Compare October 10, 2022 09:24
@spylogsster
Copy link
Contributor Author

spylogsster commented Oct 10, 2022

@bridiver @bsclifton I removed all HTTPSE related things due to https://github.com/brave/security/issues/1061#issuecomment-1272868332 and updated description, please take a look again, thanks

@spylogsster spylogsster force-pushed the brave-12782 branch 7 times, most recently from 8d224f2 to 5bf00d0 Compare October 12, 2022 15:22
@bsclifton
Copy link
Member

bsclifton commented Oct 13, 2022

Code changes RE: the removal of httpse setting took a moment to understand, but it makes sense 😄 I build and ran this PR locally and shields up/down works great 👍

For the screen at brave://settings/content

image

Should the label that says Up instead say something like Sites can block trackers, ads, and fingerprinting using Shields? Maybe @rmcfadden3 can help with exact wording
cc: @rebron

@spylogsster spylogsster force-pushed the brave-12782 branch 2 times, most recently from 742da46 to feee1d2 Compare October 13, 2022 18:16
Copy link
Member

@bsclifton bsclifton left a comment

Choose a reason for hiding this comment

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

Works great - just had a few items to change

The labels on brave://settings/content/braveShields should say Shields Up and Shields Down

Right now, the one which before said Up is unintentionally having the new Sites can block trackers, ads, and fingerprinting using Shields value

image

Once those issues are fixed, everything else looks good to me! 😄👍

@spylogsster
Copy link
Contributor Author

Works great - just had a few items to change

The labels on brave://settings/content/braveShields should say Shields Up and Shields Down

Right now, the one which before said Up is unintentionally having the new Sites can block trackers, ads, and fingerprinting using Shields value image

Once those issues are fixed, everything else looks good to me! 😄👍

done

@spylogsster spylogsster force-pushed the brave-12782 branch 2 times, most recently from 678d76e to 7f46ec4 Compare October 14, 2022 05:11
@spylogsster spylogsster merged commit d4a5eb9 into master Oct 14, 2022
@spylogsster spylogsster deleted the brave-12782 branch October 14, 2022 08:53
@github-actions github-actions bot added this to the 1.46.x - Nightly milestone Oct 14, 2022
Comment on lines +108 to +112
refreshState() {
this.browserProxy_.getHTTPSEverywhereEnabled().then(value => {
this.httpsEverywhereEnabled_ = value
})

Copy link
Contributor

Choose a reason for hiding this comment

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

I might not be understanding, but something doesn't seem quite right here to me. Where is refreshState called? I also don't see a definition for getHTTPSEverywhereEnabled.

Copy link
Contributor

Choose a reason for hiding this comment

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

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.

Add Brave's Shields setting to brave://settings/content
5 participants