Closed Bug 1823489 Opened 1 year ago Closed 10 months ago

Investigate not using a slotted <panel> / <panel-list> for Migration Wizard

Categories

(Firefox :: Migration, task, P3)

task

Tracking

()

RESOLVED FIXED
117 Branch
Tracking Status
firefox117 --- fixed

People

(Reporter: mconley, Assigned: mconley)

References

(Blocks 1 open bug)

Details

Attachments

(2 files, 1 obsolete file)

This this awkward mechanism that we have now where embedders can slot in a <xul:panel> with a <panel-list> child, or a <panel-list> itself, depending on what context they're in, and then the Migration Wizard populates the <panel-list> with items representing the various options in the selection dropdown.

That whole thing is pretty unwieldy and non-obvious. What we might want to investigate doing is having the Migration Wizard take responsibility for creating the panel-list, and then (if it detects it's in a XUL context), having it insert it into a <xul:panel>, before placing it within its own shadow DOM. That way, it's easier for us to style the panel / panel-list.

Severity: -- → N/A
Priority: -- → P3
Assignee: nobody → portiawuu
Status: NEW → ASSIGNED

Comment on attachment 9327214 [details]
Bug 1823489 - Making the Migration Wizard panel / panel-list the exact width as the selector. r=mconley,kpatenio

Revision D174801 was moved to bug 1825070. Setting attachment 9327214 [details] to obsolete.

Attachment #9327214 - Attachment is obsolete: true
Status: ASSIGNED → NEW
Assignee: portiawuu → nobody

So part of the issue here is that the panel-list doesn't appear to be designed to live within closed shadow roots. The panel-list has a mousedown event listener on the document element to detect clicks outside of the panel-list to hide it, and when within a closed shadow root, it can't correctly determine if a click had occurred within it and will always close.

There are ways we can deal with that in privileged scopes using things like composedTarget.flattenedTreeParentNode and other ChromeOnly goodies, but that doesn't work in embedded environments like about:welcome.

So I think the decision here is either:

  1. Stick with the current somewhat awkward configuration
  2. Open the shadow root

This involves opening the shadow root of the migration wizard, as the panel-list
really isn't designed to handle being embedded within a closed shadow root.

Assignee: nobody → mconley
Status: NEW → ASSIGNED

The CSS rule changes here allow for the list to get long and then become scrollable.

The script change is because it seems that there's a race of some kind where the
XUL panel will often have size 0x0 the first time it is opened unless we wait
for an rAF and another tick of the event loop.

Pushed by mconley@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ccb73c7c777a
Make panel-list work better for longer lists, and less glitchy when opened for XUL panels. r=mstriemer,desktop-theme-reviewers,dao
https://hg.mozilla.org/integration/autoland/rev/abe4ae7a4c01
Have the migration-wizard element create the panel-list in its shadow root. r=kpatenio,negin,desktop-theme-reviewers,dao
Pushed by mconley@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/dd5996a4e7d2
Make panel-list work better for longer lists, and less glitchy when opened for XUL panels. r=mstriemer,desktop-theme-reviewers,dao
https://hg.mozilla.org/integration/autoland/rev/da128472125a
Have the migration-wizard element create the panel-list in its shadow root. r=kpatenio,negin,desktop-theme-reviewers,dao

Backed out for causing multiple bc failures.



  • Push with failures - bc failures on browser_multistage_spotlight.js
  • Failure Log
  • Failure line: TEST-UNEXPECTED-FAIL | browser/components/newtab/test/browser/browser_multistage_spotlight.js | Uncaught exception in test bound test_embedded_import - at chrome://mochitests/content/browser/browser/components/newtab/test/browser/browser_multistage_spotlight.js:85 - TypeError: can't access property "tagName", panelList is undefined
Pushed by mconley@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/15437d29bacc
Make panel-list work better for longer lists, and less glitchy when opened for XUL panels. r=mstriemer,desktop-theme-reviewers,dao
https://hg.mozilla.org/integration/autoland/rev/684648252672
Have the migration-wizard element create the panel-list in its shadow root. r=kpatenio,negin,desktop-theme-reviewers,dao
Pushed by mconley@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e57b37964732
Make panel-list work better for longer lists, and less glitchy when opened for XUL panels. r=mstriemer,desktop-theme-reviewers,dao
https://hg.mozilla.org/integration/autoland/rev/7826f701a72e
Have the migration-wizard element create the panel-list in its shadow root. r=kpatenio,negin,desktop-theme-reviewers,dao
Status: ASSIGNED → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → 117 Branch
Flags: needinfo?(mconley)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: