Closed Bug 1820655 Opened 2 years ago Closed 2 years ago

Add a new entrypoint to the migration wizard in about:preferences

Categories

(Firefox :: Migration, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
113 Branch
Tracking Status
firefox113 --- fixed

People

(Reporter: mconley, Assigned: mconley)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

Attachments

(1 file)

This is the specification: https://www.figma.com/file/PcMkM0ZaSSy3zmS3CYGWNj/Handover---students?node-id=2%3A8746&t=0XbTXGSuaQHv1u7O-4

Note that, in order to blend in properly with the aesthetics of about:preferences, the "Import Browser Data" header will need to be bolded like "Startup" and "Tabs".

We'll want to create a new section like this, and add the appropriate strings to browser/locales/en-US/browser/preferences/preferences.ftl.

As for the button itself and making it work, we'll need to do a few things here:

  1. Add PREFERENCES as a new entrypoint for the Migration Wizard here: https://searchfox.org/mozilla-central/rev/00ea1649b59d5f427979e2d6ba42be96f62d6e82/browser/components/migration/MigrationUtils.sys.mjs#951. It can have the value of 9.
  2. At the top of main.js, import the MigrationUtils ESM, like this: https://searchfox.org/mozilla-central/rev/00ea1649b59d5f427979e2d6ba42be96f62d6e82/browser/components/preferences/dialogs/browserLanguages.js#20-22, but pointing at "resource:///modules/MigrationUtils.jsm".
  3. When the button is pressed, have it call MigrationUtils.showMigrationWizard like so:
const browser = window.docShell.chromeEventHandler;
const browserWindow = browser.ownerGlobal;
MigrationUtils.showMigrationWizard(browserWindow, { entrypoint: MigrationUtils.MIGRATION_ENTRYPOINTS.PREFERENCES });

it'd be best to define some kind of method on gMainPane and having the button call that by setting up a "command" event listener on the button like this.

We'll also need a test for this added to browser/components/preferences. Using something like ./mach addtest browser/components/preferences/browser_open_migration_wizard.js will get you started (don't forget to hg add browser/components/preferences/browser_open_migration_wizard.js before you commit!). The test should ensure that clicking on the button opens the old XUL dialog if browser.migrate.content-modal.enabled is false, and opens the new Migration Wizard in an HTML dialog in the about:preferences page if browser.migrate.content-modal.enabled is true.

Severity: -- → N/A
Type: task → enhancement
Priority: -- → P3
Assignee: nobody → mconley
Pushed by mconley@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/21ac89d8a165 Add a new section to about:preferences to launch the migration wizard. r=jhirsch,fluent-reviewers,flod

Backed out for causing Gecko Decision bustage.

Backout link: https://hg.mozilla.org/integration/autoland/rev/4d144a350c6c5a10287a4046b019af7f1ccd8181

Flags: needinfo?(mconley)
Pushed by mconley@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5c4677b1ea47 Add a new section to about:preferences to launch the migration wizard. r=jhirsch,fluent-reviewers,flod

Turns out that on Linux, showMigrationWizard blocks. I've updated the code accordingly.

Flags: needinfo?(mconley)
Pushed by mconley@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/84b559d7d2cc Add a new section to about:preferences to launch the migration wizard. r=jhirsch,fluent-reviewers,flod DONTBUILD
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 113 Branch
Blocks: 1822609
Depends on: 1828280
Regressions: 1828280
No longer depends on: 1828280
Duplicate of this bug: 731144
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: