Display tags in thread list

Berdir - July 18, 2009 - 01:02
Project:Privatemsg
Version:7.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed
Issue tags:filter, pmsg ux
Description

I had an idea how this can be done and had to try it out..

Imho, that patch is filled with pure awesomeness :)

It contains/changes:
- It moves the header and field theming from privatemsg_list() to theme_privatemsg_list(), because...
-- memory improvement, we don't need to carry that around, pass it to hooks, save it into {cache_form} and so on.
-- it allows other modules to alter $form['#data'] and it will then call (or not call) additional theme function to collect headers and field data.
-- It's a cleaner separation between theming and logic

- privatemsg_filter adds 0-3 tags per thread to the list..
-- can be enabled/disabled, of course :)
-- All tags are fetched in a single query, that should be quite fast
-- It implements it in a way that we should be able to use for participants too.. that would allow us to remove db-specific code, countless user_load() calls from that page and make the list query simpler (separate patch, of course)
-- it is well documented, I think ;)

AttachmentSize
privatemsg_tags_list.patch8.39 KB
tags2.png30.52 KB

#1

nbz - July 18, 2009 - 01:07

tagging.

#2

litwol - July 18, 2009 - 02:42

Try a screenshot with longer subjects and more realistic tag names. also subject column should have most width. I realize those are rather minor details but they add much to the 'UX' aspect.

#3

Berdir - September 16, 2009 - 13:52

Re-roll with a few simple fixes..

- when the first thread did not contain tags, no tags were displayed at all. Fixed.
- made the subject column atleast 35% wide. This is just a test and will not work on older browsers like IE6 (who cares? :) )
- Long tags are now shortened

AttachmentSize
privatemsg_tags_list2.patch 9.05 KB
tags3.png 27.78 KB

#4

Berdir - October 14, 2009 - 14:43

Did a re-roll for this. Looking for reviews :)

I think this is now even nicer, together with the actions. See attached screenshot.

AttachmentSize
privatemsg_tags_list3.patch 9.42 KB
taglist.png 45.82 KB

#5

Berdir - November 9, 2009 - 23:28

Fixed a but that removed the last_updated column from the output.

Looking for reviews, this should be quite ready...

AttachmentSize
privatemsg_tags_list4.patch 9.97 KB

#6

Berdir - November 10, 2009 - 19:32

Above patch missed a small change, all table columns are now displayed even if there are no new messages.

I'll go forward and commit this and wait a few days to fix bugs if they are reported.

AttachmentSize
privatemsg_tags_list5.patch 9.96 KB

#7

Berdir - November 10, 2009 - 19:49
Version:6.x-1.x-dev» 7.x-1.x-dev
Status:needs review» patch (to be ported)

Commited to 6.x-1.x-dev, needs to be ported to 7.x-1.x-dev.

#8

Berdir - November 23, 2009 - 23:10
Status:patch (to be ported)» needs review

Oh well, that port grow a bit ;)

The patch uses now tablesect for the checkboxes, which eliminates all our code to generate these checkboxes. It also removes theme_privatemsg_list() and instead converts _privatemsg_list_thread() to a #pre_render function, automatically executed before the table is rendered.

AttachmentSize
privatemsg_tag_list_d7.patch 19.12 KB

#9

Berdir - November 26, 2009 - 21:10
Status:needs review» fixed

Commited to 7.x-1.x-dev

#10

System Message - December 10, 2009 - 21:20
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.