Skip to content

Conversation

@cmonfortep
Copy link
Contributor

@cmonfortep cmonfortep commented May 4, 2020

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

Description:

This PR includes two different things:

  • Empty state for fireproof websites screen
  • Feature pixels

Implement empty state for fireproof websites screen

Light Dark

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:

Test 1: fireproof websites empty state

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

Test 2: fireproof website pixel

  1. Go back to browser
  2. Fireproof any website
  3. Ensure pixel sent: m_fw_a

Test 3: Undo fireproof website pixel

  1. Go back to browser
  2. Fireproof any website
  3. Click on Undo snackbar action
  4. Ensure pixel sent: m_fw_u

Test 4: Remove fireproof website pixel

  1. Go back to browser
  2. Fireproof any website
  3. Navigate to settings -> fireproof websites again
  4. Remove a website from the list
  5. Ensure pixel sent: m_fw_d

Test 5: Description on top

  1. Ensure description always appears on top of empty state or list of fireproof websites

Internal references:

Software Engineering Expectations
Technical Design Template

* Introduced subtle background for favicon
* changes to align with current design
disabled if home screen or domain exists in database
enabled if doesn't exist in database
Copy link
Contributor

@malmstein malmstein left a comment

Choose a reason for hiding this comment

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

The pixels are sent and functionality works as expected, good job!

I've added a few comments for you regarding code consistency. Regarding the UI, looks like the text size of "No websites fireproofed yet" does not match the designs. Can you double check with the design team?

Screenshot 2020-05-05 at 17 49 27

adapter = FireproofWebsiteAdapter(viewModel, R.string.fireproofWebsiteFeatureDescription)
adapter = FireproofWebsiteAdapter(
viewModel = viewModel,
emptyListHintStringRes = R.string.fireproofWebsiteEmptyListHint,
Copy link
Contributor

Choose a reason for hiding this comment

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

see comment about fireproofWebsiteEmptyHint.setText(text)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ditto

@cmonfortep
Copy link
Contributor Author

@malmstein both hints (I didn't change the one from bookmarks) have 16sp, and they share the same style.
The design link to Figma is available inside the asana task. Here's a screenshot from there where you can see the 16sp reference.
image

I understand the difference is just a matter of using different screen size/density.

Bookmarks Fireproof
image image

@malmstein
Copy link
Contributor

@cmonfortep I understand what you mean about using the dimensions from Figma. This has been a problem before but we don't need to fix this at this stage.

I'd recommend you do a Design Review before moving to Product Review. You can take https://app.asana.com/0/1157893581871903/1170225026602691 as an example, it really helped ironing out the final details and ensure everyone was happy with the end result

@cmonfortep
Copy link
Contributor Author

@malmstein maybe we can talk offline about problems with dimensions from Figma, I'm not aware of any problem and I would like to know more.

About design review: I already went through it -> https://app.asana.com/0/1129367408583813/1172778240040897/f

@cmonfortep cmonfortep requested a review from malmstein May 6, 2020 07:35
@malmstein
Copy link
Contributor

@cmonfortep I meant a review after you've implemented the changes and built a version that the designer can play with. This avoids comments like "I might be put off a little bit by the resolution from your phone." and reduces the friction that will come out of Product Review when other stakeholders actually install the app.

Copy link
Contributor

@malmstein malmstein left a comment

Choose a reason for hiding this comment

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

We walked through the changes and we are both happy with the result. Good job @cmonfortep!

@cmonfortep
Copy link
Contributor Author

@malmstein during product review we decided to change the description to the top of the screen. Can you review the last commit?
product review -> https://app.asana.com/0/1142021229838617/1174277015894962/f

@malmstein malmstein self-requested a review May 8, 2020 09:28
@malmstein
Copy link
Contributor

@cmonfortep after the last update the fireproof list no longer displays properly. Adding multiple sites will show multiple headers instead of the actual site

Screenshot_1588930102

@cmonfortep
Copy link
Contributor Author

Thanks @malmstein! I will check that ASAP 😵

@cmonfortep
Copy link
Contributor Author

@malmstein fixed. I've just tested it with empty/single/multiple sites, can you review it again?

Copy link
Contributor

@malmstein malmstein left a comment

Choose a reason for hiding this comment

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

Tested with the latest changes and works. Good job!

Screenshot_1588931592

@cmonfortep cmonfortep changed the base branch from feature/cristian/webview_database_datasource to feature/cristian/fireproof_websites May 13, 2020 12:48
…ian/ui_improvements_feature_pixels

# Conflicts:
#	app/src/androidTest/java/com/duckduckgo/app/fire/SQLCookieRemoverTest.kt
#	app/src/androidTest/java/com/duckduckgo/app/fire/WebViewCookieManagerTest.kt
#	app/src/androidTest/java/com/duckduckgo/app/fire/WebViewDatabaseLocatorTest.kt
#	app/src/main/java/com/duckduckgo/app/browser/di/BrowserModule.kt
#	app/src/main/java/com/duckduckgo/app/fire/CookieRemover.kt
#	app/src/main/java/com/duckduckgo/app/statistics/pixels/Pixel.kt
@cmonfortep cmonfortep merged commit 48df41f into feature/cristian/fireproof_websites May 13, 2020
@cmonfortep cmonfortep deleted the feature/cristian/ui_improvements_feature_pixels branch May 13, 2020 13:21
cmonfortep added a commit that referenced this pull request May 14, 2020
* Fireproof websites UI (#796)

* 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

* Remove cookies preserving 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
- database corruption

* Fireproof websites empty state and Feature pixels (#810)

* 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"
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