Skip to content

feat: Added in-product messaging capabilities [#1385]

This MR contains the following changes:

  • Added src/ipm feature.
    • Provide setCommandActor() function for registering command handlers.
    • Provide executeIPMCommand() function for validating and executing in-product messaging (IPM) commands.
    • Store valid IPM commands that haven't been dismissed yet.
    • Provide various helper functions (e.g. getBehavior(), createSafeOriginUrl()) to command handlers.
    • Provide recordEvent() function for returning events relating to specific IPM commands.
  • Added src/logger feature.
  • Temporarily disable any ESLint rules that caused problems and that we expect to become irrelevant, as we rebase the changes onto the next branch later, due to it using a different coding style.

This MR also contains the following unrelated changes:

  • Fixed: Prevent storing changes to object preferences without calling Prefs.set().

Note that these changes have also been reviewed internally during development at https://gitlab.com/adblockinc/ext/adblockplus/private/adblockplusui/-/merge_requests/1 and https://gitlab.com/adblockinc/ext/adblockplus/private/adblockplusui/-/merge_requests/4.

Merge request reports