Up until now, we've used the connectedCallback to initialize the MigrationWizard. That's
been fine, except that it requires us to remove and then re-add the element to the DOM
if we want to "reset" it and start over.
This patch adds a method "requestState" to the MigrationWizard that kicks off the
initialization. Embedders can set the `auto-request-state` attribute on the
element if they're happy to just use the connectedCallback.
Finally, this adds an intrinsic width to the entire MigrationWizard element to reduce
flicker when transitioning between states.
Differential Revision: https://phabricator.services.mozilla.com/D171742
This will make it easier to use Storybook to simulate how the MigrationWizard is likely to
be used in practice - which is to say, declaratively.
Differential Revision: https://phabricator.services.mozilla.com/D170666
I also renamed migration-dialog.[js|html|css] to migration-dialog-window.[js|html|css] to
make it clearer that those resources are for when the wizard is being shown in a separate
window. I also updated the documentation to reflect this.
Differential Revision: https://phabricator.services.mozilla.com/D169014
This does a few things to support this new behaviour:
1. Adds the ability for about:preferences category modules to indicate that
they want to specially handle subcategories. In this particular case, it
causes the "migrate" subcategory of the "general" category to open up the
migration dialog.
2. Updates MigrationUtils to open about:preferences#general-migrate if the opener
is a tabbrowser window.
3. Adds some utility functions to make writing tests easier.
4. Updates existing tests to expect the wizard to be opened in the about:preferences
subdialog.
5. Makes pressing "Escape" close the migration wizard when it's loaded in the
migration-dialog.html document.
Differential Revision: https://phabricator.services.mozilla.com/D167873
This causes the MigrationWizardChild to request the full collection of available
migrators and user profiles, and then based on which resourceTypes those migrators
and user profiles have available, changes the visibility of the checkboxes in the
selection page of the new MigrationWizard component.
Differential Revision: https://phabricator.services.mozilla.com/D167617
This causes the MigrationWizardChild to request the full collection of available
migrators and user profiles, and then based on which resourceTypes those migrators
and user profiles have available, changes the visibility of the checkboxes in the
selection page of the new MigrationWizard component.
Differential Revision: https://phabricator.services.mozilla.com/D167617
This adds:
1. A new <migration-wizard> component
2. A new migration-dialog.html document that loads it
3. JSWindowActors for communicating between whatever process the migration-wizard is
loaded in and the parent process. The actors are currently restricted to running
in these documents:
about:welcome
about:preferences
chrome://browser/content/migration/migration-dialog.html
4. A very small, simple mochitest-chrome test for testing the widget
5. Some Fluent strings for the new <migration-wizard>, dropped into a new folder in
/browser called "locales-preview". This is so that both the jar packaging can
put the Fluent file somewhere sensible that doesn't (currently) require our
localizers to translate, but also so that Storybook can load that Fluent file.
6. Modifications to our Storybook infrastructure so that attempts to load items
from locales-preview will map to the browser/locales-preview folder.
7. A Storybook story for the <migration-wizard> that puts it in a few basic states.
Most of those states aren't actually implemented yet, but are left in the story to
make it easier to develop those states in the component.
The hope is that when this is done, it should be relatively straight-forward to
embed the <migration-wizard> not just in the migration-dialog.html document (which
is used for tab modals and the stand alone migration dialog), but also in existing
in-content pages like about:welcome and about:preferences.
For those worried about the TODO strings or incomplete behaviour, remember that this
is just a base for building upon, and that this component / dialog isn't actually
exposed to users yet.
The dialog can be opened manually via:
```lang=js
gBrowser.getTabDialogBox(gBrowser.selectedBrowser).open("chrome://browser/content/migration/migration-dialog.html")
```
and see the documentation in browser/components/storybook/README.md for guidance on
how to view this component using Storybook.
Differential Revision: https://phabricator.services.mozilla.com/D162623
This adds:
1. A new <migration-wizard> component
2. A new migration-dialog.html document that loads it
3. JSWindowActors for communicating between whatever process the migration-wizard is
loaded in and the parent process. The actors are currently restricted to running
in these documents:
about:welcome
about:preferences
chrome://browser/content/migration/migration-dialog.html
4. A very small, simple mochitest-chrome test for testing the widget
5. Some Fluent strings for the new <migration-wizard>, dropped into a new folder in
/browser called "locales-preview". This is so that both the jar packaging can
put the Fluent file somewhere sensible that doesn't (currently) require our
localizers to translate, but also so that Storybook can load that Fluent file.
6. Modifications to our Storybook infrastructure so that attempts to load items
from locales-preview will map to the browser/locales-preview folder.
7. A Storybook story for the <migration-wizard> that puts it in a few basic states.
Most of those states aren't actually implemented yet, but are left in the story to
make it easier to develop those states in the component.
The hope is that when this is done, it should be relatively straight-forward to
embed the <migration-wizard> not just in the migration-dialog.html document (which
is used for tab modals and the stand alone migration dialog), but also in existing
in-content pages like about:welcome and about:preferences.
For those worried about the TODO strings or incomplete behaviour, remember that this
is just a base for building upon, and that this component / dialog isn't actually
exposed to users yet.
The dialog can be opened manually via:
```lang=js
gBrowser.getTabDialogBox(gBrowser.selectedBrowser).open("chrome://browser/content/migration/migration-dialog.html")
```
and see the documentation in browser/components/storybook/README.md for guidance on
how to view this component using Storybook.
Differential Revision: https://phabricator.services.mozilla.com/D162623