Closed Bug 1554637 Opened 5 years ago Closed 5 years ago

[de-xbl] convert the glodacomplete-rich-result-popup binding

Categories

(Thunderbird :: Search, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 70.0

People

(Reporter: mkmelin, Assigned: aleca)

References

Details

Attachments

(2 files, 3 obsolete files)

https://searchfox.org/comm-central/rev/5a670c59f9004ef9be4874cfbfe57ec2ef3b260f/mailnews/db/gloda/content/glodacomplete.xml#13

There doesn't appear to be an m-c bug for autocomplete-rich-result-popup + urlbar-rich-result-popup conversion yet.

Maybe bug 1534455 will remove it.

Just heads up that bug 1562274 removes urlbar-rich-result-popup which is Firefox's only usage of autocomplete-rich-result-popup.

What you'd probably want to do here is:

  • Combine autocomplete-rich-result-popup and glodacomplete-rich-result-popup in one single XBL binding
  • Run that binding through the converter: https://bgrins.github.io/xbl-analysis/converter/
  • Add/define the custom element as needed
  • Fix any remaining issues
Flags: needinfo?(mkmelin+mozilla)
Flags: needinfo?(alessandro)

Thanks for the heads up, I've been tracking bug 1534455 to be sure to not miss the train.
I'll get on to it right away.

Flags: needinfo?(alessandro)

This is a temporary patch which brings the autocomplete-rich-result-popup binding from toolkit to the glodacomplete.xml file.
Just in case it gets removed from toolkit before this new CE is ready, and we need to temporarily land this on trunk in order to not have a broken autocomplete.

Depends on: 1564969
No longer depends on: 1534455
Depends on: 1542720

Here's an initial patch to de-xbl the glodacomplete richlist.

I need some help with this one to figure out why it doesn't work at all.
The autocomplete panel doesn't show up, no errors are triggered, nothing seems to work.

I don't know if it's related to some misconfiguration of the observers in bug 1542720, or something silly I'm doing here.

Also, I can't seem to figure out if and how the <hbox><children/></hbox> section was used at all.

Attachment #9077308 - Flags: feedback?(geoff)
Status: NEW → ASSIGNED

(In reply to Alessandro Castellani (:aleca) from comment #7)

Created attachment 9077308 [details] [diff] [review]
1542720-dexbl-glodacomplete.patch

Here's an initial patch to de-xbl the glodacomplete richlist.

I need some help with this one to figure out why it doesn't work at all.
The autocomplete panel doesn't show up, no errors are triggered, nothing seems to work.

If you have bug 1534455 applied, then the popup won't appear unless you make some changes, see https://bugzilla.mozilla.org/show_bug.cgi?id=1534455#c5

Regardless, you should be able to work on this bug without bug 1534455 or bug 1542720 applied.

(In reply to Tim Nguyen :ntim from comment #8)

If you have bug 1534455 applied, then the popup won't appear unless you make some changes, see https://bugzilla.mozilla.org/show_bug.cgi?id=1534455#c5

Btw, note that :aswan will be taking over bug 1534455, so I don't know what his plan is.

(In reply to Tim Nguyen :ntim from comment #8)

Regardless, you should be able to work on this bug without bug 1534455 or bug 1542720 applied.

Sweet, thank you so much, this helps me a lot.

Btw, note that :aswan will be taking over bug 1534455, so I don't know what his plan is.

Thanks for the heads up, I will bother him :D

Flags: needinfo?(mkmelin+mozilla)

All right, this one works with some hacky things.

If I use <panel is="autocomplete-rich-result-popup" it works, but I have to override the _appendCurrentResult() and _invalidate() method in the MozAutocompleteRichResultPopup class with what we need. (You can see I left the original methods commented out)

I'd like to extend the MozAutocompleteRichResultPopup class and use the CE <glodacomplete-rich-result-popup/> or <panel is="glodacomplete-rich-result-popup", but I can't seem to make it work.

Suggestions?

Attachment #9077308 - Attachment is obsolete: true
Attachment #9077308 - Flags: feedback?(geoff)
Attachment #9077317 - Flags: feedback?(geoff)

(In reply to Alessandro Castellani (:aleca) from comment #11)

Created attachment 9077317 [details] [diff] [review]
1542720-dexbl-glodacomplete.patch

All right, this one works with some hacky things.

If I use <panel is="autocomplete-rich-result-popup" it works, but I have to override the _appendCurrentResult() and _invalidate() method in the MozAutocompleteRichResultPopup class with what we need. (You can see I left the original methods commented out)

I'd like to extend the MozAutocompleteRichResultPopup class and use the CE <glodacomplete-rich-result-popup/> or <panel is="glodacomplete-rich-result-popup", but I can't seem to make it work.

Suggestions?

Since glodacomplete-rich-result-popup is the only consumer of autocomplete-rich-result-popup right now in comm-central, can't you combine both ? This way you won't need to worry about overriding/extending, and the code will generally be shorter. If someone wants to bring back autocomplete-rich-result-popup for whatever reason in the future, they can look into the commit history.

What I'd do is just combine them both and have class MozGlodacompleteRichResultPopup extends MozPopupElement.

Also, if you want to use it as <panel is="glodacomplete-rich-result-popup" /> (which would make sense since you're extending MozPopupElement), you should do: customElements.define("glodacomplete-rich-result-popup", MozGlodacompleteRichResultPopup, { extends: "panel" });

(In reply to Tim Nguyen :ntim from comment #12)

Since glodacomplete-rich-result-popup is the only consumer of autocomplete-rich-result-popup right now in comm-central, can't you combine both ?

Sweet, thanks for confirming the approach I was aiming for.

Oh btw, I've triggered bug 1564969 for landing, so it should be in mozilla-central sometime tomorrow.

This is ready for a full review.

I found a bug where the panel shows up at the bottom of the main window.
This happens in 60.7.2 as well, so it's not related to this de-xbl, but I can't figure out how to solve it.

To reproduce the bug:

  • select the main searchbox, type something and with the arrow keys select the first entry of the autocomplete "Messages mentioning: ..."
  • In the search results tab, type another letter in the search field and hit enter.
  • Type another letter.

The panel will appear at the bottom right corner of the window.

Attachment #9077317 - Attachment is obsolete: true
Attachment #9077317 - Flags: feedback?(geoff)
Attachment #9077443 - Flags: review?(geoff)

(In reply to Tim Nguyen :ntim from comment #14)

Oh btw, I've triggered bug 1564969 for landing, so it should be in mozilla-central sometime tomorrow.

Thanks for the heads up, I saw that.
We should be able to land this today so it shouldn't be a problem.
Thank you so much for your help and support!

Comment on attachment 9077443 [details] [diff] [review] 1542720-dexbl-glodacomplete.patch Review of attachment 9077443 [details] [diff] [review]: ----------------------------------------------------------------- This looks okay to me, although I haven't had a chance to test it works, my build is busted, and I have to go out now.
Attachment #9077443 - Flags: review?(geoff) → review+

This is ready to go as I fixed the issue I described in comment 15.

The issue persists with the XBL autocomplete.xml, but with my fix and the soon to land de-xbl autocomplete of bug 1534455, it's all good.

Here's a try run: https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&revision=8e9cd73b4c2f07685506e59e28ce928ab7efc468

Attachment #9077443 - Attachment is obsolete: true
Attachment #9077784 - Flags: review+
Keywords: checkin-needed

Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/a48966e47592
[de-xbl] convert the glodacomplete-rich-result-popup. r=darktrojan

Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 70.0
Regressions: 1565923
No longer regressions: 1565923
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: