Closed Bug 1580554 Opened 4 months ago Closed 3 months ago

[about:addons] Open abuse report panel into its own dialog window


(Toolkit :: Add-ons Manager, task, P1)




Tracking Status
firefox71 --- verified


(Reporter: rpl, Assigned: rpl)




(5 files)

As part of Bug 1561022 ("handing off AMO abuse report flow to Firefox about:addons") we need to be able to open the abuse report panel into its own dialog window.

The goal of this issue is to apply the changes needed on the "integrated abuse report panel internals" to:

  • open the abuse report panel into a new dialog window for all the report flows already supported ("report browserAction context menu action", "report option in about:addons views", "report on addon removal"):

    • to streamline the user experience by providing a similar flow for all the abuse report submissions entry points (the new behavior will be locked behind a new preference, "extensions.abuseReport.openDialog", to be enabled by default once it has been successfully QA verified and no blocking issues or regressions found)
    • to allow QA to verify the behaviors of the "abuse report dialog window" mode while the abuse report is not yet exposed as an API to the AMO website
  • to make the abuse report panel able to detect when it is running in "its own dialog window" (vs "sub-frame of the about:addons page") and adapt its behavior and the applied CSS rules:

    • receive caller parameters from the window.arguments when opened in a dialog window, the needed window arguments include:
      • the AbuseReport object (used to fill in the panel with the addon metadata, and then set the typed message and reason when the user presses the submit button)
      • resolve and reject functions (used to let the caller know that the report is ready to be submitted or cancelled, or if something went wrong)
      • a openWebLink helper function (used to open links included in the panel)
    • set a localized document title on the dialog window
    • set a className on the document's documentElement (to allow to apply special CSS rules when the panel is in its own dialog window)
    • disable workarounds only needed when the panel is a subframe of the about:addons page (e.g. the workarounds to prevent keyboard navigations issues)
Assignee: nobody → lgreco
Blocks: 1561022
Priority: -- → P1

Introduced a new "extensions.abuseReport.openDialog" pref:

  • when set to false (current default): the abuse report panel is opened
    as a subframe of the about:addons tab
  • when set to true: the abuse report panel is opened in its own dialog window

Move test helpers and the common abuse report test cases (the ones that should run in sub-frame and dialog window mode)
into an head_abuse_report.js support file, then run all the common test cases from browser_html_abuse_report.js
(in sub-frame mode) and browser_html_abuse_report_dialog.js (in dialog window mode).

Depends on D45571

Blocks: 1580561
Pushed by
Open abuse report panel in a separate dialog window. r=mstriemer
Set a localized title on the abuse report dialog window. r=fluent-reviewers,flod,mstriemer
Move common report test cases into head_abuse_report.js and run them on sub-frame and dialog mode. r=mstriemer
AbuseReporter.openDialog should close and resolve as user cancelled a previous report dialog. r=mstriemer
Depends on: 1597265
No longer depends on: 1597265

Verified as fixed in FF71 71.0b11 using Windows 10x64 and MacOS Catalina 10.15.

I will attach a postfix video.

Attached image Postfix video
You need to log in before you can comment on or make changes to this bug.