Closed Bug 1512432 Opened 2 years ago Closed 1 year ago

Convert <richlistitem> to Custom Element

Categories

(Toolkit :: XUL Widgets, task, P3)

task

Tracking

()

RESOLVED FIXED
mozilla69
Tracking Status
firefox69 --- fixed

People

(Reporter: bgrins, Assigned: surkov)

References

Details

Attachments

(1 file)

The binding itself looks pretty easy: https://bgrins.github.io/xbl-analysis/tree/#richlistitem.

I assume the tricky part will be covering inherited bindings at the same time. That might have to happen all at once, and there may be some flattening there that could happen as well (like the autocomplete-profile-* bindings).
It doesn't look like the base richlistitem does much on connection so I don't anticipate perf problems on that. But some of the inherited bindings set <content>, so if there are hidden instances of those there could be potential regressions.
Priority: -- → P3

(In reply to Brian Grinstead [:bgrins] from comment #0)

The binding itself looks pretty easy:
https://bgrins.github.io/xbl-analysis/tree/#richlistitem.

I assume the tricky part will be covering inherited bindings at the same
time. That might have to happen all at once, and there may be some
flattening there that could happen as well (like the autocomplete-profile-*
bindings).

All (currently) dependent bindings will go away when new about:addons is landed, the codebase already has MozRichlistitem, so the bug fix is rather trivial:

  • add customElements.define("richlistitem", MozRichlistitem); into richlistbox.js
  • remove richlistitem binding in xul.css

Brian, does anything prevent us from replacing richlistitem binding on CE now (leaving all dependent bindings untouched for sure)?

(In reply to alexander :surkov (:asurkov) from comment #3)

(In reply to Brian Grinstead [:bgrins] from comment #0)

The binding itself looks pretty easy:
https://bgrins.github.io/xbl-analysis/tree/#richlistitem.

I assume the tricky part will be covering inherited bindings at the same
time. That might have to happen all at once, and there may be some
flattening there that could happen as well (like the autocomplete-profile-*
bindings).

All (currently) dependent bindings will go away when new about:addons is landed, the codebase already has MozRichlistitem, so the bug fix is rather trivial:

  • add customElements.define("richlistitem", MozRichlistitem); into richlistbox.js
  • remove richlistitem binding in xul.css

Brian, does anything prevent us from replacing richlistitem binding on CE now (leaving all dependent bindings untouched for sure)?

The problem is that then about:addons would have both a CE and XBL attached to richlistitem. I suppose we could skip that document before doing customElements.define() (perhaps based on an attribute on the root node or something so that we don't have to hardcode the URL), but we still couldn't remove the XBL implementation. Might be a good idea anyway to get that flipped and catch any issues early so when about:addons goes away we can delete it.

tweak the summary, leaving bug 1505924 for inherited bindings

Summary: Convert <richlistitem> (and inherited bindings) to Custom Elements → Convert <richlistitem> to Custom Elements
Summary: Convert <richlistitem> to Custom Elements → Convert <richlistitem> to Custom Element
Type: defect → task
Pushed by asurkov@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e09471d13659
convert richlistitem binding to Custom Element, r=bgrins
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69
Assignee: nobody → surkov.alexander
You need to log in before you can comment on or make changes to this bug.