Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Fix #6953: Fix filter list toggle states #7150

Merged

Conversation

cuba
Copy link
Contributor

@cuba cuba commented Mar 26, 2023

Summary of Changes

This pull request fixes #6953

Make sure the toggle is in sync with the filter list and settings are stored even before filter lists are downloaded

Submitter Checklist:

  • Unit Tests are updated to cover new or changed functionality
  • User-facing strings use NSLocalizableString()
  • New or updated UI has been tested across:
    • Light & dark mode
    • Different size classes (iPhone, landscape, iPad)
    • Different dynamic type sizes

Test Plan:

  1. Disable internet connection:
  2. Launch the app for the first time. Verify that "Block cookie consent notices'' is off and "Block 'Switch to App' Notices" is on in the Shields menu.
  3. Enable "Block cookie consent notices' and disable "Block 'Switch to App' Notices"
  4. Enable internet connection
    Note: The filter lists will not download until you enable the internet and restart the application. I don't know why component updater doesn't retry the download until you restart the app. This is an issue I'll look into but for now you have to restart the app to retry the downloads. The two toggles will not do anything until filter lists are downloaded.
  5. Relaunch the app. Verify the settings are preserved.
  6. Verify that filter lists also reflect these toggles. The filter lists that represent these two settings are: "Easylist-Cookie List - Filer Obtrusive Cookie Notices" and "Fanboy's Mobile Notifications List" respectively.
  7. Now you test that things are blocked. For example reddit.com. (be aware that some sites have some blocking issues, e.x. twitter.com)
  8. Delete the app, re-install and launch the app for the first time. Verify that "Block cookie consent notices'' is off and "Block 'Switch to App' Notices" is onon the Shields menu. Ensure that the filter list screen also reflect these settings once they are downloaded.
    d. Switch the toggles and ensure the changes are reflected on the filter lists (you can try to repeat this several times)
    e. Switch the toggles on the filter lists and ensure the toggles are reflected on the Shields screen (you can also repeat this several times)
  9. See STR in ticket for additional steps (Note: Ensure filter lists are downloaded before testing blocking and be aware of sites that have broken cosmetic filtering (such as twitter.com which does not block all content))

Screenshots:

Reviewer Checklist:

  • Issues include necessary QA labels:
    • QA/(Yes|No)
    • bug / enhancement
  • Necessary security reviews have taken place.
  • Adequate unit test coverage exists to prevent regressions.
  • Adequate test plan exists for QA to validate (if applicable).
  • Issue and pull request is assigned to a milestone (should happen at merge time).

@cuba cuba requested a review from a team as a code owner March 26, 2023 10:07
@cuba cuba added this to the 1.49 milestone Mar 27, 2023
@cuba cuba merged commit 2b97203 into development Mar 27, 2023
@cuba cuba deleted the js/6953-fix-block-switch-to-app-notification-toggle-state branch March 27, 2023 14:33
iccub pushed a commit that referenced this pull request Mar 27, 2023
* Fix #6953: Fix filter list toggle states

* Fix #6953: Save filter list settings before filter lists are downloaded
arthuredelstein pushed a commit to brave/brave-core that referenced this pull request Feb 13, 2024
…ios#7150)

* Fix brave/brave-ios#6953: Fix filter list toggle states

* Fix brave/brave-ios#6953: Save filter list settings before filter lists are downloaded
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Switch to app notices not suppressed on new profile (switch to app stays off)
2 participants