brave / brave-ios

Brave iOS Browser
https://brave.com
Mozilla Public License 2.0
1.7k stars 441 forks source link

Rewrite Shields popover UI in SwiftUI #7428

Closed cuba closed 1 year ago

cuba commented 1 year ago

Description:

The code is old and very limited by Static. Replacing this screen will make it easier to implement features such as standard/aggressive ad-blocking

Uni-verse commented 1 year ago

Verified on iPhone X running iOS 16.3.1using version 1.51.1 (23.5.19.19)

Test Plan: https://github.com/brave/brave-ios/pull/7354#issue-1687214419

Tracking and Ads Blocking - Verified `Tracking & Ads Blocking` setting is set to standard by default. Tapping on the setting will show dropdown menu. - Verified setting Tracking & Ads Blocking to `Aggressive` or `Disabled` will update setting accordingly. Ad blocking toggle will be disabled in Brave shields panel if set to `Disabled` in global settings Example | Example | Example -|-|- ![IMG_3232](https://github.com/brave/brave-ios/assets/17885425/9b759bdf-19cc-4c39-8694-f2d461db9803) | ![IMG_3233](https://github.com/brave/brave-ios/assets/17885425/24a9ca43-b1c5-4dc1-b947-f9a12badcf8f) | ![IMG_3234](https://github.com/brave/brave-ios/assets/17885425/e3b66d47-c2cf-4aaa-a3a4-79e161326ae3) - Verified ads are blocked by default on `youtube.com` and news sites like `buzzfeed.com.` - Verified disabling shields or ad blocking toggle will enable preroll ads and content ads to be shown. Example | Example | Example -|-|- ![IMG_3220 2](https://github.com/brave/brave-ios/assets/17885425/449b07a7-f47e-4ef1-92ef-01210cd34497) | ![IMG_3240](https://github.com/brave/brave-ios/assets/17885425/12f0a650-e358-49bb-9d8a-f62bd9cd594e) | ![IMG_3242](https://github.com/brave/brave-ios/assets/17885425/72ecabbc-1d04-4556-bb42-5b65a99480d2)
Privacy Settings preference - Verified re-launching app or navigating in and out of settings does not change set toggle preference. - Verified enabling/disabling toggle does not change other toggles/settings. - Verified enabling `Block all cookies` shows a confirmation and setting is reverted on cancel. 1
Data, Privacy Hub, PBM - Verified deleting data using `Clear Data Now.` - Verified that "Private browsing only" shows a confirmation and if cancelled the setting is reverted and nothing happens and when accepted a loading indicator appears and after its loaded non-private tabs are destroyed. - Verified navigating to `Manage Website Data`, as well as manual removing items, clearing all data using `Remove All.` - Verified navigating to `Privacy Hub` settings, as well as clearing shields data. - Verified clear data toggles are remembered after clearing data in privacy settings. Example | Example | Example -|-|- ![IMG_3236](https://github.com/brave/brave-ios/assets/17885425/c301c22e-09da-4552-b468-78f6b36afdb7) | ![IMG_3237](https://github.com/brave/brave-ios/assets/17885425/7cc31357-ac65-45a5-9ec6-ab2e30cf0c27) | ![IMG_3238 2](https://github.com/brave/brave-ios/assets/17885425/cd71fc33-5c40-46ff-a3c0-ebb80b985efc)
Block 'Switch to App' Notices - Verified switch to app dialogs are blocked when toggle is enabled. - Verified switch to app dialogs are shown with shields down when toggle is still enabled. - Verified `Block 'Switch to App' Notices` is tied to `Fanboy's Mobile Notification` toggle in Content filter lists. Disabling one will affect the other. Example | Example | Example -|-|- ![IMG_3228](https://github.com/brave/brave-ios/assets/17885425/d420049d-3baf-4daf-845f-d2b16ae9c946) | ![IMG_3229](https://github.com/brave/brave-ios/assets/17885425/1e89fcc4-9877-46d6-a88c-ea453779efde) | ![IMG_3230](https://github.com/brave/brave-ios/assets/17885425/86746d7c-95d4-47ae-8264-73a28f2aa77c) ![IMG_3225](https://github.com/brave/brave-ios/assets/17885425/29d2eb15-6a2b-408b-92f7-d1f61aac891d) | ![IMG_3223](https://github.com/brave/brave-ios/assets/17885425/ef813cfb-612e-4389-a086-0f2d6e632d71) | ![IMG_3226](https://github.com/brave/brave-ios/assets/17885425/5a32d5be-46dd-49b5-b919-8faad93adc8a)
Fingerprinting - Verified fingerprinting is working on iOS using test plan in https://github.com/brave/brave-ios/issues/7231#issue-1664912095 Example | Example | Example | Example | Example | Example -|-|-|-|-|- ![IMG_3245](https://github.com/brave/brave-ios/assets/17885425/d1752c0c-22a3-49bf-a61a-48f5b04cfd0f) | ![IMG_3246](https://github.com/brave/brave-ios/assets/17885425/735844cd-ea3b-45d9-a077-c4324c717288) | ![IMG_3247](https://github.com/brave/brave-ios/assets/17885425/1c3fe0ab-eb26-411d-bff4-2c85159ba1fc) | ![IMG_3248](https://github.com/brave/brave-ios/assets/17885425/8e5cdf22-11ca-49a1-93b1-333a01f77174) | ![IMG_3250](https://github.com/brave/brave-ios/assets/17885425/91149862-70eb-4f00-9a93-72c0576180c7) | ![IMG_3251](https://github.com/brave/brave-ios/assets/17885425/24309901-cca0-455c-a9f8-2e5ce04f6aeb)
Block Cookie Consent Notice - Ensured enabling `Block Cookie Consent Notices` will hide all cookie notices - Ensured bringing shields down or disabling `Block Cookie Consent Notices` will show cookie notices (disable cookie consent notices blocking) Example | Example | Example -|-|- ![IMG_3252 2](https://github.com/brave/brave-ios/assets/17885425/70951ac4-bbfa-4db0-8d21-fac7a2e456e8) | ![IMG_3253 2](https://github.com/brave/brave-ios/assets/17885425/1d656774-af62-475d-8d40-d4084ef26c64) | ![IMG_3254 2](https://github.com/brave/brave-ios/assets/17885425/da5d2850-2151-4486-8fa1-b61c7bb880e3)
Safe Browsing - Verified warning interstitial page is shown when loading dangerous sites using https://testsafebrowsing.appspot.com/ - Verified user is able to navigate back from the warning page - Verified disabling `Block Dangerous Sites` will not warn users when loading dangerous sites Example | Example | Example -|-|- ![IMG_3255](https://github.com/brave/brave-ios/assets/17885425/dd75fa51-0656-41a2-a096-0905eadebfd5) | ![IMG_3256 2](https://github.com/brave/brave-ios/assets/17885425/86a24303-4471-4082-8c14-c625ce507a22) | ![IMG_3257 2](https://github.com/brave/brave-ios/assets/17885425/1f26b2c2-7782-4db7-9e73-e317527d5895) ![IMG_3258 2](https://github.com/brave/brave-ios/assets/17885425/caf451e2-5368-4ac8-83b3-ffbd387164a2) | ![IMG_3262 2](https://github.com/brave/brave-ios/assets/17885425/2ab65b3b-ae17-46d3-a70e-4116935d23c3) | ![IMG_3260 3](https://github.com/brave/brave-ios/assets/17885425/495348ed-b6b6-48e3-a334-bd98fc8c3b78)
Debouncing / DeAMP - Verified Debouncing / DeAMP scenarios following test plan in https://github.com/brave/brave-ios/issues/5730#issuecomment-1428651981 Example | Example | Example -|-|- ![IMG_3263 2](https://github.com/brave/brave-ios/assets/17885425/cf341f94-df49-4de3-bffe-89e15e8566d9) | ![IMG_3264](https://github.com/brave/brave-ios/assets/17885425/1107a369-fbff-4286-b490-ae1620945882) | ![IMG_3265](https://github.com/brave/brave-ios/assets/17885425/0c700f40-dd98-4ba5-aebd-b757cdf3195a)
Upgraded Profile - Verified upgrading app with ad-blocking toggle enabled (default) will retain preferences and show `Standard` state after upgrade. - Verified ad-blocking is working on upgraded profile - Verified upgrading app with ad-blocking toggle disabled will show `Disabled` state for `Trackers & Ads Blocking`
Uni-verse commented 1 year ago

Verified on iPad (7th Gen) running iPadOS 16.3.1 using version 1.51.1 (23.5.19.19)

Settings 1.51 1.51 1.51.1 1.51.1
IMG_1074 IMG_1076 IMG_1077 IMG_1078 IMG_1079