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

Implement cosmetic blocking [tracking] #5381

Closed
pes10k opened this issue Jul 24, 2019 · 7 comments · Fixed by brave/brave-core#3303, brave/brave-core#4255 or brave/brave-core#4269
Closed

Comments

@pes10k
Copy link
Contributor

pes10k commented Jul 24, 2019

Notes for QA (edit by @bsclifton)

  • In 1.5, Cosmetic filtering needs to be enabled via brave://flags/#brave-adblock-cosmetic-filtering
  • It wasn't until 1.6 that this setting's default value was changed from false to true (see this PR for more info)
  • Implement cosmetic filtering brave-core#3303 (original implementation) only mentions automated tests, does not feature a test plan

Test Plan

In 1.5:
First, enable cosmetic filtering via brave://flags/#brave-adblock-cosmetic-filtering

Then, in both 1.5 and 1.6:
Navigate to https://enpt.dict.cc in a new tab
Ensure there is no large square whitespace under the word "Advertisement" in the center of the page (by the "dict.cc Dicionário Inglês-Português: Portuguese-English and Multilingual Dictionary" header)

Description

Would be great to support EasyList and similar cosmetic filter rules. Much of this work has already been done in https://github.com/brave/adblock-rust. This issue is a tracking issue to keep track of all the branches and changes needed across multiple projects to land this in brave-browser.

@pes10k pes10k added feature/CSS-element-block feature/shields The overall Shields feature in Brave. feature/shields/adblock Blocking ads & trackers with Shields labels Jul 24, 2019
@antonok-edm
Copy link
Collaborator

Relevant tracking issue in adblock-rust: brave/adblock-rust#38

@antonok-edm
Copy link
Collaborator

Relevant tracking issue in adblock-rust-ffi: brave/adblock-rust-ffi#3

@bsclifton
Copy link
Member

When another fix is attempted, we'll want to link to test plan if manual QA is required. If not and everything is covered by automation, we can change label to QA/No

@szaimen
Copy link

szaimen commented Feb 5, 2020

So I have enabled the cosmetic filtering option over brave://flags. But as soon as I visit a website, brave nightly crashes on Windows 10. I also cannot find any additional option concerning cosmetic filtering in the brave settings after a relaunch after I enabled the flag.

Is there something I have missed to enable this option?

@antonok-edm
Copy link
Collaborator

antonok-edm commented Feb 7, 2020

@szaimen crashes on Windows should be fixed as of brave/brave-core#4540.

Currently there are no additional settings regarding cosmetic filtering; this work supports the cosmetic filters that will soon be shipped from our filter lists.

The feature flag will be on by default with brave/brave-core#4511.

@LaurenWags
Copy link
Member

Adding QA/Blocked label for now.

Per discussion with @rebron not all PRs needed for this are currently in 1.5.x so this needs some sorting before QA can test.

@LaurenWags
Copy link
Member

LaurenWags commented Mar 11, 2020

Verified passed with

Brave 1.5.109 Chromium: 80.0.3987.132 (Official Build) beta (64-bit)
Revision fcea73228632975e052eb90fcf6cd1752d3b42b4-refs/branch-heads/3987@{#974}
OS macOS Version 10.14.6 (Build 18G3020)
  • Verified test plan from description

https://enpt.dict.cc/ without cosmetic blocking flag enabled:
Screen Shot 2020-03-11 at 4 36 03 PM

https://enpt.dict.cc/ after cosmetic blocking flag enabled:
Screen Shot 2020-03-11 at 4 37 03 PM

  • Also did a spot check of some other sites, no majorly noticeable issues. Display of some sites, such as buzzfeed.com improved.

buzzfeed.com without cosmetic blocking flag enabled:
Screen Shot 2020-03-11 at 4 36 33 PM

buzzfeed.com with cosmetic blocking flag enabled:
Screen Shot 2020-03-11 at 4 37 23 PM

Verification passed on

Brave 1.5.109 Chromium: 80.0.3987.132 (Official Build) beta (64-bit)
Revision fcea73228632975e052eb90fcf6cd1752d3b42b4-refs/branch-heads/3987@{#974}
OS Windows 10 OS Version 1803 (Build 17134.1006)

https://enpt.dict.cc/ after cosmetic blocking flag enabled:
image

buzzfeed.com without cosmetic blocking flag enabled:
image

buzzfeed.com with cosmetic blocking flag enabled:
image

Verification passed on

Brave 1.5.111 Chromium: 80.0.3987.132 (Official Build) (64-bit)
Revision fcea73228632975e052eb90fcf6cd1752d3b42b4-refs/branch-heads/3987@{#974}
OS Ubuntu 18.04 LTS

disabled
image

enabled
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment