Closed Bug 1811933 Opened 3 years ago Closed 3 years ago

Replace placeholder <select> and <options> in MigrationWizard with a <button> and a <panel-list>

Categories

(Firefox :: Migration, task, P3)

Desktop
All
task

Tracking

()

RESOLVED FIXED
113 Branch
Tracking Status
firefox113 --- fixed

People

(Reporter: mconley, Assigned: portiawuu)

References

Details

Attachments

(1 file)

The <select> dropdown inside of the new MigrationWizard was always a placeholder while we built out the infrastructure that will eventually allow us to show richer content than a traditional <select> can be default.

Now that a bunch of the <panel-list> dependencies have landed, this bug is about replacing the existing <select> / <option> code with:

  1. A <button> element that (for now) will list the browser name for the currently selected migrator
  2. A <panel-item>'s to instead of <option> elements to be inserted into a <panel-list> that exists within a <slot> of the MigrationWizard.

This whole slotting thing might be confusing. Effectively, it allows somebody embedding the <migration-wizard> element to supply the <panel-list> that the <panel-item> elements will be injected into. This is useful because the variant of the MigrationWizard in, for example, the stand-alone XUL window, will need to be able to display this <panel-list> outside of the bounds of the window. This will also be necessary for this list to extend outside of the SubDialog frame after bug 1811281 puts it in there.

So the steps are:

  1. Add a <slot> to the MigrationWizard markup. Just after the <named-deck> is probably good: https://searchfox.org/mozilla-central/rev/c5eeb9f4fcfe52b028e7774054444f2982feccc3/browser/components/migration/content/migration-wizard.mjs#84
  2. Update migration-dialog-window.html to include an empty <panel-list> as the first and only child inside of the migration wizard here: migration-dialog-window.html
  3. Update the MigrationWizard stories in https://searchfox.org/mozilla-central/rev/c5eeb9f4fcfe52b028e7774054444f2982feccc3/browser/components/storybook/stories/migration-wizard.stories.mjs to include a <panel-list> under the dynamically created <migration-wizard> here: https://searchfox.org/mozilla-central/rev/c5eeb9f4fcfe52b028e7774054444f2982feccc3/browser/components/storybook/stories/migration-wizard.stories.mjs#31.
  4. Update this query selector to find the first <panel-list> child item here and set that as #browserProfileSelector.
  5. Have this code here create <panel-item> elements rather than <option> elements, and appendChild them into the #browserProfileSelector.
  6. Replace the <select> with a <button> that just has the name of the currently selected browser set as the .textContent of it in #onShowingSelection
  7. Set up a click event handler on the button added in (6) to call toggle on #browserProfileSelector, passing that toggle call the click event as the only argument.
  8. Update the migration-wizard documentation to mention that a <panel-list> is expected to be a child of the <migration-wizard> in order to work properly.

The end result is that we should be able to see a <panel-list> open up inside of Storybook upon clicking on the button added in (6), and it should list the "fake migrators" that the Storybook story provides.

Severity: -- → N/A
OS: Unspecified → All
Priority: -- → P3
Hardware: Unspecified → Desktop
Duplicate of this bug: 1809353
Assignee: nobody → portiawuu
Depends on: 1818284
Attachment #9318861 - Attachment description: WIP: Bug 1811933 -Replace placeholder <select> and <options> in MigrationWizard with a <button> and a <panel-list>. r=mconley,kpatenio,niklas,gijs → Bug 1811933 -Replace placeholder <select> and <options> in MigrationWizard with a <button> and a <panel-list>. r=mconley,kpatenio,niklas,gijs
Blocks: 1821736
No longer blocks: 1801313
Attachment #9318861 - Attachment description: Bug 1811933 -Replace placeholder <select> and <options> in MigrationWizard with a <button> and a <panel-list>. r=mconley,kpatenio,niklas,gijs → WIP: Bug 1811933 -Replace placeholder <select> and <options> in MigrationWizard with a <button> and a <panel-list>. r=mconley,kpatenio,niklas,gijs
Blocks: 1822686
Attachment #9318861 - Attachment description: WIP: Bug 1811933 -Replace placeholder <select> and <options> in MigrationWizard with a <button> and a <panel-list>. r=mconley,kpatenio,niklas,gijs → Bug 1811933 -Replace placeholder <select> and <options> in MigrationWizard with a <button> and a <panel-list>. r=mconley,kpatenio,niklas,gijs
Attachment #9318861 - Attachment description: Bug 1811933 -Replace placeholder <select> and <options> in MigrationWizard with a <button> and a <panel-list>. r=mconley,kpatenio,niklas,gijs → WIP: Bug 1811933 -Replace placeholder <select> and <options> in MigrationWizard with a <button> and a <panel-list>. r=mconley,kpatenio,niklas,gijs
Attachment #9318861 - Attachment description: WIP: Bug 1811933 -Replace placeholder <select> and <options> in MigrationWizard with a <button> and a <panel-list>. r=mconley,kpatenio,niklas,gijs → Bug 1811933 -Replace placeholder <select> and <options> in MigrationWizard with a <button> and a <panel-list>. r=mconley,kpatenio,niklas,gijs
Attachment #9318861 - Attachment description: Bug 1811933 -Replace placeholder <select> and <options> in MigrationWizard with a <button> and a <panel-list>. r=mconley,kpatenio,niklas,gijs → Bug 1811933 -Replace placeholder <select> and <options> in MigrationWizard with a <button> and a <panel-list>. r=mconley!,kpatenio!,niklas!,gijs!
Pushed by mconley@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e9f6febb0fcc Replace placeholder <select> and <options> in MigrationWizard with a <button> and a <panel-list>. r=mconley,settings-reviewers
Blocks: 1823438
Blocks: 1823495
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 113 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: