Closed Bug 953992 Opened 10 years ago Closed 10 years ago

New buddy list backend

Categories

(Chat Core :: General, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: florian, Assigned: florian)

References

Details

Attachments

(3 files, 6 obsolete files)

*** Original post on bio 555 at 2010-10-18 18:26:00 UTC ***

A critical part of the JS-proto work is to make the buddy list fully compatible with protocol plugins implemented in JavaScript.

As the current code of the buddy list is old (almost unchanged since before the 0.1 release back in 2007) and hard to maintain, this is a good opportunity to rewrite it.

The goals of this work are to simplify the code, make it work correctly with protocol plugins implemented in JavaScript, and give us the necessary APIs to implement the contact and tag features we plan add for the 0.3 release.

Adding new user visible features in the list is not part of this, but depends on the work done here.
Attached patch Work in progress (2010-10-18) (obsolete) — Splinter Review
*** Original post on bio 555 as attmnt 378 at 2010-10-18 18:29:00 UTC ***

This work in progress almost works. If adding/removing/moving/renaming buddies is not needed, this is probably useable.
There are still some debug prints in there.

The XPCOM interface is not final yet, but the remaining changes in them should be pretty minor.
Assignee: nobody → florian
Status: NEW → ASSIGNED
Attached patch Work in progress (2010-10-22) (obsolete) — Splinter Review
*** Original post on bio 555 as attmnt 379 at 2010-10-22 17:39:00 UTC ***

New work in progress.
Almost done. Just need to fix forward protocol plugins, and remove the debug print/dumps.
Comment on attachment 8352121 [details] [diff] [review]
Work in progress (2010-10-18)

*** Original change on bio 555 attmnt 378 at 2010-10-22 17:39:25 UTC was without comment, so any subsequent comment numbers will be shifted ***
Attachment #8352121 - Attachment is obsolete: true
*** Original post on bio 555 as attmnt 380 at 2010-10-22 17:41:00 UTC ***

I've spent some time on this before finding a simpler solution. I figured I should attached it for future reference as it worked quite well. The only problem was I couldn't get the old tag to fire the notifications I wanted.
*** Original post on bio 555 as attmnt 381 at 2010-10-22 21:47:00 UTC ***

Fixed the issue with forward protocols, and a bug in server alias updating.

Next steps: remove the debug code and the not-yet-implemented stuff.
Comment on attachment 8352122 [details] [diff] [review]
Work in progress (2010-10-22)

*** Original change on bio 555 attmnt 379 at 2010-10-22 21:47:22 UTC was without comment, so any subsequent comment numbers will be shifted ***
Attachment #8352122 - Attachment is obsolete: true
*** Original post on bio 555 as attmnt 382 at 2010-10-22 23:27:00 UTC ***

Removed debug code, improved documentation, fixed a bug related to the buddy-added signal.
Comment on attachment 8352124 [details] [diff] [review]
Work in progress (2010-10-22) - 2

*** Original change on bio 555 attmnt 381 at 2010-10-22 23:27:53 UTC was without comment, so any subsequent comment numbers will be shifted ***
Attachment #8352124 - Attachment is obsolete: true
Attached patch Patch v1 (obsolete) — Splinter Review
*** Original post on bio 555 as attmnt 383 at 2010-10-22 23:38:00 UTC ***

Not-yet-finished/dead code removed.
Patch ready for (self?)review.
Comment on attachment 8352125 [details] [diff] [review]
Work in progress (2010-10-22) - 3

*** Original change on bio 555 attmnt 382 at 2010-10-22 23:38:49 UTC was without comment, so any subsequent comment numbers will be shifted ***
Attachment #8352125 - Attachment is obsolete: true
*** Original post on bio 555 as attmnt 384 at 2010-10-22 23:40:00 UTC ***

Interdiff between attachment 8352125 [details] [diff] [review] (bio-attmnt 382) and attachment 8352126 [details] [diff] [review] (bio-attmnt 383).
Attached patch Patch v1.1 (obsolete) — Splinter Review
*** Original post on bio 555 as attmnt 385 at 2010-10-23 22:12:00 UTC ***

Made a few changes after a self-review. Mostly comments and whitespace changes.
Also removed some useless includes, and fixed a bug in the way the (currently unused) contact_tag table is loaded.
Comment on attachment 8352126 [details] [diff] [review]
Patch v1

*** Original change on bio 555 attmnt 383 at 2010-10-23 22:12:28 UTC was without comment, so any subsequent comment numbers will be shifted ***
Attachment #8352126 - Attachment is obsolete: true
*** Original post on bio 555 as attmnt 388 at 2010-10-25 00:25:00 UTC ***

* No longer reads in free'd memory while uninitializing the purpleAccountBuddy instances.
* Better error handling while loading the buddy list:
 - failing to load a single buddy no longer makes initContacts fail.
 - initContacts failures make purpleCoreService::Init returns an error so that we refuse to start and offer to check for updates.
* Fixed a compile error (including a header that no longer exists)
* Fixed a JS error in observe (blist.js), a return was missing.

I've spent some time testing this on Mac and Linux with several profiles, both with debug and optimized builds. I also tested with my default profile.

I think this is ready to land.
Comment on attachment 8352128 [details] [diff] [review]
Patch v1.1

*** Original change on bio 555 attmnt 385 at 2010-10-25 00:25:04 UTC was without comment, so any subsequent comment numbers will be shifted ***
Attachment #8352128 - Attachment is obsolete: true
*** Original post on bio 555 at 2010-10-25 00:33:44 UTC ***

https://hg.instantbird.org/instantbird/rev/bf56c9f22e75
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
*** Original post on bio 555 at 2010-10-25 09:06:16 UTC ***

Follow-up to fix bustage: package the new component:
https://hg.instantbird.org/instantbird/rev/2d33324cdb9d
Depends on: 954002
*** Original post on bio 555 at 2011-05-19 13:21:35 UTC ***

(In reply to comment #7)
> Created an attachment (id=384) [details]
> Removed not finished code

The buddy icon part of attachment as been pushed in https://hg.instantbird.org/instantbird/rev/13baeefb20d8
You need to log in before you can comment on or make changes to this bug.