Skip to content

Conversation

@cmonfortep
Copy link
Contributor

@cmonfortep cmonfortep commented May 13, 2020

Task/Issue URL: https://app.asana.com/0/72649045549333/1175609299816961/f
Tech Design URL:
CC:

Description:
This is a feature branch that will merge into develop following previous PRs:

#796

  • fireproof website option menu + confirmation snackbar
  • fireproof websites settings option
  • fireproof websites screen (list of fireproof websites)
  • Room database to store fireproof websites
  • improvements on bookmark screen (to keep consitency with fireproof websites)

#808

  • Implement logic to remove cookies preserving the ones related to fireproof website.
  • Try to directly remove cookies from WebView database, preserving the ones with hosts related to a fireproof website
  • If process fails, fallback to remove all the cookies to avoid any leak
  • Send pixels in the following scenarios:
  • database path not found
  • database can't be opened
  • delete query fails

#810

  • Implement empty state for fireproof websites screen
  • Implement feature pixels
  • User clicks on "fireproof a website"
  • User undo "fireproof website" action (confirmation snackbar after fireproffing a website)
  • User removed a website from "fireproof websites"

Steps to test this PR:
Listing the most important tests to validate the feature works. For more concrete testing, please go to each PR description.

Test 1

  1. Fresh install
  2. Visit any website (e.g: twitter.com)
  3. Perform an action that will create cookies (e.g: login)
  4. Fireproof website
  5. Ensure snackbar appears with expected domain
  6. Ensure Fireproof website in overflow menu is now disabled
  7. Press fire button
  8. Visit fireproof website
  9. Ensure state has been preserved (e.g: you are logged in)
  10. Open Settings
  11. Open Fireproof websites
  12. Ensure fireproof website is listed and feature description appears at the top

Test 2

  1. Visit duckduckgo website (do not fireproof DDG site)
  2. Set a theme (it will create a cookie)
  3. Press fire button
  4. Visit duckduckgo again
  5. Ensure theme has been preserved

Test 3

  1. Visit any non-fireproof website
  2. Open options menu and click on Fireproof website
  3. Ensure snackbar appears with expected domain
  4. Click on "undo"
  5. Ensure Fireproof website in overflow menu is still disabled

Test 4

  1. Without any fireproof website
  2. Access settings -> fireproof websites
  3. Ensure list is empty and "No websites fireproofed yet" and feature description appears at the top
  4. Go back to browser
  5. Fireproof any website
  6. Navigate to settings -> fireproof websites again
  7. Ensure list is not empty and feature description appears at the top
  8. Remove all websites from the list
  9. Ensure "No websites fireproofed yet" appeared again

Test 5

  1. checkout develop
  2. Fresh install
  3. Change to this branch
  4. Install the app
  5. Ensure database migration correctly executed
  6. Perform any of the previous test to check functionality works

Additional test:

  • Change between light/dark theme

Internal references:

Software Engineering Expectations
Technical Design Template

cmonfortep added 5 commits May 1, 2020 16:30
* Create new database table to persist sites where cookies should be preserved

* Removed divider from bookmarks list

* bookmarks title show in single line

* background favicon compatible with dark theme

* introduce fireproof site option menu

* Fireproof option menu reacts to database state.

* Fireproof website screen created
* Implement logic to remove cookies preserving the ones related to fireproof website.

- Try to directly remove cookies from WebView database, preserving the ones with hosts related to a fireproof website
- If process fails, fallback to remove all the cookies to avoid any leak
- Send pixels in the following scenarios:
- database path not found
- database can't be opened
- delete query fails
- database corruption
* Empty state for fireproof websites screen
* Feature pixels
- User clicks on "fireproof a website"
- User undo "fireproof website" action (confirmation snackbar after fireproffing a website)
- User removed a website from "fireproof websites"
# Conflicts:
#	app/schemas/com.duckduckgo.app.global.db.AppDatabase/20.json
#	app/src/androidTest/java/com/duckduckgo/app/browser/BrowserTabViewModelTest.kt
#	app/src/androidTest/java/com/duckduckgo/app/global/db/AppDatabaseTest.kt
#	app/src/main/java/com/duckduckgo/app/bookmarks/ui/BookmarksActivity.kt
#	app/src/main/java/com/duckduckgo/app/browser/BrowserTabFragment.kt
#	app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt
#	app/src/main/java/com/duckduckgo/app/global/db/AppDatabase.kt
#	app/src/main/java/com/duckduckgo/app/settings/SettingsActivity.kt
#	app/src/main/java/com/duckduckgo/app/settings/SettingsViewModel.kt
#	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
#	app/src/main/res/values/attrs.xml
#	app/src/main/res/values/string-untranslated.xml
@cmonfortep cmonfortep marked this pull request as ready for review May 13, 2020 15:07
@cmonfortep cmonfortep merged commit f610a2a into develop May 14, 2020
@cmonfortep cmonfortep deleted the feature/cristian/fireproof_websites branch May 14, 2020 14:58
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.

2 participants