-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Update privacy toggle to be per site #811
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
Conversation
# Conflicts: # app/schemas/com.duckduckgo.app.global.db.AppDatabase/19.json # app/src/androidTest/java/com/duckduckgo/app/browser/BrowserTabViewModelTest.kt # app/src/main/java/com/duckduckgo/app/browser/BrowserTabFragment.kt # app/src/main/java/com/duckduckgo/app/cta/ui/CtaViewModel.kt # app/src/main/java/com/duckduckgo/app/global/db/AppDatabase.kt # app/src/main/java/com/duckduckgo/app/privacy/ui/PrivacyDashboardActivity.kt # app/src/main/java/com/duckduckgo/app/settings/SettingsActivity.kt # app/src/main/res/values/string-untranslated.xml
# Conflicts: # app/src/main/java/com/duckduckgo/app/browser/BrowserTabFragment.kt
app/src/androidTest/java/com/duckduckgo/app/browser/BrowserTabViewModelTest.kt
Show resolved
Hide resolved
app/src/androidTest/java/com/duckduckgo/app/brokensite/BrokenSiteDataTest.kt
Show resolved
Hide resolved
# Conflicts: # app/src/main/res/layout/view_bookmark_entry.xml
cmonfortep
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only tested the feature (not reviewed the code), I found some small things:
-
Testing on 21-23 API: overflow icon color in whitelist page is rendered with pink color, we should tint the imageview.
-
Testing with destroy activities enabled: Having a whitelisted site, every time I visit "whitelist page" or "report broken site" or "trackers found" from the privacy dashboard and then I going back to privacy dashboard screen,
mp_wlais sent without any interaction. -
Every time I visit privacy dashboard from a whitelisted site, I see the toggle moving from enabled to disabled, I guess it's related with some async query. But the top card image is rendered correctly from the beginning, so wondering if we can avoid that UI distraction.
Open questions:
- Minor thing, but if I go to privacy dashboard and I switch the toggle twice (interacting but keeping the original state), and going back to the browser, page will reload. is that expected?
- If I visit a website -> then I whitelist that site from settings -> I go back to the browser -> website doesn't reload. Is that something we expect? or should we detect the change and reload the site?
- When switching the site privacy protection toggle, should we change somehow the privacy grade to the user? I know it's not possible, but maybe as a future feedback. Currently, I feel like I don't receive any feedback on what's happening.
- Noticed we removed the trackers statistics from the privacy dashboard. I still haven't checked the code, but it's that something related to this feature?
# Conflicts: # app/src/main/res/drawable/ic_overflow.xml # app/src/main/res/drawable/ic_overflow_24dp.xml # app/src/main/res/drawable/ic_overflow_bookmarks_24dp.xml # app/src/main/res/layout/layout_browser_bottom_navigation_bar.xml # app/src/main/res/layout/layout_tabs_bottom_navigation_bar.xml # app/src/main/res/layout/view_bookmark_entry.xml
…m multiple threads
# Conflicts: # app/src/main/java/com/duckduckgo/app/cta/ui/CtaViewModel.kt
Thanks! This was introduced by another PR and has subsequently been fixed globally by #814.
Good catch! Fixed.
The visible ui update as the user enters the screen is preexisting behavior. We have had no feedback about and as we expect to either completely redesign or even delete this screen we have no plans to fix it.
Yes. It's it is an easier implementation this way and I don't think users will find it odd that the page reloads after they have interacted with the toggle. I like your idea of being smarter and only reloading when the value has truly changed (on an odd number of toggles) however I don't think it's worth investing in that level of polish when we are soon deprecating this screen. If we receive feedback that this is unacceptable, we can reconsider. Let me know if you feel strongly otherwise.
Yes this is expected. If the user is in the context of a site and they toggle protection either through the dash toggle or the whitelist menu button then we reload. If the go to whitelists screen via settings however and start adding and removing entries, the user is now outside the context of the current page. We could make this fancier but it also adds complexity. Let me know if you feel strongly about this though.
Again this is preexisting behavior and as we expect to be deprecate this screen this isn't something we plan to change right now.
Oh no that shouldn't happen, thanks for catching it. Fixed! Beware though there is another outstanding issue in develop in this area due to a change from percentage to ratio for prevalence in the backend API. To see any results you'll need to update |
cmonfortep
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking good, all are minor comments or suggestions, nothing blocking. There's only one question from my side about GlobalScope that I would like to see what @CDRussell thinks about.
Testing wise: I only found one small issue, already explained in one of the comments.
app/src/androidTest/java/com/duckduckgo/app/httpsupgrade/HttpsUpgraderTest.kt
Show resolved
Hide resolved
app/src/androidTest/java/com/duckduckgo/app/privacy/db/UserWhitelistDaoTest.kt
Show resolved
Hide resolved
app/src/main/java/com/duckduckgo/app/privacy/ui/ScorecardViewModel.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt
Outdated
Show resolved
Hide resolved
…mp back to main thread to avoid posting live data
…her small tidy ups
cmonfortep
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the tidy up and the work you did here. Tested on API 21, 23, 29. All working as described. 🚀
|
Thanks for the awesome review 🙏 |
Task/Issue URL: https://app.asana.com/0/72649045549333/559623300949085
Steps to test this PR:
TEST 1: Test new toggle text and behavior
TEST 2: Test new buttons
TEST 3: Test new pixels browsing pixels
TEST 4: Test new whitelist settings pixel
TEST 5: Test whitelist page
TEST 6: Test database migration
Internal references:
Software Engineering Expectations
Technical Design Template