Add a new entrypoint to the migration wizard in about:preferences
Categories
(Firefox :: Migration, enhancement, P3)
Tracking
()
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:
- 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
. - 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"
. - 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
.
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 1•2 years ago
|
||
Comment 3•2 years ago
|
||
Backed out for causing Gecko Decision bustage.
Backout link: https://hg.mozilla.org/integration/autoland/rev/4d144a350c6c5a10287a4046b019af7f1ccd8181
Comment 5•2 years ago
|
||
Backed out for causing failures at browser_open_migration_wizard.js
Backout link: https://hg.mozilla.org/integration/autoland/rev/dd5f8f1a3ee3aec94f8233acc4324aac92138053
Failure log: https://treeherder.mozilla.org/logviewer?job_id=408810357&repo=autoland&lineNumber=15569
Assignee | ||
Comment 6•2 years ago
|
||
Turns out that on Linux, showMigrationWizard
blocks. I've updated the code accordingly.
Comment 8•2 years ago
|
||
bugherder |
Description
•