Skip to content
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

Freemium PIR: Manual Removal Links #3466

Merged
merged 7 commits into from
Oct 31, 2024

Conversation

aataraxiaa
Copy link
Contributor

@aataraxiaa aataraxiaa commented Oct 28, 2024

Task/Issue URL: https://app.asana.com/0/72649045549333/1208619435900636/f
FE PR: https://dub.duckduckgo.com/duckduckgo/static-pages/pull/1012

Description: Adds a manual removal link to each Freemium PIR result record view

Note: The frontend UI is in flux. However, the native work can be tested

Test Prerequisites

  1. Set yourself as an internal user via Debug menu → Set Internal User State
  2. Disable/Signout of Privacy Pro via Settings menu → PP → Remove from this device
  3. Select Debug menu → Freemium -> Enroll into Experiment
  4. Select Debug menu → Freemium -> Reset all Freemium State
  5. Set the custom frontend UI URL via Debug menu → Personal Information Removal → Web UI → Set Custom URL. Enter https://abrown.duckduckgo.com/dbp
  6. Use the custom frontend UI URL via Debug menu → Personal Information Removal → Web UI → Use Custom URL
    Relaunch the browser

Steps to test this PR:

  1. Open Freemium PIR (via the meatball overflow menu or new tab banner)
  2. Perform a scan
  3. Wait until results appear
  4. Click on a result to open the result modal
  5. Ensure you see some UI (exact UI design in flux) at the top which includes a link to enable the user to manually remove the record
  6. Click the link and ensure it opens an optout page on the relevant broker
Screenshot 2024-10-29 at 10 39 39

Definition of Done:

Internal references:

Pull Request Review Checklist
Software Engineering Expectations
Technical Design Template
Pull Request Documentation

@aataraxiaa aataraxiaa marked this pull request as ready for review October 29, 2024 10:59
@aataraxiaa aataraxiaa requested a review from quanganhdo October 29, 2024 10:59
@aataraxiaa aataraxiaa changed the title Pete/freemium pir manual removal links Freemium PIR: Manual Removal Links Oct 31, 2024
Copy link
Member

@quanganhdo quanganhdo left a comment

Choose a reason for hiding this comment

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

Works well, nice test coverage. I left one non-blocking comment.

Some notes:

  • The Reset Premium Feature State step should be done first. I couldn't get the entry points to show up until Enroll into Experiment is done after.
  • The FE UI doesn't show the opt out URL so there's no way to test if it works.
  • (FE comment) Hovering the test results should change the cursor to indicate they're clickable.

Comment on lines 245 to 254
/// A computed property that determines if the `optOutUrl` belongs to the parent broker instead of this broker.
///
/// This property returns `true` if the `optOutUrl` does not contain the main `url` of the broker,
/// indicating that the opt-out URL is associated with a parent broker. Conversely, it returns `false`
/// if the `optOutUrl` includes the broker's `url`, signifying that the opt-out URL belongs directly to this broker.
///
/// - Returns: `true` if the `optOutUrl` is for a parent broker; `false` if it is for this broker.
var optOutUrlIsParent: Bool {
!optOutUrl.contains(url)
}
Copy link
Member

Choose a reason for hiding this comment

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

What's this for? Looks like it's only used in test cases.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @quanganhdo. Removed this code and related tests.

@aataraxiaa aataraxiaa merged commit b16b54c into main Oct 31, 2024
18 checks passed
@aataraxiaa aataraxiaa deleted the pete/Freemium-PIR-manual-removal-links branch October 31, 2024 15:29
samsymons added a commit that referenced this pull request Nov 4, 2024
# By Dax the Duck (5) and others
# Via GitHub (4) and Michal Smaga (1)
* main: (24 commits)
  Validate VPN errors before re-throwing them (#3490)
  Allowing users to delete suggestions (#3430)
  Bump version to 1.112.0 (296)
  Marking latest Bitwarden versions as incompatible (#3492)
  Bump version to 1.112.0 (295)
  Update to subscription cookie (#3489)
  Bug Fix: Phishing Detection Dataset Discrepancies (#3440)
  Bump version to 1.112.0 (294)
  Fix crash when opening permission popover for NewTab page address bar (#3484)
  Set version_check_wait_retry_limit to 1 (#3488)
  Refactor automatic update flow to use custom Sparkle user driver (#3274)
  Add to Dock - Update BSK version (#3479)
  Freemium PIR: Manual Removal Links (#3466)
  Fix Sync E2E tests (#3486)
  Fix crash on empty bookmarks html root element (#3482)
  update UI test (#3469)
  Update BSK with autofill 15.1.0 (#3480)
  Bump version to 1.112.0 (293)
  New tagline (#3401)
  add system info to webkit termination validation (#3473)
  ...

# Conflicts:
#	DuckDuckGo.xcodeproj/project.pbxproj
#	DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
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