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

Remove legacy Click to Load configuration #1710

Merged
merged 1 commit into from
Feb 9, 2023

Conversation

kzar
Copy link
Collaborator

@kzar kzar commented Feb 7, 2023

The migration away from the legacy social_ctp_configuration.json
configuration for Click to Load is complete. Let's use the new
configuration for the MV2 code paths and remove all references to the
legacy configuration.

While at it, let's also:

  • Deprecate the clickToLoadClicks Object that's no longer required
    and remove the corresponding logic.
  • Remove the imgToData function that was added for Click to Load but
    no longer used.
  • Remove a now unused webNavigation.onCommitted listener that was
    originally needed for Click to Load.
  • Rewrite the Click to Load unit tests that were passing
    incorrectly.
  • Fix the Click to Load Facebook integration tests, so that they
    aren't marked as pending when blocking fails.

Reviewer: @sammacbeth
Cc: @ladamski, @franfaccin

Steps to test this PR:

  1. Ensure the Click to Load integration tests are still passing (for MV2 and MV3).
  2. Test that Facebook Click to Load works correctly on the Facebook test page (for MV2).

Automated tests:

  • Unit tests
  • Integration tests
Reviewer Checklist:
  • Ensure the PR solves the problem
  • Review every line of code
  • Ensure the PR does no harm by testing the changes thoroughly
  • Get help if you're uncomfortable with any of the above!
  • Determine if there are any quick wins that improve the implementation
PR Author Checklist:
  • Get advice or leverage existing code
  • Agree on technical approach with reviewer (if the changes are nuanced)
  • Ensure that there is a testing strategy (and documented non-automated tests)
  • Ensure there is a documented monitoring strategy (if necessary)
  • Consider systems implications

@kzar kzar marked this pull request as draft February 7, 2023 17:51
Copy link
Collaborator

@sammacbeth sammacbeth left a comment

Choose a reason for hiding this comment

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

Mostly looks good, but I think you've overcomplicated things with the serializable disabledClickToLoadRuleActions. I proposed an alternative.

shared/js/background/before-request.es6.js Outdated Show resolved Hide resolved
shared/js/background/dnr-click-to-load.js Show resolved Hide resolved
shared/js/background/classes/tab.es6.js Show resolved Hide resolved
@kzar kzar marked this pull request as ready for review February 8, 2023 16:58
@kzar kzar force-pushed the remove-legacy-ctl branch 9 times, most recently from c5a4e44 to 774d82c Compare February 9, 2023 11:29
The migration away from the legacy social_ctp_configuration.json
configuration for Click to Load is complete. Let's use the new
configuration for the MV2 code paths and remove all references to the
legacy configuration.

While at it, let's also:
 - Deprecate the clickToLoadClicks Object that's no longer required
   and remove the corresponding logic.
 - Remove the imgToData function that was added for Click to Load but
   no longer used.
 - Remove a now unused webNavigation.onCommitted listener that was
   originally needed for Click to Load.
 - Rewrite the Click to Load unit tests that were passing
   incorrectly.
 - Fix the Click to Load Facebook integration tests, so that they
   aren't marked as pending when blocking fails.
@kzar kzar merged commit cc7c46f into duckduckgo:develop Feb 9, 2023
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.

None yet

2 participants