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

[Android] default filter list settings #19670

Merged
merged 1 commit into from
Sep 13, 2023

Conversation

tapanmodh
Copy link
Contributor

Resolves brave/brave-browser#26587

Submitter Checklist:

  • I confirm that no security/privacy review is needed and no other type of reviews are needed, or that I have requested them
  • 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:

  1. Open settings
  2. Go to Brave Shields & privacy
  3. Go to Content Filtering
  4. You can enable disable default filter list

Copy link
Collaborator

@mkarolin mkarolin left a comment

Choose a reason for hiding this comment

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

strings++

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

@tapanmodh tapanmodh requested a review from samartnik August 23, 2023 16:20
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

Comment on lines 515 to 523
<message name="IDS_DEFAULT_FILTER_LISTS" desc="Title for Default filter lists.">
Default filter lists
</message>
<message name="IDS_DEFAULT_FILTER_LISTS_SUMMARY" desc="Summary text for Default filter lists.">
Additional popular community lists. Note that enabling too many filters will degrade browsing speeds.
</message>
Copy link
Collaborator

@antonok-edm antonok-edm Aug 23, 2023

Choose a reason for hiding this comment

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

I'm concerned about calling these "default" filter lists, since they are generally off by default. We already reserve that naming for the on-by-default lists (although we don't show it in the UI anywhere).

These lists come from the "regional list catalog". Ever since brave://adblock was replaced by brave://settings/shields/filters on Desktop, they're just labeled "Filter lists".

My recommendation is to follow the naming on Desktop (Filter lists). The title of the overall settings page can also be renamed to match accordingly (Content Filters). I'd also update the code to refer to them as "regional lists" (e.g. FilterListService::GetRegionalFilterLists).


† which is no longer only for "regional" lists, to make things even more confusing 😂
this needs some refactoring, but it'll be easier to do it all at once if the naming is consistent in the code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@timchilds @deeppandya what do you think? Should we follow the desktop or ios?

Choose a reason for hiding this comment

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

Following desktop makes sense to me. @anthonypkeane what do you think?

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree we should remove the default and just keep the filter list as a copy.

@tapanmodh tapanmodh force-pushed the default_filter_list_settings_android branch from bc05616 to c69ab93 Compare August 28, 2023 20:09
Copy link
Member

@SergeyZhukovsky SergeyZhukovsky left a comment

Choose a reason for hiding this comment

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

++

@tapanmodh tapanmodh force-pushed the default_filter_list_settings_android branch from f9d6368 to e6863eb Compare September 13, 2023 10:38
@tapanmodh tapanmodh merged commit a22dd62 into master Sep 13, 2023
@tapanmodh tapanmodh deleted the default_filter_list_settings_android branch September 13, 2023 19:24
brave-builds added a commit that referenced this pull request Sep 13, 2023
@kjozwiak
Copy link
Member

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

Brave | 1.60.56 Chromium: 117.0.5938.92 (Official Build) canary (64-bit)
--- | ---
Revision | 3b7f9ca8094bbdada8e04aa8531f4bd9becbc25b
OS | Android 14; Build/UPB5.230623.009; 34; REL

Using the STR/Cases outlined via #19670 (comment) and the information outlined via brave/brave-browser#26587, ensured the following:

  • ensured that the default filter list is visible via Settings -> Brave Shields & privacy -> Content Filtering
    • checked using both Dark & Light themes as well
  • disabled/enabled Fanboy's Mobile Notifications via Settings -> Brave Shields & privacy -> Content Filtering
    • ensured that the Open with modal appears within reddit.com once the filter is disabled (proving that filters are working)
    • ensured that the Open with modal is NOT appearing once Fanboy's Mobile Notifications is re-enabled
  • compared the default filter list between 1.58.131 via brave://adblock and 1.60.56viaContent Filtering` settings
    • basically ensured that we're not missing any entries when we moved into the native implementation
  • ensured that the settings persist after restarting (stay enabled/stay disabled etc..)
  • ensured that enabling/disabling the default filter list via the toggles doesn't crash Brave
Example Example Example Example Example Example
Screenshot_20230925-161621 Screenshot_20230925-161628 Screenshot_20230925-161710 Screenshot_20230925-162000 Screenshot_20230925-161940 Screenshot_20230925-163130

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.

[Android] Content filtering via settings
8 participants