Hi,
I fully implemented collapsing folders. Collapsed/expanded state of a folder is saved in the user's preferences. Please test.
I'd like specific feedback on the following:
collapsed/expanded folders
Robin
--- 8< --- detachments --- 8< --- The following attachments have been detached and are available for viewing. http://detached.gigo.com/rc/GO/9vfmP3JZ/_1267231.20080612114.patch http://detached.gigo.com/rc/GO/9vfmP3JZ/_1267231.folder-coll.png http://detached.gigo.com/rc/GO/9vfmP3JZ/_1267231.folder-expa.png Only click these links if you trust the sender, as well as this message. --- 8< --- detachments --- 8< ---
List info: http://lists.roundcube.net/dev/
Eyes' candy ! I have over a hundred folders some up to 4 levels. It's a bit funny to watch the main frame adjusts it's width when scrolling the tree quickly but nothing more.
A very minor suggestion: A default state in main.inc.php
PS if you've gone that far, adjusting columns width is a piece of cake :)
Moish
Robin Elfrink wrote:
Hi,
I fully implemented collapsing folders. Collapsed/expanded state of a folder is saved in the user's preferences. Please test.
I'd like specific feedback on the following:
- the structure of the 'string' I use to save the state of
collapsed/expanded folders
- the place where I save the preferences (now in steps/mail/func.php).
Robin
--- 8< --- detachments --- 8< --- The following attachments have been detached and are available for viewing. http://detached.gigo.com/rc/GO/9vfmP3JZ/_1267231.20080612114.patch http://detached.gigo.com/rc/GO/9vfmP3JZ/_1267231.folder-coll.png http://detached.gigo.com/rc/GO/9vfmP3JZ/_1267231.folder-expa.png Only click these links if you trust the sender, as well as this message. --- 8< --- detachments --- 8< ---
List info: http://lists.roundcube.net/dev/
List info: http://lists.roundcube.net/dev/
Robin Elfrink wrote:
Hi,
Hi Robin
I fully implemented collapsing folders. Collapsed/expanded state of a folder is saved in the user's preferences. Please test.
I've tested it but there's something wrong with the indentation of the folders (see attachment). It happens on Firefox and Safari. Looks like the float:left of the <div> causes this wrong behavior. But because the links have display:block it's quite tricky to fix it.
I'd like specific feedback on the following:
- the structure of the 'string' I use to save the state of
collapsed/expanded folders
I guess this works fine. & should be encoded with escape() and therefore work perfectly as a delimiter.
- the place where I save the preferences (now in steps/mail/func.php).
Actually request processing is done in index.php and not in func.inc. And you should send a valid response with $OUTPUT->send() after saving the prefs even if it's empty.
Also I'd like to point at some implementation details:
User prefs are all merged with the config. It's not necessary to create a getter for user prefs. You can simply use $RCMAIL->config->get('collapsed_folders') or $CONFIG['collapsed_folders'] but the latter one is actually deprecated.
The function save_pref($name, $value) is not really necessary too. You can achieve the same by calling $USER->save_prefs(array($name => $value));
When saving the prefs, you should use get_input_value('_name', RCUBE_INPUT_POST) and get_input_value('_value', RCUBE_INPUT_POST) instead of $_POST['_name'], $_POST['_value'].
And there's one final question: how about unread counts of collapsed folders? To make it perfect, the collapsed parent folder should show the cumulated number of unread messages within it's child folders.
After all, it looks like a simple, straight-forward implementation for this feature and that's exactly what I like to see. Go ahead!
~Thomas
--- 8< --- detachments --- 8< --- The following attachments have been detached and are available for viewing. http://detached.gigo.com/rc/Uk/EpqzG2eX/folders-indent.png Only click these links if you trust the sender, as well as this message. --- 8< --- detachments --- 8< ---
List info: http://lists.roundcube.net/dev/
New patch, 30 lines of diff less :)
Thomas Bruederli wrote:
I've tested it but there's something wrong with the indentation of the folders (see attachment). It happens on Firefox and Safari. Looks like the float:left of the <div> causes this wrong behavior. But because the links have display:block it's quite tricky to fix it.
Weird, I had no problem on Firefox, but did see it indeed in IE. I added position:absolute, which seems to fix it. Looks good in Firefox, IE7, Safari on W32, but IE somehow doesn't understand something yet. Work in progress.
I guess this works fine. & should be encoded with escape() and therefore work perfectly as a delimiter.
OK, I'll keep that as it is.
[... preference getting & saving ...]
I've put that in index.php for other functions to use. Is it OK like this? Do we need some more testing of input variables?
And there's one final question: how about unread counts of collapsed folders? To make it perfect, the collapsed parent folder should show the cumulated number of unread messages within it's child folders.
That would be cool, but would also require a lot more work :) Doable, though.
Another thing is the folder icons. Right now I've added two folder icons, but have none for the 'special' folders. My idea is to just use the <div> I added contain a 'plus', 'minus' or 'empty' (or none) icon.
Robin
Robin
--- 8< --- detachments --- 8< --- The following attachments have been detached and are available for viewing. http://detached.gigo.com/rc/KP/dkqReTdD/_1267231.20080616114.patch http://detached.gigo.com/rc/KP/dkqReTdD/_1267231.folder-coll.png http://detached.gigo.com/rc/KP/dkqReTdD/_1267231.folder-expa.png Only click these links if you trust the sender, as well as this message. --- 8< --- detachments --- 8< ---
List info: http://lists.roundcube.net/dev/
Robin Elfrink wrote:
Another thing is the folder icons. Right now I've added two folder icons, but have none for the 'special' folders. My idea is to just use the <div> I added contain a 'plus', 'minus' or 'empty' (or none) icon.
That's what I'd suggest too. You can add the icons to
#mailboxlist li > div.collapsed
and
#mailboxlist li > div.enpanded
The divs should then overlap the icons from the <li>s.
~Thomas
List info: http://lists.roundcube.net/dev/
Hi Robin
Any progress on this? Do you want me/somebody to finish this?
~Thomas
Thomas Bruederli wrote:
Robin Elfrink wrote:
Another thing is the folder icons. Right now I've added two folder icons, but have none for the 'special' folders. My idea is to just use the <div> I added contain a 'plus', 'minus' or 'empty' (or none) icon.
That's what I'd suggest too. You can add the icons to
#mailboxlist li > div.collapsed
and
#mailboxlist li > div.enpanded
The divs should then overlap the icons from the <li>s.
~Thomas
List info: http://lists.roundcube.net/dev/
Thomas Bruederli wrote:
Any progress on this? Do you want me/somebody to finish this?
Sorry for not informing you that I've been a bit busy with other stuff.
Should be done within a couple of weeks, unless somebody else is faster than me :)
Robin _______________________________________________ List info: http://lists.roundcube.net/dev/
Thomas Bruederli wrote:
Any progress on this? Do you want me/somebody to finish this?
Here's the updated patch.
Another thing is the folder icons. Right now I've added two folder icons, but have none for the 'special' folders. My idea is to just use the <div> I added contain a 'plus', 'minus' or 'empty' (or none) icon.
That's done (see attached patch and images). The only thing I'm not completely sure about is the small part in index.php which saves the folder-status.
Robin
--- 8< --- detachments --- 8< --- The following attachments have been detached and are available for viewing. http://detached.gigo.com/rc/kt/KPkLbQKx/_1267231.20080827143.patch http://detached.gigo.com/rc/kt/KPkLbQKx/_1267231.expanded.png http://detached.gigo.com/rc/kt/KPkLbQKx/_1267231.collapsed.png Only click these links if you trust the sender, as well as this message. --- 8< --- detachments --- 8< ---
List info: http://lists.roundcube.net/dev/
Robin Elfrink wrote:
That's done (see attached patch and images). The only thing I'm not completely sure about is the small part in index.php which saves the folder-status.
Positive feedback in the ticket, and tested here by co-workers, so I submitted the patch.
The thing about saving folder-status still stands, but didn't prevent me from submitting though :) We can change that later if necessary.
Robin _______________________________________________ List info: http://lists.roundcube.net/dev/
Robin Elfrink wrote:
Positive feedback in the ticket, and tested here by co-workers, so I submitted the patch.
The thing about saving folder-status still stands, but didn't prevent me from submitting though :) We can change that later if necessary.
This looks good, but after update I don't see unread counts on folders list
A.L.E.C wrote:
This looks good, but after update I don't see unread counts on folders list
Ok, now it's fixed, but it should be rewrited since we have collapsable foders
A.L.E.C wrote:
This looks good, but after update I don't see unread counts on folders list
Hmm, I swear that at some point in the end I still had those counters... I know because they were written into the new div, that's why I added the 'nextSibling'.
Ok, now it's fixed, but it should be rewrited since we have collapsable foders
Thanks.
Yes, I'm still working on that :)
I noticed my Firefox just setting the parent folder BOLD when a child has unread messages. For RoundCube I was thinking of summing up all children when a parent is collapsed, and showing only the parent's own unread count when it is expanded.
Robin _______________________________________________ List info: http://lists.roundcube.net/dev/
Robin Elfrink wrote:
I noticed my Firefox just setting the parent folder BOLD when a child has unread messages. For RoundCube I was thinking of summing up all children when a parent is collapsed, and showing only the parent's own unread count when it is expanded.
for me Thunderbird's behaviour is ok.
A.L.E.C wrote:
I noticed my Firefox just setting the parent folder BOLD when a child has unread messages. For RoundCube I was thinking of summing up all children when a parent is collapsed, and showing only the parent's own unread count when it is expanded.
for me Thunderbird's behaviour is ok.
Nah, not for me :)
Here's a patch that updates counters for collapsed/expanded parents as well. Please test.
Next I'll try to find me an IE6 to address #1485302, which I seem to have caused.
Robin
--- 8< --- detachments --- 8< --- The following attachments have been detached and are available for viewing. http://detached.gigo.com/rc/aF/aEcbw6v7/fix_collapse_counter.patch Only click these links if you trust the sender, as well as this message. --- 8< --- detachments --- 8< ---
List info: http://lists.roundcube.net/dev/
Robin Elfrink wrote:
Positive feedback in the ticket, and tested here by co-workers, so I submitted the patch.
Excellent! Works fine for me as well.
The thing about saving folder-status still stands, but didn't prevent me from submitting though :) We can change that later if necessary.
I think it's OK.
~Thomas _______________________________________________ List info: http://lists.roundcube.net/dev/
Thomas Bruederli wrote:
Excellent! Works fine for me as well.
Thanks.
I can use some help with #1485302. Somehow the <div> I added causes the parent <li> to display funny on IE6.
I know (from creating drop-down menus on several sites) that IE6 has severe problems with <li>, so that's where I expect the problem to lie.
Already tried 'display: inline;' and a <span> instead of <div> but that doesn't seem to do anything.
Robin _______________________________________________ List info: http://lists.roundcube.net/dev/
Robin Elfrink wrote:
for me Thunderbird's behaviour is ok.
Nah, not for me :)
Here's a patch that updates counters for collapsed/expanded parents as well. Please test.
Thunderbird's way is not stupid. Let's say we have Folder with no messages and Folder.Subfolder with messages. When Folder tree is collapsed you know that you should expand the Folder tree (because his name is bold but there's no number). In your solution you don't know where are messages and what to click, Folder name or expand link (more request to the server). That's why I think Thunderbid's way is better.
Robin Elfrink wrote:
I can use some help with #1485302. Somehow the <div> I added causes the parent <li> to display funny on IE6.
I know (from creating drop-down menus on several sites) that IE6 has severe problems with <li>, so that's where I expect the problem to lie.
Already tried 'display: inline;' and a <span> instead of <div> but that doesn't seem to do anything.
I'm on the way to fix it...
~Thomas _______________________________________________ List info: http://lists.roundcube.net/dev/
A.L.E.C wrote:
Thunderbird's way is not stupid. Let's say we have Folder with no messages and Folder.Subfolder with messages. When Folder tree is collapsed you know that you should expand the Folder tree (because his name is bold but there's no number). In your solution you don't know where are messages and what to click, Folder name or expand link (more request to the server). That's why I think Thunderbid's way is better.
Okay, but what if both the parent and the subfolder have unread messages? In that case the folder name is still bold _and_ has a number next to it.
Outlook by the way doesn't do anything with the parent map. But to be honest Outlook is not one whose behaviour I would like to copy :)
I like my way (duh), but it's trivial to change. We can even make it user-configurable.
Robin _______________________________________________ List info: http://lists.roundcube.net/dev/
Robin Elfrink wrote:
Okay, but what if both the parent and the subfolder have unread messages? In that case the folder name is still bold _and_ has a number next to it.
So, maybe something like "Folder (X,Y)"? But I'm still on Thunderbird's way ;)
I like my way (duh), but it's trivial to change. We can even make it user-configurable.
No config for that, please.
A.L.E.C wrote:
Okay, but what if both the parent and the subfolder have unread messages? In that case the folder name is still bold _and_ has a number next to it.
So, maybe something like "Folder (X,Y)"? But I'm still on Thunderbird's way ;)
Yeah, I've been thinking a bit more about it. My way is twice as unclear as Thunderbird's way :) Changed to Thunderbird's behaviour in r1699.
I like my way (duh), but it's trivial to change. We can even make it user-configurable.
No config for that, please.
Too much clutter, eh? :)
Robin _______________________________________________ List info: http://lists.roundcube.net/dev/
Thomas Bruederli wrote:
Robin Elfrink wrote:
I can use some help with #1485302. Somehow the <div> I added causes the parent <li> to display funny on IE6.
I'm on the way to fix it...
OK, it should now be fixed (r1701). I tested it with IE 6/7, Firefox 2/3, Safari 3, Opera 9, Netscape 7
Also the divs are now only inserted when there are subfolders available.
~Thomas _______________________________________________ List info: http://lists.roundcube.net/dev/
Thomas Bruederli wrote:
OK, it should now be fixed (r1701). I tested it with IE 6/7, Firefox 2/3, Safari 3, Opera 9, Netscape 7
Thanks. And the only thing you did was move the <div> _behind_ the <a>? Weird.
Also the divs are now only inserted when there are subfolders available.
Okay, that broke the child-counter :) Fixed.
What I see now is, in IE7, that when INBOX is the selected mail folder, the 'get unread counters' procedure doesn't go beyond INBOX. If any other folder is selected all works well...
Robin
(Having fun with IE on a friday afternoon...) _______________________________________________ List info: http://lists.roundcube.net/dev/
Robin Elfrink wrote:
Thomas Bruederli wrote:
OK, it should now be fixed (r1701). I tested it with IE 6/7, Firefox 2/3, Safari 3, Opera 9, Netscape 7
Thanks. And the only thing you did was move the <div> _behind_ the <a>? Weird.
Also the divs are now only inserted when there are subfolders available.
Okay, that broke the child-counter :) Fixed.
What I see now is, in IE7, that when INBOX is the selected mail folder, the 'get unread counters' procedure doesn't go beyond INBOX. If any other folder is selected all works well...
Fixed in r1705. The main reason was that the set_unread_count_display() method used an undefined var 'count' instead of 'mycount'
~Thomas _______________________________________________ List info: http://lists.roundcube.net/dev/