Closed Bug 1580554 Opened 5 years ago Closed 5 years ago

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

Categories

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

task

Tracking

()

VERIFIED FIXED
mozilla71
Tracking Status
firefox71 --- verified

People

(Reporter: rpl, Assigned: rpl)

References

Details

Attachments

(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
Status: NEW → ASSIGNED
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 luca.greco@alcacoop.it: https://hg.mozilla.org/integration/autoland/rev/bd009ebbf5fc Open abuse report panel in a separate dialog window. r=mstriemer https://hg.mozilla.org/integration/autoland/rev/f155ba067300 Set a localized title on the abuse report dialog window. r=fluent-reviewers,flod,mstriemer https://hg.mozilla.org/integration/autoland/rev/31e7850298c5 Move common report test cases into head_abuse_report.js and run them on sub-frame and dialog mode. r=mstriemer https://hg.mozilla.org/integration/autoland/rev/b904c4625a36 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.

Status: RESOLVED → VERIFIED
Attached image Postfix video (deleted) —
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: