Closed Bug 953643 Opened 7 years ago Closed 7 years ago

Groups should have a "+/-" and a count of "online/total"

Categories

(Instantbird :: Contacts window, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: romain, Assigned: romain)

Details

Attachments

(1 file, 3 obsolete files)

*** Original post on bio 196 at 2009-07-01 21:42:00 UTC ***

As written in the Summary, groups should have a heading + or - (whether the group is collapsed or not).

It could also be interesting to add a counter of (number/total) after the group name.

Easy to fix I guess, but can become hard if there is no way to know the exact total.
*** Original post on bio 196 at 2009-07-01 21:59:19 UTC ***

(In reply to comment #0)
 
> It could also be interesting to add a counter of (number/total) after the group
> name.

Displaying the number of hidden rows when a group is collapsed seems interesting. I don't see the point of displaying the count of visible rows, if they are visible, adding the count of them is useless.

The total count is not something interesting if there's no way to display offline buddies, so I guess we shouldn't bother with it until we add a way to show offline buddies.
*** Original post on bio 196 as attmnt 139 at 2009-07-26 23:24:00 UTC ***

In this patch, I created a new method "_updateGroupLabel()" which updates the group label, adding the number of hidden buddies at the end of the name.
This number is refreshed when a buddy log out or a new buddy log in, and is displayed at start up if the group was closed in the preferences.
Attachment #8351883 - Flags: review?(florian)
Assignee: nobody → romain
Status: NEW → ASSIGNED
Attached patch patch v2 (obsolete) — Splinter Review
*** Original post on bio 196 as attmnt 140 at 2009-07-26 23:32:00 UTC ***

Sorry... There was a trailing 'z' in the previous patch :(
Attachment #8351884 - Flags: review?(florian)
Comment on attachment 8351883 [details] [diff] [review]
proposed patch, without keypress handler.

*** Original change on bio 196 attmnt 139 at 2009-07-26 23:32:25 UTC was without comment, so any subsequent comment numbers will be shifted ***
Attachment #8351883 - Attachment is obsolete: true
Attachment #8351883 - Flags: review?(florian)
*** Original post on bio 196 as attmnt 141 at 2009-07-27 00:28:00 UTC ***

A few changes (as seen with Florian on chat).

A bug has been seen while doing this patch:
    - The animation is performed even if the group is closed on adding a new buddy (buddy.xml:146), we must check that the buddy is not collapsed before doing it.
Attachment #8351885 - Flags: review?(florian)
Comment on attachment 8351884 [details] [diff] [review]
patch v2

*** Original change on bio 196 attmnt 140 at 2009-07-27 00:28:10 UTC was without comment, so any subsequent comment numbers will be shifted ***
Attachment #8351884 - Attachment is obsolete: true
Attachment #8351884 - Flags: review?(florian)
Comment on attachment 8351885 [details] [diff] [review]
patch which follows florian's advice

*** Original change on bio 196 attmnt 141 at 2009-07-27 14:28:01 UTC ***

Looks good, thanks!

Nit:
>+          let GroupIsHidden = this.hasAttribute("closed");
>+          if (GroupIsHidden)
>             buddyElt.setAttribute("collapsed", "true");

Use groupIsHidden, not GroupIsHidden for the variable name.
Attachment #8351885 - Flags: review?(florian) → review+
Attached patch patch v4Splinter Review
*** Original post on bio 196 as attmnt 142 at 2009-07-27 14:30:00 UTC ***

Unfortunately, -moz-appearance: treetwisty looks bad on Mac (excessive margins) and doesn't work at all on Windows.

The attached patch is the version I will push.
Comment on attachment 8351885 [details] [diff] [review]
patch which follows florian's advice

*** Original change on bio 196 attmnt 141 at 2009-07-27 14:30:23 UTC was without comment, so any subsequent comment numbers will be shifted ***
Attachment #8351885 - Attachment is obsolete: true
*** Original post on bio 196 at 2009-07-27 23:37:05 UTC ***

https://hg.instantbird.org/instantbird/rev/782ea6d56eef
Fixed, thanks!

(In reply to comment #4)

> A bug has been seen while doing this patch:
>     - The animation is performed even if the group is closed on adding a new
> buddy (buddy.xml:146), we must check that the buddy is not collapsed before
> doing it.

This was filed as bug 953648 (bio 202).
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → 0.2b1
You need to log in before you can comment on or make changes to this bug.