MUC Participants list not sorted alphabetically under some circumstances - take 2

RESOLVED FIXED in Thunderbird 66.0

Status

defect
RESOLVED FIXED
6 months ago
5 months ago

People

(Reporter: RyanVM, Assigned: jorgk)

Tracking

({regression})

Trunk
Thunderbird 66.0
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

+++ This bug was initially created as a clone of Bug #1480057 +++

Bug 1480057 fixed the lack of alphabetization under most circumstances, however the list is still not alphabetized when switching from a chat without a participants list (like a private chat) to one that does. Switching to a different public chat and back will fix the sorting.

(In reply to Florian Quèze [:florian] from bug 1480057 comment #22)

When I do that I get this JS error in the console, and I have a single nick
in the participant list:
TypeError: nicklist.getItemAtIndex(...).label is undefined

The error is on the if (nick <
nicklist.getItemAtIndex(middle).label.toLowerCase()) line.
I guess the XBL binding isn't attached yet when we attempt to use the label
getter.

I know you didn't like this approach the last time I presented it, but do you have a better idea?

Attachment #9037922 - Flags: review?(florian)

Just FYI - <richlistitem> will be (soonish) removed in bug 1512432 which may change how this loads/behaves.

Comment on attachment 9037922 [details] [diff] [review]
1521097-sort-order.patch

Review of attachment 9037922 [details] [diff] [review]:
-----------------------------------------------------------------

I still find .querySelector("label") more readable than .firstChild.nextSibling... but whatever. If this fixes the remaining part of the bug, let's do it and move on.
Attachment #9037922 - Flags: review?(florian) → review+

Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/611baef2655f
Bug 1480057 follow-up: Don't use .label when the XBL binding isn't attached yet. r=florian

Status: NEW → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 66.0
Comment on attachment 9037922 [details] [diff] [review]
1521097-sort-order.patch

Piling up stuff for TB 65 beta 4 :-)
Attachment #9037922 - Flags: approval-comm-beta+
Assignee: nobody → jorgk

Was comment 6 supposed to say b3? Just trying to figure out if the update I got today should have this fix or not (because it doesn't appear to).

Flags: needinfo?(jorgk)

Hi Ryan, no, "beta 4" is correct. That will be shipped on 29th Jan. You can pick a "preview" from our candidates directory:
http://ftp.mozilla.org/pub/thunderbird/candidates/65.0b4-candidates/build2/

Flags: needinfo?(jorgk)

Just got updated to 65.0b4 and the problem is still there.

Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: Thunderbird 66.0 → ---

)-: What does the error console say this time?

Nothing in the error console :(

Target Milestone: --- → Thunderbird 66.0
Blocks: 1532904

Sorry I'm closing this now since we did land a relevant fix on TB 66 with backport to TB 65 beta 4.

It would get really confusing to do further landings here.

I'll filed bug 1532904 as follow-up.

Status: REOPENED → RESOLVED
Closed: 6 months ago5 months ago
Resolution: --- → FIXED
Summary: MUC Participants list not sorted alphabetically under some circumstances → MUC Participants list not sorted alphabetically under some circumstances - take 2
You need to log in before you can comment on or make changes to this bug.